microsoft / DirectXShaderCompiler

This repo hosts the source for the DirectX Shader Compiler which is based on LLVM/Clang.
Other
3.06k stars 677 forks source link

Fix a PIX pass's attempt to set the validator version #6707

Closed jeffnn closed 3 months ago

jeffnn commented 3 months ago

This pass was attempting to compare different things. The return values of GetDxilVersion are not shader models, but... dxil version. Since the code is trying to upgrade the validator version, I changed this to GetValidatorVersion, to pair with SetValidatorVersion. The previous code was breaking the nvidia driver on workgraphs.

github-actions[bot] commented 3 months ago

:white_check_mark: With the latest revision this PR passed the C/C++ code formatter.

jeffnn commented 3 months ago

Though I also don't understand the reasoning, the code and tests look correct. Although I would personally put a blurb on top of each test specifying why each test exists. (Like for example, in validatorNoDowngrade, "This test tests that a shader with dxil validator version of 1.8 does not downgrade to 1.4" and for validatorUpgrade "This test tests that a shader with dxil validator version of 1.3 gets upgraded to 1.4 after the annotate with virtual regs pass.")

Good idea. Your comment suggestions used, almost verbatim