Description
I'm getting a BindGroupLayout with label <Invalid-BindGroupLayout label=<derived>> when calling getBindGroupLayout on GPUComputePipeline.
Expected vs observed behavior
It should create a valid BindGroupLayout without any such label. The same shader is tested on Chrome Canary and works fine (provides a valid BindGroupLayout).
Extra materials
wgpu_trace.zip
Platform

wgpu version: 0.7.0
I'm not able to replay the trace, unfortunately. This was fixed by #1245, which is not a part of v0.7.
I also tried to port hello-compute to use the implicit BGL (see https://github.com/gfx-rs/wgpu-rs/pull/792), and it works fine. So this isn't a problem about compute vs render. It's rather the fact something went wrong with a particular shader you have. Could you attach the shader here, please?
Here's the shader (GLSL, which was compiled to SPIR-V using Glslang). And yeah, it only seems to go wrong with this particular shader.
Thank you! The problem here is that Naga fails to process the shader (because of the barrier instructions), and therefore its bindings are not reflected back to wgpu. Clearly, the error lacks this information.
I filed https://github.com/gfx-rs/naga/issues/583 to fix upstream.
In the meantime, I recommend providing the layout explicitly for this pipeline.
Another shader that has invalid bind group layout..
Providing layout explicitly is not something I can do right now :/
This shader also uses control barriers.
@DjDeveloperr what's the reason for you to not specify the layout?
I'm porting an existing project with not much knowledge about shaders
I see. We'll try to prioritize getting barriers now. It's not going to be available till later next week though.
Any update on this?
Sorry, we got sucked into other tasks :/
Thank you for pinging!
Most helpful comment
I see. We'll try to prioritize getting barriers now. It's not going to be available till later next week though.