[webkit-changes] [WebKit/WebKit] 3aa8d9: [WebGPU] GPURenderBundleEncoder allows index buffe...

mwyrzykowski noreply at github.com
Wed Dec 11 19:20:07 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3aa8d98b4fe2375ae6bd6989611cfb083c5fecda
      https://github.com/WebKit/WebKit/commit/3aa8d98b4fe2375ae6bd6989611cfb083c5fecda
  Author: Mike Wyrzykowski <mwyrzykowski at apple.com>
  Date:   2024-12-11 (Wed, 11 Dec 2024)

  Changed paths:
    M LayoutTests/fast/webgpu/nocrash/fuzz-283051.html
    M Source/WebGPU/WebGPU/RenderBundleEncoder.h
    M Source/WebGPU/WebGPU/RenderBundleEncoder.mm
    M Source/WebGPU/WebGPU/RenderPassEncoder.mm

  Log Message:
  -----------
  [WebGPU] GPURenderBundleEncoder allows index buffer to be set after draw call
https://bugs.webkit.org/show_bug.cgi?id=284475
rdar://141250919

Reviewed by Dan Glastonbury.

This test caught two bugs:
  (1) setIndexBuffer in RenderBundle was allowed after the draw call, that is not allowed, it must occur first.
  (2) setIndexBuffer wrote uint64::max() to size if not specified, it should use the buffer's size

* LayoutTests/fast/webgpu/nocrash/fuzz-283051.html:
Enable shader validation env var to catch crash the test found.

* Source/WebGPU/WebGPU/RenderBundleEncoder.h:
* Source/WebGPU/WebGPU/RenderBundleEncoder.mm:
(WebGPU::RenderBundleEncoder::drawIndexed):
Make sure at least 1 index can fit in the index buffer.

(WebGPU::RenderBundleEncoder::resetIndexBuffer):
(WebGPU::RenderBundleEncoder::finish):
(WebGPU::RenderBundleEncoder::replayCommands):
Reset the index buffer after the call to finish() and replayCommands()

(WebGPU::RenderBundleEncoder::setIndexBuffer):
If size is not specified, use the buffer's size.

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