Skip to content

Commit

Permalink
[WebGPU] Destroyed texture should not be used as depth stencil attach…
Browse files Browse the repository at this point in the history
…ments

https://bugs.webkit.org/show_bug.cgi?id=273323
<radar://127115893>

Reviewed by Tadeu Zagallo.

Destroyed textures are 1x1 bgra8unorm textures, there is no
benefit to having those set as a depth stencil attachment.

Any draw commands will make the command encoder invalid when a
destroyed texture is used during a draw command, so there is
no change in behavior.

* LayoutTests/TestExpectations:
* LayoutTests/fast/webgpu/fuzz-273323-expected.txt: Added.
* LayoutTests/fast/webgpu/fuzz-273323.html: Added.
* LayoutTests/fast/webgpu/fuzz-273573-expected.txt: Added.
* LayoutTests/fast/webgpu/fuzz-273573.html: Added.
Add regression tests.

* Source/WebGPU/WebGPU/CommandEncoder.mm:
(WebGPU::CommandEncoder::beginRenderPass):
* Source/WebGPU/WebGPU/Device.h:
* Source/WebGPU/WebGPU/Device.mm:
(WebGPU::Device::Device):
(WebGPU::Device::placeholderTexture const):
* Source/WebGPU/WebGPU/RenderPassEncoder.mm:
(WebGPU::m_maxDrawCount):
(WebGPU::RenderPassEncoder::drawIndexed):
* Source/WebGPU/WebGPU/Texture.mm:
(WebGPU::Texture::destroy):
* Source/WebGPU/WebGPU/TextureView.h:
(WebGPU::TextureView::texture const): Deleted.
* Source/WebGPU/WebGPU/TextureView.mm:
(WebGPU::TextureView::texture const):
(WebGPU::TextureView::destroy):

Canonical link: https://commits.webkit.org/278326@main
  • Loading branch information
mwyrzykowski committed May 3, 2024
1 parent 2da25af commit 7328ea1
Show file tree
Hide file tree
Showing 12 changed files with 43,948 additions and 14 deletions.
4 changes: 4 additions & 0 deletions LayoutTests/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -2106,6 +2106,10 @@ webkit.org/b/139639 [ Debug ] cssom/non-subpixel-scroll-top-left-values.html [ S
[ Release ] fast/webgpu/fuzz-273505.html [ Pass Failure Timeout ]
[ Debug ] fast/webgpu/fuzz-273566.html [ Skip ]
[ Release ] fast/webgpu/fuzz-273566.html [ Pass Failure Timeout ]
[ Debug ] fast/webgpu/fuzz-273323.html [ Skip ]
[ Release ] fast/webgpu/fuzz-273323.html [ Pass Failure Timeout ]
[ Debug ] fast/webgpu/fuzz-273573.html [ Skip ]
[ Release ] fast/webgpu/fuzz-273573.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
799 changes: 799 additions & 0 deletions LayoutTests/fast/webgpu/fuzz-273323-expected.txt

Large diffs are not rendered by default.

Loading

0 comments on commit 7328ea1

Please sign in to comment.