RESOLVED FIXED 201212
[WHLSL] Matrices need to have correct alignment
https://bugs.webkit.org/show_bug.cgi?id=201212
Summary [WHLSL] Matrices need to have correct alignment
Myles C. Maxfield
Reported 2019-08-27 19:44:02 PDT
[WHLSL] Matrices need to have 16-byte alignment
Attachments
Needs tests (1.76 KB, patch)
2019-08-27 19:44 PDT, Myles C. Maxfield
no flags
Test (5.99 KB, text/html)
2019-08-27 23:31 PDT, Myles C. Maxfield
no flags
Patch (9.67 KB, patch)
2019-08-28 09:56 PDT, Myles C. Maxfield
no flags
Patch (10.85 KB, patch)
2019-08-28 10:06 PDT, Myles C. Maxfield
no flags
Patch (11.06 KB, patch)
2019-08-28 10:08 PDT, Myles C. Maxfield
rmorisset: review+
Myles C. Maxfield
Comment 1 2019-08-27 19:44:17 PDT
Created attachment 377418 [details] Needs tests
Myles C. Maxfield
Comment 2 2019-08-27 23:31:00 PDT
Myles C. Maxfield
Comment 3 2019-08-28 09:56:34 PDT
Myles C. Maxfield
Comment 4 2019-08-28 10:06:56 PDT
Myles C. Maxfield
Comment 5 2019-08-28 10:08:10 PDT
Robin Morisset
Comment 6 2019-08-28 10:49:28 PDT
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).
Myles C. Maxfield
Comment 7 2019-08-28 12:46:51 PDT
Radar WebKit Bug Importer
Comment 8 2019-08-28 12:47:15 PDT
Note You need to log in before you can comment on or make changes to this bug.