WebGPU does not display textures rendered by a compute pass
Categories
(Core :: Graphics: WebGPU, defect, P2)
Tracking
()
People
(Reporter: aleiserson, Assigned: aleiserson)
References
Details
Attachments
(2 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-beta+
|
Details | Review |
If the WebGPU canvas texture is written by a compute pass instead of a render pass, the contents are not displayed.
This problem can be seen at:
- https://webgpu.github.io/webgpu-samples/?sample=cornell (bug 1972628)
- https://webgpufundamentals.org/webgpu/resources/editor.html?url=/webgpu/webgpu-storage-texture-canvas.html (bug 1962747)
The problem goes away if something like the following is added at the end of command encoding:
commandEncoder.beginRenderPass({
colorAttachments: [
{
view: this.outputView,
clearValue: [1, 0.2, 0.3, 1],
loadOp: 'load',
storeOp: 'store',
},
]
}).end();
It seems suspect to me that we do not call TrackPresentationContext for textures bound to a compute pass.
Comment 1•5 months ago
|
||
It seems suspect to me that we do not call TrackPresentationContext for textures bound to a compute pass.
I'm pretty sure this is the correct.
| Assignee | ||
Updated•4 months ago
|
| Assignee | ||
Comment 2•4 months ago
|
||
Linking some references I found related to support for writing to storage textures in fragment shaders. Seems like it is supported, but perhaps not consistently.
https://github.com/gpuweb/gpuweb/issues/4696
https://github.com/gpuweb/gpuweb/issues/3838
https://github.com/gpuweb/gpuweb/pull/4326
https://github.com/gpuweb/gpuweb/issues/513
| Assignee | ||
Comment 3•4 months ago
|
||
Comment 6•4 months ago
|
||
Reverted this because it was causing reftests failures.
- Revert link
- Push with failures
- Failure Log
- Failure line: REFTEST TEST-UNEXPECTED-FAIL | dom/webgpu/tests/reftest/draw.html == dom/webgpu/tests/reftest/draw-ref.html | load failed: timed out waiting for reftest-wait to be removed
| Assignee | ||
Updated•4 months ago
|
| Assignee | ||
Comment 7•4 months ago
|
||
I am going to land this with the reftests disabled for now. Filed bug 1975273 to resolve the reftest issues.
| Assignee | ||
Updated•4 months ago
|
| Assignee | ||
Comment 10•4 months ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D255033
Updated•4 months ago
|
Updated•4 months ago
|
| Comment hidden (obsolete) |
| Comment hidden (obsolete) |
Comment 13•4 months ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined: Some WebGPU applications will not work
- Code covered by automated testing: yes
- Fix verified in Nightly: yes
- Needs manual QE test: no
- Steps to reproduce for manual QE testing: Visit URLs below; compare to Chrome
- Risk associated with taking this patch: Low
- Explanation of risk level: No risk to non-WebGPU sites or WebGPU sites not rendering to canvas textures via a bind group (i.e., most WebGPU sites). Very small risk of performance regression if a site is doing something pathological re: rendering to a canvas texture via a bind group, and it is very unlikely such a site will do anything useful without this fix.
- String changes made/needed: No
- Is Android affected?: no
| Assignee | ||
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Comment 14•4 months ago
|
||
| uplift | ||
| Assignee | ||
Updated•4 months ago
|
Description
•