-
Notifications
You must be signed in to change notification settings - Fork 809
Closed
Labels
Description
Description
Follow-up from #6041 (comment)
This invalid usage of GetAttributeAtVertex fails at validation rather than providing a useful error message.
Steps to Reproduce
dxc -T ps_6_0 -spirv
float main() : SV_Target
{
return GetAttributeAtVertex(0, 0);
}
Actual Behavior
SPIR-V compilation fails with a validation error message:
fatal error: generated SPIR-V is invalid: The Base <id> '7[%int_0]' in OpAccessChain instruction must be a pointer.
%14 = OpAccessChain %_ptr_Function_int %int_0 %uint_0
DXIL fails with:
<source>:6:10: error: attribute evaluation can only be done on values taken directly from inputs.
return GetAttributeAtVertex(0, 0);
^
The SPIR-V backend should produce a similarly helpful error message.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Triaged