-
Notifications
You must be signed in to change notification settings - Fork 856
Mobile/fix depth of field on adreno3 xx #4246
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
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.
I don't the fix but if this fixes the issue LGTM.
// Adreno 3xx SystemInfo.graphicsShaderLevel is 35, but instancing support is disabled due to buggy drivers. | ||
// DOF shader uses #pragma target 3.5 which adds requirement for instancing support, thus marking the shader unsupported on those devices. | ||
var dofMaterial = m_DepthOfField.mode.value == DepthOfFieldMode.Gaussian ? m_Materials.gaussianDepthOfField : m_Materials.bokehDepthOfField; |
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.
I dont' understand how the material returns null for Adreno 3xx here.
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.
If the shader is not supported, it returns null. That's a result of an older identical issue fix 9157ee7
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.
The bug: https://fogbugz.unity3d.com/f/cases/1327076/ is verified as fixed. Depth of field in not initialised on Adreno 3xx devices.
Tested Adreno 3xx devices:
- VLNQA00104, Lge Nexus 5 (Nexus 5), Android 6.0.1, CPU: Snapdragon 800 MSM8974, GPU: Adreno (TM) 330
- VLNQA00111, Samsung Galaxy J5(2016) (SM-J510FN), Android 7.1.1, CPU: Snapdragon 410 MSM8916, GPU: Adreno (TM) 306
Also checked some other devices additionally. The Depth of Field is initialised as expected:
- VLNQA00340, Samsung Galaxy Note20 Ultra 5G (SM-N986B), Android 10, CPU: Exynos 990, GPU: Mali-G77
- VLNQA00280, Samsung Galaxy S10+ USA, CPU: Snapdragon 855 SM8150, GPU: Adreno 650, Android: 9
- VLNQA00287, Motorola moto g(7) power (moto g(7) power), Android 9, CPU: Snapdragon 625 MSM8953, GPU: Adreno (TM) 506
Purpose of this PR
Fix case: https://fogbugz.unity3d.com/f/cases/1327076/
The depth of field shader has
pragma target 3.5
. Devices with Adreno 3XX gpus report SystemInfo.graphicsShaderLevel is 35, but due to buggy drivers we have disabled instancing support on them. That causes the depth of field check for SystemInfo.graphicsShaderLevel to pass, but loading the shader fails due to lack of instancing support.Testing status
Manual testing on Nexus5/Adreno330
Comments to reviewers
Notes for the reviewers you have assigned.