Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fb776403dad825e8a62e236e9067cb555a696ee3
      
https://github.com/WebKit/WebKit/commit/fb776403dad825e8a62e236e9067cb555a696ee3
  Author: Tadeu Zagallo <[email protected]>
  Date:   2023-09-29 (Fri, 29 Sep 2023)

  Changed paths:
    M Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp
    M Source/WebGPU/WGSL/TypeCheck.cpp
    M Source/WebGPU/WGSL/WGSLShaderModule.h
    M Source/WebGPU/WGSL/tests/valid/overload.wgsl

  Log Message:
  -----------
  [WGSL] Add code generation for all synchronization built-in functions
https://bugs.webkit.org/show_bug.cgi?id=262304
rdar://116179474

Reviewed by Mike Wyrzykowski.

Add code generation for storageBarrier, workgroupBarrier and 
workgroupUniformLoad.
The last one requires detecting whether the program actually uses it in order to
emit a helper, which is currently quite hacky, but we don't have a proper way of
tracking whether the built-ins are being called (or a function that shadows 
them),
so that will be improved on a later patch.

* Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp:
(WGSL::Metal::FunctionDefinitionWriter::emitNecessaryHelpers):
(WGSL::Metal::FunctionDefinitionWriter::serializeVariable):
(WGSL::Metal::emitStorageBarrier):
(WGSL::Metal::emitWorkgroupBarrier):
(WGSL::Metal::emitWorkgroupUniformLoad):
(WGSL::Metal::FunctionDefinitionWriter::visit):
* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::visit):
* Source/WebGPU/WGSL/WGSLShaderModule.h:
(WGSL::ShaderModule::usesWorkgroupUniformLoad const):
(WGSL::ShaderModule::setUsesWorkgroupUniformLoad):
(WGSL::ShaderModule::clearUsesWorkgroupUniformLoad):
* Source/WebGPU/WGSL/tests/valid/overload.wgsl:

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to