Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 538917c710e82668cfd7d8b51d1654790458b2a4
      
https://github.com/WebKit/WebKit/commit/538917c710e82668cfd7d8b51d1654790458b2a4
  Author: Mike Wyrzykowski <mwyrzykow...@apple.com>
  Date:   2025-04-04 (Fri, 04 Apr 2025)

  Changed paths:
    A LayoutTests/fast/webgpu/nocrash/fuzz-290795-expected.txt
    A LayoutTests/fast/webgpu/nocrash/fuzz-290795.html
    M Source/WebGPU/WebGPU/RenderBundleEncoder.mm

  Log Message:
  -----------
  [WebGPU] GPURenderBundle attempts to take both replay and ICB path in some 
zero-draw cases
https://bugs.webkit.org/show_bug.cgi?id=290795
rdar://147952554

Reviewed by Tadeu Zagallo.

WebGPU allows for commands like draw(0) to be considered valid even though
in practice they do nothing. We were incrementing the draw command count
prior to validating this resulting in ICBs being created which should do 
nothing,
but ended up taking an untested codepath leading to GPU process crashes.

Resolve by incrementing the command count only when a draw will actually be
performed.

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

* Source/WebGPU/WebGPU/RenderBundleEncoder.mm:
(WebGPU::RenderBundleEncoder::draw):
(WebGPU::RenderBundleEncoder::finalizeRenderCommand):
(WebGPU::RenderBundleEncoder::drawIndexed):
(WebGPU::RenderBundleEncoder::drawIndexedIndirect):
Only increment command count when a draw is performed.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to