Search Issue Tracker

By Design

Votes

0

Found in

2020.3.47f1

2021.3.22f1

2022.2.16f1

2023.1.0b11

2023.2.0a11

Issue ID

UUM-34047

Regression

No

[Android][OpenGLES] Unused SubShaders are compiled when ShaderVariantCollection.WarmUp is called

--

-

Reproduction steps:
1. Open the attached project "ReproProj" with the Android Platform
2. Build And Run on an Android device
3. In Player click 'set globalMaximumLOD to 100'
4. Click 'Prewarm Shaders', observe the text in the window: Shader Cache Count: 11, and remember the time
5. Kill the app
6. Run the app
7. Click 'set globalMaximumLOD to 250'
8. Click 'Prewarm Shaders'
9. Observe the text

Expected result: When Shader.globalMaximumLOD is set to 250 and ShaderVariantCollection.WarmUp is called, only the SubShader with LOD 250 is compiled
Actual result: When Shader.globalMaximumLOD is set to 250 and ShaderVariantCollection.WarmUp is called, SubShader with LOD 100 and LOD 250 is compiled

Reproducible with: 2020.3.47f1, 2021.3.22f1, 2022.2.16f1, 2023.1.0b11, 2023.2.0a11

Reproducible with devices:
VLNQA00332, Samsung Galaxy XCover4 (SM-G390F), Android 9, CPU: Exynos 7 Quad 7570, GPU: Mali-T720
VLNQA00325, Samsung Galaxy Note10 (SM-N970F), Android 12, CPU: NOT FOUND, GPU: Mali-G76
VLNQA00318, Oneplus OnePlus 7 Pro (GM1913), Android 11, CPU: Snapdragon 855 SM8150, GPU: Adreno (TM) 640
VLNQA00231, Samsung Galaxy A5(2017) (SM-A520F), Android 8.0.0, CPU: Exynos 7 Octa 7880, GPU: Mali-T830
VLNQA00231, Huawei HUAWEI Mate 20 Pro (LYA-L29), Android 9, CPU: HiSilicon Kirin 980, GPU: Mali-G76

Testing environment: Windows 10 Enterprise 21H2

Notes:

* Results:
Version | LOD 100 Time | LOD 100 Shader Cache Count | LOD 250 Time | LOD 250 Shader Cache Count
2020.3.47f1 | 282.4ms | 11 | 425.4ms | 23
2021.3.22f1 | 289.4ms | 11 | 408.6ms | 23
2022.2.16f1 | 256.5ms | 11 | 429.9 ms | 23
2023.1.0b11 | 275.2ms | 11 | 420.8 ms | 23
2023.2.0a11 | 269.7ms | 11 | 402.2 ms | 23

  1. Resolution Note:

    The setting specifies the maximum LOD value, so all subshaders with LOD up to the maximum LOD are prewarmed.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.