Skip to content

spirv-val: Print Storage Class in error message #6071

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

Open
spencer-lunarg opened this issue Mar 28, 2025 · 4 comments
Open

spirv-val: Print Storage Class in error message #6071

spencer-lunarg opened this issue Mar 28, 2025 · 4 comments

Comments

@spencer-lunarg
Copy link
Contributor

I basically wanted to add StorageClassToString() found in spirv.hpp11 to some error messages the clear up what the actually error is.

Before I go around adding it (or maybe can update it as a drop in replacement) wanted to know if there is some util somewhere

@alan-baker
Copy link
Contributor

I'm not aware of anything, most places in the validator just write out the storage class when it is very few values or ignore printing it (maybe hoping the disassembly shows it).

@spencer-lunarg
Copy link
Contributor Author

The main issue is the new #5958 check. It really doesn't explain what is wrong and have had a few people ping me (since they hit it when updating VVL) go "so wait, what is the issue, what broke?" and was hoping to have that error spell out what is going on... which led me to realize there was no StorageClass to string to print an error message

@alan-baker
Copy link
Contributor

Is that the right issue? Those checks don't seem like they need a storage class. Did you mean #6012? I could see attaching the storage class it was instantiated for that.

@spencer-lunarg
Copy link
Contributor Author

sorry yes, #6012 - yes, it is not obvious to the user from the error the issue is ArrayStride is required for Uniform or StorageBuffer but then required to not be there for Private.

Also I have a MR up to try and add a VUID to help direct people to the spec text as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants