-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge passes in Vulkan mobile renderer #84169
Merge passes in Vulkan mobile renderer #84169
Conversation
820ca4f
to
6cf3c13
Compare
I'll be adding some before/after timing info as soon as I have recharged some phones :) I suspect this will have no impact on desktop GPUs, but in theory there should be a measurable difference on phones and standalone VR hardware. |
Testing scene on Samsung S21 MALI
I'm not surprised by these results, according to ARM MALI implements subpasses well. Test project used (could use something better): |
Testing scene on Quest Pro
Totally not what I was expecting... Test project used: |
I'm wondering if #82175 was really a bug, so might try and "unfix" that and see if that actually works. In theory we should be able to render MSAA in a pass, resolve it, and then do tonemapping in a subpass, which should result in no data being written our to MSAA or 3D buffers, only to our render target. |
6cf3c13
to
60a9612
Compare
After doing some more testing with this, found out the conclusion in 82175 was indeed wrong, the problems were due to the transparent subpass getting skipped on Adreno hardware and MSAA thus not getting resolved, not because MSAA doesn't work with the subpass approach. Merging the passes already solves the Adreno issue so I've undone the exception and we now use the 2-subpass approach with MSAA enabled. @darksylinc this could use a review from you. I know that there is more to MSAA especially on Forward+, but for Mobile all scenarios are now working and I think this would be a good thing to merge ASAP once our merge window for 4.3 is open (really wish this had ended up in 4.2 as it solves a number of issues people are currently running into in VR). |
Testing a modified version of the TPS demo with this PR. I am seeing a slight GPU time regression (~16mspd -> ~18mspf) using intel integrated graphics. I'll investigate a bit more as it is not obvious where that regression would come from, especially on desktop hardware |
Indeed, weird, seeing it should do less, not more ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested again from clean builds and I can't reproduce the regression anymore.
The code looks good to me and feels a lot cleaner, so this is a nice win
servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp
Outdated
Show resolved
Hide resolved
Needs a rebase, and then can be merged! |
Any chance of merging this one in soon before conflicts are introduced? |
@warent There are conflicts already, as pointed out 5 days ago :) So it can't be merged. But be assured that we keep track of approved and ready to merge rendering PRs, there are just many of them with interdependencies which we need to merge in a specific order. Clay is managing that. |
60a9612
to
22cd145
Compare
Sorry, missed the last bit of feedback, its been a bit of a weird week. Should all be ok now. |
Great! Should be good to merge now |
Thanks! |
Are there some updates on this issue? I am still able to reproduce it with v4.3.stable.official [77dcf97] :( |
Did you mean to post on this PR? This isn't a bug report, this is a PR that was merged a year ago. There won't be any updates since it was already merged |
Ah, sorry wrong tab 😅. Wanted to post here #86098 |
After various discussions with @darksylinc, did the work to merge passes that didn't need to be separate subpasses in the mobile renderer. This greatly simplifies things.
There are now 3 scenarios:
This PR also has an optimalisation that when the background is copied from canvas, this no longer happens in a separate pass, but becomes the first step in the opaque pass.
Fixes #82175
Fixes #81910
Fixes #83481