[all-commits] [llvm/llvm-project] 3e4e36: [DirectX] Fix shader flag version-checking logic t...
Deric C. via All-commits
all-commits at lists.llvm.org
Fri Apr 25 11:21:49 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3e4e365fac0503d9fcd9bb34ee1c27bf17d95e3a
https://github.com/llvm/llvm-project/commit/3e4e365fac0503d9fcd9bb34ee1c27bf17d95e3a
Author: Deric C. <cheung.deric at gmail.com>
Date: 2025-04-25 (Fri, 25 Apr 2025)
Changed paths:
M llvm/lib/Target/DirectX/DXILShaderFlags.cpp
R llvm/test/CodeGen/DirectX/ShaderFlags/max-64-uavs-array-sm6_5.ll
R llvm/test/CodeGen/DirectX/ShaderFlags/max-64-uavs-array-sm6_6.ll
A llvm/test/CodeGen/DirectX/ShaderFlags/max-64-uavs-array-valver1.5.ll
A llvm/test/CodeGen/DirectX/ShaderFlags/max-64-uavs-array-valver1.6.ll
M llvm/test/CodeGen/DirectX/ShaderFlags/max-64-uavs.ll
M llvm/test/CodeGen/DirectX/ShaderFlags/res-may-alias-0.ll
R llvm/test/CodeGen/DirectX/ShaderFlags/res-may-not-alias-shadermodel6.6.ll
R llvm/test/CodeGen/DirectX/ShaderFlags/res-may-not-alias-shadermodel6.7.ll
R llvm/test/CodeGen/DirectX/ShaderFlags/res-may-not-alias-shadermodel6.8.ll
A llvm/test/CodeGen/DirectX/ShaderFlags/res-may-not-alias-sm6.6.ll
A llvm/test/CodeGen/DirectX/ShaderFlags/res-may-not-alias-sm6.7.ll
A llvm/test/CodeGen/DirectX/ShaderFlags/res-may-not-alias-valver1.8.ll
A llvm/test/CodeGen/DirectX/ShaderFlags/use-native-low-precision-0.ll
A llvm/test/CodeGen/DirectX/ShaderFlags/use-native-low-precision-1.ll
R llvm/test/CodeGen/DirectX/ShaderFlags/use-native-low-precision.ll
Log Message:
-----------
[DirectX] Fix shader flag version-checking logic to match DXC (#136787)
This PR primarily fixes the version-checking logic of the shader flags
`ResMayNotAlias` and `Max64UAVs` to correctly match DXC's behavior.
Primary changes:
- The logic for determining the presence of UAVs for the
`ResMayNotAlias` shader flag checked against the DXIL Version when it
should have been checking against the DXIL Validator Version. (See DXC:
[DxilShaderFlags.cpp#L484](https://github.com/microsoft/DirectXShaderCompiler/blob/f19b5da54170210e3cbc7f080be3f080abc52505/lib/DXIL/DxilShaderFlags.cpp#L484))
- The logic for counting UAVs for the `Max64UAVs` shader flag checked
against the DXIL Version when it should have been checking against the
DXIL Validator Version. (See DXC:
[DxilModule.cpp#L327](https://github.com/microsoft/DirectXShaderCompiler/blob/f19b5da54170210e3cbc7f080be3f080abc52505/lib/DXIL/DxilModule.cpp#L327))
- Tests have been modified to test the corrected behaviors for these two
flags
Additional changes included for consistency:
- The logic for setting `UseNativeLowPrecision` now checks against
Shader Model version instead of DXIL version to be consistent with the
code comments from DXC
([DxilShaderFlags.h#L280](https://github.com/microsoft/DirectXShaderCompiler/blob/f19b5da54170210e3cbc7f080be3f080abc52505/include/dxc/DXIL/DxilShaderFlags.h#L280)).
- An additional test has been added to ensure that the module flag
"dx.nativelowprec" set to 0 does not apply the `UseNativeLowPrecision`
shader flag
- Related shader flag tests were renamed to be more consistent, and some
comments were edited for clarification
- Add obj2yaml tests for the `Max64UAVs` shader flag
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list