-
Notifications
You must be signed in to change notification settings - Fork 718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attributes read via GetAttributeAtVertex
aren't counted as read in the signature
#5417
Comments
There is some nuance here. The actual values of color are not being used rather the variable is being used to access the 0th barycentric value. I don't know necessarily if that would cause a problem here. @damyanp, did you encounter a specific bug from this? @tex3d, do you think this is a problem or working as intended? |
If backend only depends on the value of used to decide which ps input is required, that will be a problem. If backend collects the information when lower attributeAtVertex and loadInput, things should be fine. |
This was reported by a developer who wants to use reflection to determine which vertex attributes are actually used by a shader after dead code has been eliminated. |
I think this is a legitimate bug - we should be including this operation when computing the usage mask. These masks are used when validating inter-stage signature linkage, so if the input appears unused, it would appear that the corresponding output from the upstream shader does not need to be written. That doesn't sound like the right behavior. |
Description
Steps to Reproduce
With above shader the generated assembly shows the input signature. When compiled without extra defines, it reports:
When compiled with
-DUSE_GET_ATTRIBUTE_AT_VERTEX
it shows:My expectation here is that COLOR would show as used in both cases.
Environment
The text was updated successfully, but these errors were encountered: