-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Queue::commandBufferWithDescriptor needs to null check buffer before …
…adding to NSMutableOrderedSet https://bugs.webkit.org/show_bug.cgi?id=270597 rdar://124143184 Reviewed by Mike Wyrzykowski. * LayoutTests/fast/webgpu/command-buffer-after-destruction-expected.txt: Added. * LayoutTests/fast/webgpu/command-buffer-after-destruction.html: Added. * Source/WebGPU/WebGPU/Queue.mm: (WebGPU::Queue::commandBufferWithDescriptor): Canonical link: https://commits.webkit.org/275761@main
- Loading branch information
1 parent
194f965
commit 5cbab24
Showing
3 changed files
with
70 additions
and
1 deletion.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
LayoutTests/fast/webgpu/command-buffer-after-destruction-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This test passes if it does not crash. |
67 changes: 67 additions & 0 deletions
67
LayoutTests/fast/webgpu/command-buffer-after-destruction.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<script> | ||
if (window.testRunner) { testRunner.waitUntilDone(); testRunner.dumpAsText() } | ||
|
||
function videoWithData() { | ||
const veryBrightVideo = `data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAAvG1kYXQAAAAfTgEFGkdWStxcTEM/lO/FETzRQ6gD7gAA7gIAA3EYgAAAAEgoAa8iNjAkszOL+e58c//cEe//0TT//scp1n/381P/RWP/zOW4QtxorfVogeh8nQDbQAAAAwAQMCcWUTAAAAMAAAMAAAMA84AAAAAVAgHQAyu+KT35E7gAADFgAAADABLQAA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AAAAAIBAQGAAAAChjdHRzAAAAAAAAAAMAAAABAAAAAAAAAAEAAAfQAAAAAgAAAAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAQAAAABAAAAJHN0c3oAAAAAAAAAAAAAAAQAAABvAAAAGQAAABYAAAAWAAAAFHN0Y28AAAAAAAAAAQAAACwAAABhdWR0YQAAAFltZXRhAAAAAAAAACFoZGxyAAAAAAAAAABtZGlyYXBwbAAAAAAAAAAAAAAAACxpbHN0AAAAJKl0b28AAAAcZGF0YQAAAAEAAAAATGF2ZjYwLjMuMTAw`; | ||
let video = document.createElement('video'); | ||
video.src = veryBrightVideo; | ||
return new Promise(resolve => { | ||
video.onloadeddata = () => { | ||
resolve(video); | ||
}; | ||
}); | ||
} | ||
onload = async () => { | ||
try { | ||
let adapter0 = await navigator.gpu.requestAdapter( | ||
{ | ||
} | ||
); | ||
let promise0 = adapter0.requestDevice( | ||
{ | ||
label: '\ue3b5', | ||
requiredFeatures: [ | ||
'depth-clip-control', | ||
'depth32float-stencil8', | ||
'texture-compression-astc', | ||
'indirect-first-instance', | ||
'shader-f16', | ||
'rg11b10ufloat-renderable' | ||
], | ||
requiredLimits: { | ||
maxColorAttachmentBytesPerSample: 34, | ||
maxVertexBufferArrayStride: 8035, | ||
maxStorageTexturesPerShaderStage: 9, | ||
maxBindingsPerBindGroup: 6910, | ||
maxTextureArrayLayers: 980, | ||
maxTextureDimension1D: 8875, | ||
maxTextureDimension2D: 14193, | ||
minStorageBufferOffsetAlignment: 32, | ||
minUniformBufferOffsetAlignment: 128, | ||
}, | ||
} | ||
); | ||
let device1 = await promise0; | ||
let canvas1 = document.createElement('canvas'); | ||
let gpuCanvasContext1 = canvas1.getContext('webgpu'); | ||
try { | ||
gpuCanvasContext1.configure( | ||
{ | ||
device: device1, | ||
format: 'rgba16float', | ||
usage: 0, | ||
viewFormats: [ | ||
], | ||
colorSpace: 'srgb', | ||
alphaMode: 'opaque', | ||
} | ||
); | ||
} catch {} | ||
device1.destroy(); | ||
let texture10 = gpuCanvasContext1.getCurrentTexture(); | ||
let video3 = await videoWithData(); | ||
} catch { } | ||
if (window.testRunner) { testRunner.notifyDone() } | ||
}; | ||
</script> | ||
This test passes if it does not crash. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters