Open alienself opened 2 weeks ago
Sorry about that. Work deadlines are making me not test thoroughly. I don't know why I didn't add a unit test for that. I'll get it fixed up as soon as I get a chance.
Okay no worries! Let me know when you are able to have a look.
Getting a chance to look at this.
I do have a unit test for that shader code to index an array with uniform. I modified it with this version to index it with a struct member, and it passes. I checked
struct BatchIndex {
index: u32,
}
@group(0) @binding(2) var<uniform> batchIndex: BatchIndex;
@group(0) @binding(3) var<storage, read> batchOffsets: array<u32>;
@vertex
fn main() {
let batchOffset = batchOffsets[batchIndex.index];
}
in the little tester page, https://brendan-duncan.github.io/wgsl_reflect/example.html, and it parsed fine.
This is from the github main branch. Is that what you're testing against?
Hi,
I am seeing the reappearance of the same issue described in the following issue which got fixed: https://github.com/brendan-duncan/wgsl_reflect/issues/52, the binding is not added to the resources array in the program entry.
Workaround but not ideal: