[webkit-changes] [WebKit/WebKit] 162311: [WebGPU] Render / compute commands should be no-op...

mwyrzykowski noreply at github.com
Mon May 20 22:33:33 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1623111a075f7d416a24f31c74da76388b5129ed
      https://github.com/WebKit/WebKit/commit/1623111a075f7d416a24f31c74da76388b5129ed
  Author: Mike Wyrzykowski <mwyrzykowski at apple.com>
  Date:   2024-05-20 (Mon, 20 May 2024)

  Changed paths:
    M LayoutTests/TestExpectations
    A LayoutTests/fast/webgpu/fuzz-274290-expected.txt
    A LayoutTests/fast/webgpu/fuzz-274290.html
    M Source/WebGPU/WebGPU/CommandEncoder.h
    M Source/WebGPU/WebGPU/CommandEncoder.mm
    M Source/WebGPU/WebGPU/ComputePassEncoder.h
    M Source/WebGPU/WebGPU/ComputePassEncoder.mm
    M Source/WebGPU/WebGPU/RenderPassEncoder.mm

  Log Message:
  -----------
  [WebGPU] Render / compute commands should be no-ops when the command buffer will be discarded
https://bugs.webkit.org/show_bug.cgi?id=274290
<radar://128202440>

Reviewed by Dan Glastonbury.

There was validation logic however it did not take into account
destroyed render targets, which are still valid to call commands
on.

A destroyed render target will result in the command buffer being
discarded when it is submitted, so we can make all the encoding
operations no-ops.

* LayoutTests/TestExpectations:
* LayoutTests/fast/webgpu/fuzz-274290-expected.txt: Added.
* LayoutTests/fast/webgpu/fuzz-274290.html: Added.
Add regression test.

* Source/WebGPU/WebGPU/CommandEncoder.h:
* Source/WebGPU/WebGPU/CommandEncoder.mm:
(WebGPU::CommandEncoder::submitWillBeInvalid const):
* Source/WebGPU/WebGPU/ComputePassEncoder.h:
(WebGPU::ComputePassEncoder::isValid const): Deleted.
* Source/WebGPU/WebGPU/ComputePassEncoder.mm:
(WebGPU::ComputePassEncoder::executePreDispatchCommands):
(WebGPU::ComputePassEncoder::dispatch):
(WebGPU::ComputePassEncoder::runPredispatchIndirectCallValidation):
(WebGPU::ComputePassEncoder::dispatchIndirect):
(WebGPU::ComputePassEncoder::setBindGroup):
(WebGPU::ComputePassEncoder::isValid const):
(WebGPU::ComputePassEncoder::computeCommandEncoder const):
* Source/WebGPU/WebGPU/RenderPassEncoder.mm:
(WebGPU::RenderPassEncoder::beginOcclusionQuery):
(WebGPU::RenderPassEncoder::endOcclusionQuery):
(WebGPU::RenderPassEncoder::errorValidatingAndBindingBuffers):
(WebGPU::RenderPassEncoder::executePreDrawCommands):
(WebGPU::RenderPassEncoder::draw):
(WebGPU::RenderPassEncoder::drawIndexed):
(WebGPU::RenderPassEncoder::drawIndexedIndirect):
(WebGPU::RenderPassEncoder::drawIndirect):
(WebGPU::RenderPassEncoder::executeBundles):
(WebGPU::RenderPassEncoder::renderCommandEncoder const):
(WebGPU::RenderPassEncoder::setBindGroup):
(WebGPU::RenderPassEncoder::setBlendConstant):
(WebGPU::RenderPassEncoder::setScissorRect):
(WebGPU::RenderPassEncoder::setStencilReference):
Call helper function so command recording becomes no-ops for
command buffers which will be discarded.

Canonical link: https://commits.webkit.org/279034@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