-
Notifications
You must be signed in to change notification settings - Fork 205
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
WGSL target doesn't increase location id for attributes #5633
Comments
That seems to be a bug in Slang. |
Yes, this is a known problem and we are working to address this issue. |
Interestingly, the issue of repeated locations seems to only happen to stage inputs.
Resulting WGSL vertex shader (notice repeated/incrementing location index in input/output):
Resulting WGSL fragment shader (notice repeated location index in input):
|
I created a small fix that seems to fix the repeated input location issue: #5642 Input with explicit semantics:
Output vertex:
Output fragment:
That still doesn't fix the issue where there is no location attribute generated in case no semantics are specified... working on that now. |
Helps to address issue shader-slang#5633.
This verifies part of issue shader-slang#5633.
This verifies part of issue shader-slang#5633.
Simple rasterization pipeline shader doesn't increase the location id for the different inputs.
Output:
I would expect the location ids inside
VertexInput_0
to increase, soposition_1
has@location(0)
whilecolor_1
has@location(1)
.Have already tried playing with the semantics defined, renaming them, but the output remains the same.
As per the documentation inside "WGSL specific functionalities":
I would believe they shouldn't even need a user defined semantics.
But if I remove the defined semantics I get the following result:
generated:
Where the attributes inside
VertexInput_0
no longer generate@location
.First time diving into slang so I might be missing something.
Commit: fdf061e
OS: Linux
The text was updated successfully, but these errors were encountered: