[webkit-changes] [WebKit/WebKit] 8cb609: [WGSL] Fix failing wgslc tests

Tadeu Zagallo noreply at github.com
Wed May 22 11:13:55 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8cb609477c197cfc25fd66fab6f51b7017c7e8dd
      https://github.com/WebKit/WebKit/commit/8cb609477c197cfc25fd66fab6f51b7017c7e8dd
  Author: Tadeu Zagallo <tzagallo at apple.com>
  Date:   2024-05-22 (Wed, 22 May 2024)

  Changed paths:
    M Source/WebGPU/WGSL/AST/ASTForward.h
    M Source/WebGPU/WGSL/AST/ASTParameter.h
    M Source/WebGPU/WGSL/AST/ASTVariable.h
    M Source/WebGPU/WGSL/GlobalVariableRewriter.cpp
    M Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp
    M Source/WebGPU/WGSL/WGSLShaderModule.h
    M Source/WebGPU/WGSL/tests/valid/packing.wgsl

  Log Message:
  -----------
  [WGSL] Fix failing wgslc tests
https://bugs.webkit.org/show_bug.cgi?id=274479
rdar://128485179

Reviewed by Mike Wyrzykowski.

There were 2 issues after 278991 at main:
- we emitted definitions for `__unpack(PackedVec3)` even when we didn't emit
  the PackedVec3 struct
- in a previous patch we tried skipping some explicit pack/unpack calls for
  vec3/packed_vec3, but that doesn't work for PackedVec3, so we can no longer
  skip these calls.

* Source/WebGPU/WGSL/AST/ASTForward.h:
* Source/WebGPU/WGSL/AST/ASTParameter.h:
* Source/WebGPU/WGSL/AST/ASTVariable.h:
* Source/WebGPU/WGSL/GlobalVariableRewriter.cpp:
(WGSL::RewriteGlobalVariables::visitCallee):
(WGSL::RewriteGlobalVariables::visit):
(WGSL::RewriteGlobalVariables::pack):
(WGSL::RewriteGlobalVariables::packStructResource):
(WGSL::RewriteGlobalVariables::packArrayResource):
(WGSL::RewriteGlobalVariables::insertMaterializations):
* Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp:
(WGSL::Metal::FunctionDefinitionWriter::emitNecessaryHelpers):
(WGSL::Metal::FunctionDefinitionWriter::visit):
(WGSL::Metal::FunctionDefinitionWriter::shouldPackType const):
(WGSL::Metal::FunctionDefinitionWriter::emitPackedVector):
(WGSL::Metal::FunctionDefinitionWriter::serializeVariable):
* Source/WebGPU/WGSL/WGSLShaderModule.h:
(WGSL::ShaderModule::usesPackVector const):
(WGSL::ShaderModule::setUsesPackVector):
(WGSL::ShaderModule::clearUsesPackVector):
(WGSL::ShaderModule::usesUnpackVector const):
(WGSL::ShaderModule::setUsesUnpackVector):
(WGSL::ShaderModule::clearUsesUnpackVector):
* Source/WebGPU/WGSL/tests/valid/packing.wgsl:

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list