[webkit-changes] [WebKit/WebKit] 6b4e56: [WGSL] Only emit packed types for vec3

Tadeu Zagallo noreply at github.com
Tue Jun 13 01:38:10 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6b4e5694a4ba244418f46b9fdeee81184d1494df
      https://github.com/WebKit/WebKit/commit/6b4e5694a4ba244418f46b9fdeee81184d1494df
  Author: Tadeu Zagallo <tzagallo at apple.com>
  Date:   2023-06-13 (Tue, 13 Jun 2023)

  Changed paths:
    M Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp
    M Source/WebGPU/WGSL/tests/valid/packing.wgsl

  Log Message:
  -----------
  [WGSL] Only emit packed types for vec3
https://bugs.webkit.org/show_bug.cgi?id=257961
rdar://110646983

Reviewed by Myles C. Maxfield.

The size and alignment for the metal vectors of size 2 and 4 match the WGSL spec,
so there's no need to use packed types, as it would only unnecessarily result in
more code for pack/unpack calls.

* Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp:
(WGSL::Metal::FunctionDefinitionWriter::visit):
* Source/WebGPU/WGSL/tests/valid/packing.wgsl:

Canonical link: https://commits.webkit.org/265111@main




More information about the webkit-changes mailing list