Skip to content

Commit

Permalink
-[MTLCommandBuffer commit] may be called while encoding is still in p…
Browse files Browse the repository at this point in the history
…rogress

https://bugs.webkit.org/show_bug.cgi?id=274275
<radar://128201828>

Reviewed by Dan Glastonbury.

Ensure we don't leave encoders open or commit command buffers
before encoding has ended.

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

* Source/WebGPU/WebGPU/CommandEncoder.mm:
(WebGPU::CommandEncoder::endEncoding):
(WebGPU::CommandEncoder::runClearEncoder):
* Source/WebGPU/WebGPU/PresentationContextIOSurface.mm:
* Source/WebGPU/WebGPU/Queue.h:
* Source/WebGPU/WebGPU/Queue.mm:
(WebGPU::Queue::~Queue):
(WebGPU::Queue::ensureBlitCommandEncoder):
(WebGPU::Queue::finalizeBlitCommandEncoder):
(WebGPU::Queue::endEncoding const):
(WebGPU::Queue::setEncoderForBuffer):
Centralize endEncoding calls.

Canonical link: https://commits.webkit.org/279008@main
  • Loading branch information
mwyrzykowski committed May 20, 2024
1 parent 8ecd36c commit 03357c1
Show file tree
Hide file tree
Showing 7 changed files with 21,173 additions and 7 deletions.
2 changes: 2 additions & 0 deletions LayoutTests/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -2123,6 +2123,8 @@ webkit.org/b/139639 [ Debug ] cssom/non-subpixel-scroll-top-left-values.html [ S
[ Release ] fast/webgpu/fuzz-274161.html [ Pass Failure Timeout ]
[ Debug ] fast/webgpu/fuzz-274271.html [ Skip ]
[ Release ] fast/webgpu/fuzz-274271.html [ Pass Failure Timeout ]
[ Debug ] fast/webgpu/fuzz-274275.html [ Skip ]
[ Release ] fast/webgpu/fuzz-274275.html [ Pass Failure Timeout ]

# Imported W3C HTML/DOM ref tests that are failing.
imported/w3c/web-platform-tests/html/dom/elements/global-attributes/dir_auto-textarea-script-N-between-Rs.html [ ImageOnlyFailure ]
Expand Down
675 changes: 675 additions & 0 deletions LayoutTests/fast/webgpu/fuzz-274275-expected.txt

Large diffs are not rendered by default.

Loading

0 comments on commit 03357c1

Please sign in to comment.