[webkit-reviews] review granted: [Bug 201212] [WHLSL] Matrices need to have correct alignment : [Attachment 377457] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 28 10:49:28 PDT 2019


Robin Morisset <rmorisset at apple.com> has granted Myles C. Maxfield
<mmaxfield at apple.com>'s request for review:
Bug 201212: [WHLSL] Matrices need to have correct alignment
https://bugs.webkit.org/show_bug.cgi?id=201212

Attachment 377457: Patch

https://bugs.webkit.org/attachment.cgi?id=377457&action=review




--- Comment #6 from Robin Morisset <rmorisset at apple.com> ---
Comment on attachment 377457
  --> https://bugs.webkit.org/attachment.cgi?id=377457
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).


More information about the webkit-reviews mailing list