[webkit-changes] [WebKit/WebKit] cc7750: [WebGPU] GPU process should not crash when shader ...

mwyrzykowski noreply at github.com
Wed Sep 13 07:17:35 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: cc77505dc54cc15993d477ec88ce1d73014c7e72
      https://github.com/WebKit/WebKit/commit/cc77505dc54cc15993d477ec88ce1d73014c7e72
  Author: Mike Wyrzykowski <mwyrzykowski at apple.com>
  Date:   2023-09-13 (Wed, 13 Sep 2023)

  Changed paths:
    M Source/WebGPU/WebGPU/BindGroup.mm
    M Source/WebGPU/WebGPU/Device.h
    M Source/WebGPU/WebGPU/Device.mm
    M Source/WebGPU/WebGPU/RenderBundleEncoder.h
    M Source/WebGPU/WebGPU/RenderBundleEncoder.mm
    M Source/WebKit/GPUProcess/graphics/WebGPU/RemoteDevice.cpp
    M Source/WebKit/GPUProcess/graphics/WebGPU/RemoteRenderPassEncoder.cpp

  Log Message:
  -----------
  [WebGPU] GPU process should not crash when shader fails to compile
https://bugs.webkit.org/show_bug.cgi?id=261484
<radar://115395840>

Reviewed by Dan Glastonbury.

Cleanup some invalid assertions and logic so we can open all
of the samples in a debug build without crashes or assertions triggering.

* Source/WebGPU/WebGPU/BindGroup.mm:
(WebGPU::Device::createBindGroup):
Bind group creation can fail if resources are not valid, don't assert.

* Source/WebGPU/WebGPU/Device.h:
* Source/WebGPU/WebGPU/Device.mm:
(WebGPU::Device::vertexBufferIndexForBindGroup const):
Allow passing a maximum vertex buffer count for ICB commands.

* Source/WebGPU/WebGPU/RenderBundleEncoder.h:
* Source/WebGPU/WebGPU/RenderBundleEncoder.mm:
(WebGPU::Device::createRenderBundleEncoder):
Settings inheritPipelineState to YES was wrong as setPipelineState
is called.

(WebGPU::RenderBundleEncoder::finish):
Ensure the pipeline state was set during ICB creation.

(WebGPU::RenderBundleEncoder::setBindGroup):
Use the max vertex buffer count instead of the default.

(WebGPU::RenderBundleEncoder::setPipeline):
Ensure the pipeline state is valid.

* Source/WebKit/GPUProcess/graphics/WebGPU/RemoteDevice.cpp:
(WebKit::RemoteDevice::createBindGroup):
Bind group creation can fail if resources are not valid, don't assert.

* Source/WebKit/GPUProcess/graphics/WebGPU/RemoteRenderPassEncoder.cpp:
(WebKit::RemoteRenderPassEncoder::setBindGroup):
Bind group creation can fail if resources are not valid, don't assert.

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




More information about the webkit-changes mailing list