microsoft / microsoft/DirectXShaderCompiler
ValidateRootSignatureInContainer fails to pass ValidatorSelection to CreateValidator
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 3.7k
- Forks
- 900
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 44
Description
Description
In dxcutil.cpp, dxcutil::ValidateRootSignatureInContainer fails to pass the hlsl::options::ValidatorSelection SelectValidator parameter through to the CreateValidator call. This results in that call using the ValidatorSelection::Auto value, which will attempt to use the external validator by default and fall back to using internal validator otherwise.
Steps to Reproduce
Found via code inspection.
This could occur when compiling an ordinary shader target with a root signature attribute on the entry, or when compiling directly to a serialized root signature container.
Hypothetical repro scenarios include:
- using
-select-validator internalwhen external validator is present - uses the external validator instead - using
-select-validator externalwhen external validator is not present - should fail withDXC_E_VALIDATOR_MISSING, but uses the internal validator instead
Scenario 2 could be tested by controlling the environment to prevent access to any dxil.dll. Testing scenario 1 might require a special mock dxil.dll test binary that indicates unexpected use of the external validator.
Environment
- DXC version: latest main
- Host Operating System: any
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in tools/clang/tools/dxcompiler/dxcutil.cpp, especially dxcutil::ValidateRootSignatureInContainer and the referenced CreateValidator call. Trace how ValidatorSelection is handled in nearby validator creation paths, then verify that internal and external selections produce the expected behavior described in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100