microsoft / microsoft/DirectXShaderCompiler
Attributes read via `GetAttributeAtVertex` aren't counted as read in the signature
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 3.7k
- Forks
- 900
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 44
Description
Description
float4 VCMain(
nointerpolation float4 Color:COLOR0)
: SV_TARGET0
{
#ifdef USE_GET_ATTRIBUTE_AT_VERTEX
return GetAttributeAtVertex(Color,0);
#endif
return Color;
}
Steps to Reproduce
With above shader the generated assembly shows the input signature. When compiled without extra defines, it reports:
; Input signature:
;
; Name Index Mask Register SysValue Format Used
; -------------------- ----- ------ -------- -------- ------- ------
; COLOR 0 xyzw 0 NONE float xyzw
When compiled with -DUSE_GET_ATTRIBUTE_AT_VERTEX it shows:
; Input signature:
;
; Name Index Mask Register SysValue Format Used
; -------------------- ----- ------ -------- -------- ------- ------
; COLOR 0 xyzw 0 NONE float
My expectation here is that COLOR would show as used in both cases.
Environment
- dxcompiler.dll: 1.7 - 1.7.2212.40 (e043f4a12); dxil.dll: 1.7(101.7.2212.36)
- Windows 11
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 with the VCMain shader and reproduce the generated input signatures with and without USE_GET_ATTRIBUTE_AT_VERTEX. Trace how GetAttributeAtVertex contributes to signature usage, then verify that COLOR is marked used in both assembly outputs. The payload does not name a source file or test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100