You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[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
0 commit comments