Hash :
0af9aa03
Author :
Date :
2022-08-30T22:24:21
use proper TPrecision when creating TType
Overview
Using "EbpUndefined" when create the inputAttachmentType(TType) causes
the maximum precision in SPIR-V. The maximum precision is not required
and may degrade performance. This CL makes the creation using a
proper precision based on declared variables.
Tests
===== confirm the precision in SPIRV =====
- Using genshin_impact trace to verify
- Using RenderDoc
- Executable Path: com.android.angle.test/#DefaultActivity
- Intent Argument: -e org.chromium.native_test.NativeTest.StdoutFile
/sdcard/chromium_tests_root/out.txt -e
org.chromium.native_test.NativeTest.CommandLineFlags
"--gtest_filter=TracePerfTest.Run/vulkan_genshin_impact"
- Capture frame 9 with the drivers built with and without CL.
- Magically found one vkCmdDrawIndexed(396, 1) that "TextureViewer" has
"ANGLEInputAttachment" as inputs. In "Pipeline State", the "FS" uses
shader module 9556
- then compare the shader module 9556 sources from the 2 drivers.
Confirmed the differences:
- GLSL (SPIRV-Cross): https://screenshot.googleplex.com/A8gWMGR2EmnZwHv.png
- SPIR-V (RenderDoc):
https://screenshot.googleplex.com/5yqKc4pWL3qLaEj.png
Bug: angleproject:7281
Change-Id: I86b315ddf057325638e58d5a0d7f8b203d8b74f8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3866573
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Solti Ho <solti@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>