WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
267584
Silent failure when creating additional createCommandEncoder
https://bugs.webkit.org/show_bug.cgi?id=267584
Summary
Silent failure when creating additional createCommandEncoder
Aura Munoz
Reported
2024-01-16 07:30:23 PST
When incorrectly creating an additional command encoder in the render loop, Safari freezes and turns the whole application unresponsive. Instead, it should throw a warning or an error Just add an additional device.createCommandEncoder(); to the webGPU samples
https://github.com/webgpu/webgpu-samples/blob/0721d17d9f489b7b4fb1091f98282627c6f5d173/src/sample/rotatingCube/main.ts#L182
``` function frame() { // Sample is no longer the active page. if (!pageState.active) return; const transformationMatrix = getTransformationMatrix(); device.queue.writeBuffer( uniformBuffer, 0, transformationMatrix.buffer, transformationMatrix.byteOffset, transformationMatrix.byteLength ); renderPassDescriptor.colorAttachments[0].view = context .getCurrentTexture() .createView(); const commandEncoderOther = device.createCommandEncoder(); const commandEncoder = device.createCommandEncoder(); const passEncoder = commandEncoder.beginRenderPass(renderPassDescriptor); passEncoder.setPipeline(pipeline); passEncoder.setBindGroup(0, uniformBindGroup); passEncoder.setVertexBuffer(0, verticesBuffer); passEncoder.draw(cubeVertexCount, 1, 0, 0); passEncoder.end(); device.queue.submit([commandEncoder.finish()]); requestAnimationFrame(frame); } requestAnimationFrame(frame); }; ``` This will freeze Safari
Attachments
Add attachment
proposed patch, testcase, etc.
Mike Wyrzykowski
Comment 1
2024-01-16 10:14:56 PST
Likely dupe of
https://bugs.webkit.org/show_bug.cgi?id=267285
validation for command encoding is not yet implemented
Radar WebKit Bug Importer
Comment 2
2024-01-23 07:31:14 PST
<
rdar://problem/121441067
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug