Bug 268425
| Summary: | [WGSL] override expressions as array lengths do not compile | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Mike Wyrzykowski <mwyrzykowski> |
| Component: | WebGPU | Assignee: | Tadeu Zagallo <tzagallo> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Mike Wyrzykowski
Running the following CTS test:
https://gpuweb.github.io/cts/standalone/?q=webgpu:api,validation,compute_pipeline:overrides,workgroup_size,limits,workgroup_storage_size:isAsync=true
We see the error:
1 error generated while compiling the shader:
5:45: array count must evaluate to a constant integer expression or override variable
--------------- Shader source ---------------
override a: u32;
override b: u32;
var<workgroup> mat4_data: array<mat4x4<f32>, b>;
@compute @workgroup_size(1) fn main() {
_ = mat4_data[0];
}
--------------- end shader source ---------------
We can use function constants inside the generated metal shading language array length declaration.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/121971104>
Tadeu Zagallo
Pull request: https://github.com/WebKit/WebKit/pull/23972
EWS
Committed 274296@main (2e6c189562a8): <https://commits.webkit.org/274296@main>
Reviewed commits have been landed. Closing PR #23972 and removing active labels.