-
Notifications
You must be signed in to change notification settings - Fork 860
[URP] make the Vulkan RenderTexture MSAA support fallback work in the same way as the swapchain backend implementation #6180
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
Conversation
…y as the swapchain's backend code
|
Hi! This comment will help you figure out which jobs to run before merging your PR. The suggestions are dynamic based on what files you have changed. URP Depending on the scope of your PR, you may need to run more jobs than what has been suggested. Please speak to your lead or a Graphics SDET (#devs-graphics-automation) if you are unsure. |
com.unity.render-pipelines.universal/Runtime/UniversalRenderPipelineCore.cs
Show resolved
Hide resolved
|
Are there any details you can share about My webgl project worked with depthtexture copy in 2020, and updating to 2021 still works if I uncomment the part where you return |
It doesn't work when MSAA is enabled. We noticed that we could still allow it when MSAA is off, so we are pushing a fix for that while waiting for the fix you can do this locally: if (IsGLESDevice() && msaaDepthResolve) |
|
That makes sense. Thanks for the update on this! |
Purpose of this PR
The way RenderTextures handle MSAA fallback when an unsupported sample count of 2 is requested (falling back to numSamples = 1), differs fom the way the fallback is handled when setting up the Vulkan swapchain (rounding up numSamples to 4, if supported). This caused an issue on Mali GPUs which don't support 2x MSAA.
This PR makes sure that on Vulkan the MSAA unsupported fallback behaviour is consistent between RenderTextures and Swapchain.
We are also making sure that depth copy is always disabled on GLES, since it doesn't work on that platform.
Testing status
Tested the repro project of this case.
Comments to reviewers
we should review how all backends handle MSAA fallbacks and move these implementation details in engine code.
check the implementation of SelectSupportedSampleCount(const VkSampleCountFlags supportedSamplesCounts, const VkSampleCountFlagBits requested) in GfxDeviceVK.cpp for more info