[WHLSL] Matrices need to have 16-byte alignment
Created attachment 377418 [details] Needs tests
Created attachment 377431 [details] Test
Created attachment 377453 [details] Patch
Created attachment 377456 [details] Patch
Created attachment 377457 [details] Patch
Comment on attachment 377457 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=377457&action=review r=me > Source/WebCore/ChangeLog:8 > + Matrices have particular alignment requirements and size requirements. Maybe document these requirements here? > Source/WebCore/Modules/webgpu/WHLSL/Metal/WHLSLNativeTypeWriter.cpp:125 > + unsigned alignment = 16; maybe "const unsigned alignment = columns == 2 ? 8 : 16;" ? I was a bit surprised that for columns == 2 the if changes alignment, while for columns = 3 it does something completely different. Not having the visual parallelism might make it clearer to someone skimming through (on top of being slightly shorter).
Committed r249214: <https://trac.webkit.org/changeset/249214>
<rdar://problem/54803557>