-
Notifications
You must be signed in to change notification settings - Fork 845
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
Incorrect SPIRV codegen for 8bit/16bit variables in buffers #3607
Comments
Yeah that definitely isn't valid SPIR-V, I'll take a look. Interestingly this seems to be the one cast that isn't currently covered by our unit tests. |
@alelenv, how did you compiled your shader?
The test.frag contains the shader you embedded into your first messaged in this issue. |
@ravi688 You can use the |
Inspecting the code in Why can't we just use the following set of instructions?
I believe Also, the following (vulkan) GLSL code:
translates to the following SPIR-V instructions:
Why are we using Is there anything which I'm not aware of just in case it is all right extracting and constructing again? |
…esponding 32-bit types first - this fixes KhronosGroup#3607 - and this also fixes assertion failure in the PR KhronosGroup#3628 - this change emits appropriate Op{S|U}Convert instructions instead of OpCompositeExtract followed by OpCompositeConstruct for 8/16-bit integer types.
Raise a PR #3631 which fixes this issue. |
For the following simple shader
We see some weird codegen when loading members from UBO and doing a convert
OpCompositeExtract tried to extract as 'int' when %20 is a vector of i16/shorts
The text was updated successfully, but these errors were encountered: