Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7990584a04b5ad76b25788656433ac5693c4db7c
      
https://github.com/WebKit/WebKit/commit/7990584a04b5ad76b25788656433ac5693c4db7c
  Author: Tadeu Zagallo <[email protected]>
  Date:   2023-10-17 (Tue, 17 Oct 2023)

  Changed paths:
    M Source/WebGPU/WGSL/API.h
    M Source/WebGPU/WGSL/GlobalVariableRewriter.cpp
    M Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp
    M Source/WebGPU/WebGPU/ComputePassEncoder.mm
    M Source/WebGPU/WebGPU/RenderPassEncoder.mm

  Log Message:
  -----------
  [WGSL] Buffer dynamic offsets are not implemented
https://bugs.webkit.org/show_bug.cgi?id=262135
rdar://116073820

Reviewed by Mike Wyrzykowski.

Add support for dynamic offsets. The implementation is rather simple, since we
materialize all the globals at the begining of each entry point, we just apply
the offset during as part of the materialization and the rest of the program
remains unchanged.

* Source/WebGPU/WGSL/API.h:
(WGSL::vertexBufferIndexForBindGroup):
* Source/WebGPU/WGSL/GlobalVariableRewriter.cpp:
(WGSL::RewriteGlobalVariables::getPacking):
(WGSL::RewriteGlobalVariables::visitEntryPoint):
(WGSL::RewriteGlobalVariables::collectDynamicOffsetGlobals):
(WGSL::RewriteGlobalVariables::insertParameters):
(WGSL::RewriteGlobalVariables::insertMaterializations):
(WGSL::RewriteGlobalVariables::readVariable):
(WGSL::RewriteGlobalVariables::dynamicOffsetVariableName):
* Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp:
(WGSL::Metal::serializeAddressSpace):
(WGSL::Metal::FunctionDefinitionWriter::visit):
(WGSL::Metal::emitDynamicOffset):
* Source/WebGPU/WebGPU/ComputePassEncoder.mm:
(WebGPU::ComputePassEncoder::executePreDispatchCommands):
* Source/WebGPU/WebGPU/RenderPassEncoder.mm:
(WebGPU::RenderPassEncoder::executePreDrawCommands):

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


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

Reply via email to