Skip to content
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

[URP][Backport] make the Vulkan RenderTexture MSAA support fallback work in the same way as the swapchain backend implementation #6509

Merged
merged 3 commits into from Jan 27, 2022

Conversation

manuele-bonanno
Copy link
Contributor

@manuele-bonanno manuele-bonanno commented Dec 7, 2021

backport of:
#6180
#2342

Backport case:
https://fogbugz.unity3d.com/f/cases/1384313/

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

…ded. Also made the Vulkan MSAA support fallback behaviour behave in the same way as the swapchain's backend code
@manuele-bonanno manuele-bonanno requested a review from a team as a code owner December 7, 2021 11:05
@manuele-bonanno manuele-bonanno changed the base branch from master to 7.x.x/release December 7, 2021 11:06
@manuele-bonanno manuele-bonanno requested review from a team as code owners December 7, 2021 11:06
@github-actions
Copy link

github-actions bot commented Dec 7, 2021

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.
Link to Yamato: https://unity-ci.cds.internal.unity3d.com/project/902/
Search for your PR branch using the search bar at the top, then add the following segment(s) to the end of the URL (you may need multiple tabs depending on how many packages you change)

HDRP
/jobDefinition/.yamato%2Fall-hdrp.yml%23PR_HDRP_trunk
With changes to HDRP packages, you should also run
/jobDefinition/.yamato%2Fall-lightmapping.yml%23PR_Lightmapping_trunk

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.

@github-actions
Copy link

github-actions bot commented Dec 7, 2021

It appears that you made a non-draft PR!
Please convert your PR to draft (button on the right side of the page)
and cancel any jobs that started on Yamato.
See the PR template for more information.
Thank you!

@theo-pnv theo-pnv removed the request for review from a team December 7, 2021 15:17
@manuele-bonanno manuele-bonanno requested a review from a team as a code owner January 27, 2022 09:29
@phi-lira phi-lira merged commit d95ed79 into 7.x.x/release Jan 27, 2022
@phi-lira phi-lira deleted the 7.x.x/urp/android_vulkan_msaa_fix branch January 27, 2022 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants