-
Notifications
You must be signed in to change notification settings - Fork 91
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
Clspv crashes compiling code writing to structs with varying size fields. #1166
Comments
I should add, Clang 17 pre-compiles these fine, as in #1142 The bug is in Clspv Vulkan conversion even when given the pre-compiled ll file. |
If the bigger type is a struct, we need to make sure that all its fields are bigger or equal to the type selected to return. Otherwise, return the smaller type amongst the field of the structure. This fix ends up generating vector of 1 element. Fix getSPIRVConstant and getSPIRVType to avoid generating vector of 1 element as it is not allowed in SPIRV-V. Fix google#1166
Thank you for the bug report. |
If the bigger type is a struct, we need to make sure that all its fields are bigger or equal to the type selected to return. Otherwise, return the smaller type amongst the field of the structure. This fix ends up generating vector of 1 element. Fix getSPIRVConstant and getSPIRVType to avoid generating vector of 1 element as it is not allowed in SPIRV-V. Fix google#1166
If the bigger type is a struct, we need to make sure that all its fields are bigger or equal to the type selected to return. Otherwise, return the smaller type amongst the field of the structure. This fix ends up generating vector of 1 element. Fix getSPIRVConstant and getSPIRVType to avoid generating vector of 1 element as it is not allowed in SPIRV-V. Fix #1166
With previous GPU technologies, direct access to complex structures in memory never worked right. So we had to implement intricate serialization to replicate objects. But here it is, you proved this can work, after fixing this bug! So good to see Clspv back on track, leading the pack. Thank you Mr. Jodin and Mr. Baker! |
godbolt.org/z/533he8K96
The text was updated successfully, but these errors were encountered: