Skip to content

Attributes read via GetAttributeAtVertex aren't counted as read in the signature #5417

Open
@damyanp

Description

@damyanp

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 (e043f4a); dxil.dll: 1.7(101.7.2212.36)
  • Windows 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug, regression, crashcorrectnessBugs that impact shader correctness

    Type

    No type

    Projects

    Status

    Triaged

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions