RESOLVED FIXED 199424
[WHLSL] Change whlsl-two-dimensional-array.html to not be flaky on AMD Radeon Pro GPUs
https://bugs.webkit.org/show_bug.cgi?id=199424
Summary [WHLSL] Change whlsl-two-dimensional-array.html to not be flaky on AMD Radeon...
Saam Barati
Reported 2019-07-02 15:29:03 PDT
...
Attachments
patch (2.41 KB, patch)
2019-07-02 15:43 PDT, Saam Barati
no flags
Saam Barati
Comment 1 2019-07-02 15:29:50 PDT
See <rdar://problem/52545976> The metal reduction is: ``` #include <metal_stdlib> #include <metal_atomic> #include <metal_math> #include <metal_relational> #include <metal_compute> #include <metal_texture> using namespace metal; typedef array<float, 10> BaseArray; typedef array<BaseArray, 5> ParentArray; struct WrapperStruct { ParentArray parentArray; uint outerIndex; BaseArray baseArray; uint index; }; struct InputStruct { device int32_t* ptr [[id(0)]]; uint2 structureElement20 [[id(1)]]; }; kernel void computeShader(device int32_t* ptr) { WrapperStruct wrapperStruct = { 0 }; wrapperStruct.parentArray = { 0 }; wrapperStruct.outerIndex = 0; for (; wrapperStruct.outerIndex < wrapperStruct.parentArray.size(); ++wrapperStruct.outerIndex) { wrapperStruct.baseArray = { 0 }; for (unsigned j = 0; j < wrapperStruct.baseArray.size(); ++j) { wrapperStruct.baseArray[j] = wrapperStruct.outerIndex; } wrapperStruct.parentArray[wrapperStruct.outerIndex] = wrapperStruct.baseArray; } wrapperStruct.outerIndex = 0; for (; wrapperStruct.outerIndex < wrapperStruct.parentArray.size(); wrapperStruct.outerIndex++) { wrapperStruct.baseArray = wrapperStruct.parentArray[wrapperStruct.outerIndex]; wrapperStruct.index = 0; for ( ; wrapperStruct.index < wrapperStruct.baseArray.size(); wrapperStruct.index += 1) { if (wrapperStruct.baseArray[wrapperStruct.index] != wrapperStruct.outerIndex) { *ptr = 42; return; } } } *ptr = 1; } ``` *ptr should be 1, but is 42.
Saam Barati
Comment 2 2019-07-02 15:43:28 PDT
Myles C. Maxfield
Comment 3 2019-07-02 16:13:58 PDT
Comment on attachment 373366 [details] patch 🤮
WebKit Commit Bot
Comment 4 2019-07-02 16:53:23 PDT
Comment on attachment 373366 [details] patch Clearing flags on attachment: 373366 Committed r247081: <https://trac.webkit.org/changeset/247081>
WebKit Commit Bot
Comment 5 2019-07-02 16:53:24 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 6 2019-07-02 16:54:15 PDT
Note You need to log in before you can comment on or make changes to this bug.