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
Possible incorrect handling of texture arrays in GLSL #4537
Comments
The initial implementation didn't cover all frontends (only the wgsl one). See gfx-rs/naga#1845 (comment) and #4313. |
Just to confirm that I hit this in real-world code, which manifests as a panic on some
Original WGSL code which got translated had: @group(0) @binding(13) var diffuse_environment_maps: binding_array<texture_cube<f32>, 8u>; |
The problem you're hitting is a different one than the original issue. OpenGL doesn't support binding arrays, so we can't actually emit glsl for that binding. |
Oh sorry, I mixed texture arrays and binding arrays, wrong issue my bad. |
I want to note the original issue is using binding arrays - this is just a GLSL frontend issue (we accept vulkan flavored glsl) whereas you're having a backend issue (we output OpenGL flavored glsl). OpenGL flavor glsl doesn't support binding arrays. |
Should I open a separate one for the fact the code reaches an |
I'm using naga to create a module out of the following frgment shader:
If I inspect the resulting module, the type of the global variable named "glyphTexutures" is:
According to the documentation, it looks like my type inner should be
TypeInner::BindingArray
rather thanArray
, right?The text was updated successfully, but these errors were encountered: