[webkit-changes] [WebKit/WebKit] c82031: [WebGPU] Buffer dynamic offsets are not implemented (
mwyrzykowski
noreply at github.com
Fri Sep 29 20:49:05 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c82031ffbbcbcc0b383b95d87c0fe0c6aa5e3fb4
https://github.com/WebKit/WebKit/commit/c82031ffbbcbcc0b383b95d87c0fe0c6aa5e3fb4
Author: Mike Wyrzykowski <mwyrzykowski at apple.com>
Date: 2023-09-29 (Fri, 29 Sep 2023)
Changed paths:
M Source/WebGPU/WGSL/WGSL.h
M Source/WebGPU/WebGPU/BindGroupLayout.h
M Source/WebGPU/WebGPU/BindGroupLayout.mm
M Source/WebGPU/WebGPU/ComputePassEncoder.h
M Source/WebGPU/WebGPU/ComputePassEncoder.mm
M Source/WebGPU/WebGPU/ComputePipeline.h
M Source/WebGPU/WebGPU/ComputePipeline.mm
M Source/WebGPU/WebGPU/Device.h
M Source/WebGPU/WebGPU/Device.mm
M Source/WebGPU/WebGPU/PipelineLayout.h
M Source/WebGPU/WebGPU/PipelineLayout.mm
M Source/WebGPU/WebGPU/RenderBundleEncoder.h
M Source/WebGPU/WebGPU/RenderBundleEncoder.mm
M Source/WebGPU/WebGPU/RenderPassEncoder.h
M Source/WebGPU/WebGPU/RenderPassEncoder.mm
M Source/WebGPU/WebGPU/RenderPipeline.h
M Source/WebGPU/WebGPU/RenderPipeline.mm
M Source/WebGPU/WebGPU/ShaderModule.mm
Log Message:
-----------
[WebGPU] Buffer dynamic offsets are not implemented (
https://bugs.webkit.org/show_bug.cgi?id=262067
<radar://116013294>
Reviewed by Tadeu Zagallo.
Encode the dynamic offsets which are needed by the bind group layout
and pass it to the WGSL::BindGroupLayout.
* Source/WebGPU/WGSL/WGSL.h:
* Source/WebGPU/WebGPU/BindGroupLayout.h:
(WebGPU::BindGroupLayout::create):
(WebGPU::BindGroupLayout::entries const):
Add optional dynamic offsets.
* Source/WebGPU/WebGPU/BindGroupLayout.mm:
(WebGPU::createArgumentDescriptor):
(WebGPU::Device::createBindGroupLayout):
(WebGPU::BindGroupLayout::BindGroupLayout):
(WebGPU::BindGroupLayout::sizeOfVertexDynamicOffsets const):
(WebGPU::BindGroupLayout::sizeOfFragmentDynamicOffsets const):
(WebGPU::BindGroupLayout::sizeOfComputeDynamicOffsets const):
Compute space for the dynamic offsets.
* Source/WebGPU/WebGPU/ComputePassEncoder.h:
* Source/WebGPU/WebGPU/ComputePassEncoder.mm:
(WebGPU::ComputePassEncoder::executePreDispatchCommands):
(WebGPU::ComputePassEncoder::dispatch):
(WebGPU::ComputePassEncoder::dispatchIndirect):
(WebGPU::ComputePassEncoder::setBindGroup):
(WebGPU::ComputePassEncoder::setPipeline):
Set the side buffer prior to executing any draw commands.
* Source/WebGPU/WebGPU/ComputePipeline.h:
* Source/WebGPU/WebGPU/ComputePipeline.mm:
(WebGPU::ComputePipeline::pipelineLayout const):
Allow access to the pipeline layout.
* Source/WebGPU/WebGPU/Device.h:
* Source/WebGPU/WebGPU/Device.mm:
(WebGPU::Device::maxBuffersPlusVertexBuffersForVertexStage const):
(WebGPU::Device::maxBuffersForFragmentStage const):
(WebGPU::Device::maxBuffersForComputeStage const):
Encode the side buffer offsets in the last available buffer.
* Source/WebGPU/WebGPU/PipelineLayout.h:
* Source/WebGPU/WebGPU/PipelineLayout.mm:
(WebGPU::Device::createPipelineLayout):
(WebGPU::addInitialOffset):
(WebGPU::PipelineLayout::PipelineLayout):
(WebGPU::returnTotalSize):
(WebGPU::PipelineLayout::sizeOfVertexDynamicOffsets const):
(WebGPU::PipelineLayout::sizeOfFragmentDynamicOffsets const):
(WebGPU::PipelineLayout::sizeOfComputeDynamicOffsets const):
(WebGPU::returnOffsetOfGroup0):
(WebGPU::PipelineLayout::vertexOffsetForBindGroup const):
(WebGPU::PipelineLayout::fragmentOffsetForBindGroup const):
(WebGPU::PipelineLayout::computeOffsetForBindGroup const):
(WebGPU::PipelineLayout::offsetVectorForBindGroup):
(WebGPU::PipelineLayout::vertexOffsets):
(WebGPU::PipelineLayout::fragmentOffsets):
(WebGPU::PipelineLayout::computeOffsets):
Add member functions for populating the dynamic offsets specified by setBindGroup
* Source/WebGPU/WebGPU/RenderBundleEncoder.h:
* Source/WebGPU/WebGPU/RenderBundleEncoder.mm:
(WebGPU::RenderBundleEncoder::executePreDrawCommands):
(WebGPU::RenderBundleEncoder::setBindGroup):
(WebGPU::RenderBundleEncoder::setPipeline):
To be implemented in https://bugs.webkit.org/show_bug.cgi?id=262208
* Source/WebGPU/WebGPU/RenderPassEncoder.h:
* Source/WebGPU/WebGPU/RenderPassEncoder.mm:
(WebGPU::RenderPassEncoder::executePreDrawCommands):
(WebGPU::RenderPassEncoder::draw):
(WebGPU::RenderPassEncoder::drawIndexed):
(WebGPU::RenderPassEncoder::drawIndexedIndirect):
(WebGPU::RenderPassEncoder::drawIndirect):
(WebGPU::RenderPassEncoder::setBindGroup):
(WebGPU::RenderPassEncoder::setPipeline):
Same as ComputePassEncoder.
* Source/WebGPU/WebGPU/RenderPipeline.h:
* Source/WebGPU/WebGPU/RenderPipeline.mm:
(WebGPU::RenderPipeline::pipelineLayout const):
Allow access to the pipeline layout.
* Source/WebGPU/WebGPU/ShaderModule.mm:
(WebGPU::Device::createShaderModule):
(WebGPU::ShaderModule::convertPipelineLayout):
Pass the dynamic offsets to WGSL.
Canonical link: https://commits.webkit.org/268689@main
More information about the webkit-changes
mailing list