Bug 264208
Summary: | [WGSL] Generated switch statements are missing 'break' after each case | ||
---|---|---|---|
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: | Other | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Mike Wyrzykowski
[WGSL] Generated switch statements are missing 'break' after each case
Inspect our metal output of https://webgpu.github.io/webgpu-samples/samples/bitonicSort#./bitonicCompute.frag.wgsl
The switch statement should have a break after each case, but it does not.
Generated metal:
....
switch (global3.field2) {
case 1:{
vec<unsigned, 2> local8 = function1(parameter9.x, global3.field3);
function0(local8.x, local8.y, global0, global4);
} case 2:{
vec<unsigned, 2> local9 = function2(parameter9.x, global3.field3);
function0(local9.x, local9.y, global0, global4);
} case 3:{
vec<unsigned, 2> local10 = function1(parameter8.x, global3.field3);
function3(local10.x, local10.y, global1, global2);
} case 4:{
vec<unsigned, 2> local11 = function2(parameter8.x, global3.field3);
function3(local11.x, local11.y, global1, global2);
} default:{
}
...
each 'case' statement should have a break at the end of it
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/117947313>
Tadeu Zagallo
Pull request: https://github.com/WebKit/WebKit/pull/20099
EWS
Committed 270327@main (a431b35bc795): <https://commits.webkit.org/270327@main>
Reviewed commits have been landed. Closing PR #20099 and removing active labels.