[HLSL][RootSignature] Add `COMPARISON_FUNC_NONE` support for static samplers
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
As noted here: https://github.com/microsoft/DirectXShaderCompiler/issues/8246.
We should allow users to specify the `COMPARISON_NONE` enum value of the comparison function. While specifying `COMPARISON_NEVER` is functionally equivalent, the `NONE` enum was added for developer clarity and the `d3d12` header was updated to reflect this change.
As such, we should propagate this forward into clang.
AC:
- [ ] Add enum to `HLSLRootSignautreTokenKinds.def`
- [ ] Update lexing test in `LexHLSLRootSignatureTest.cpp` to include enum
- [ ] Update parsing test in `ParseHLSLRootSignatureTest.cpp` to include enum
- [ ] Add test function to `CodeGenHLSL/RootSignature.hlsl`
- [ ] Add enum to `DXContainerConstants.def`
- [ ] Add `obj2yaml` round-trip test in `ObjectYAML/DXContainer/...` using enum
- [ ] Add a staticsampler to `CodeGen/DirectX/ContainerData/RootSignature-StaticSamplers.ll` using enum
Contributor guide
Research direction
Start with HLSLRootSignautreTokenKinds.def and the lexer and parser tests in LexHLSLRootSignatureTest.cpp and ParseHLSLRootSignatureTest.cpp. Then inspect CodeGenHLSL/RootSignature.hlsl, DXContainerConstants.def, the ObjectYAML/DXContainer round-trip tests, and RootSignature-StaticSamplers.ll. Done means COMPARISON_NONE is accepted, represented in the container, and covered by all listed tests.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers, testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100