Closed Bug 1972921 Opened 5 months ago Closed 4 months ago

WebGPU does not display textures rendered by a compute pass

Categories

(Core :: Graphics: WebGPU, defect, P2)

defect

Tracking

()

RESOLVED FIXED
141 Branch
Tracking Status
firefox140 --- disabled
firefox141 --- fixed
firefox142 --- fixed

People

(Reporter: aleiserson, Assigned: aleiserson)

References

Details

Attachments

(2 files)

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:

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.

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: nobody → aleiserson
Status: NEW → ASSIGNED

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

Pushed by sstanca@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/5fa41eb1d330 https://hg.mozilla.org/integration/autoland/rev/2a978a01da7a Revert "Bug 1972921 - Track canvas textures used in bind groups r=webgpu-reviewers,nical" for causing reftests failures.

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
Flags: needinfo?(aleiserson)
Keywords: leave-open

I am going to land this with the reftests disabled for now. Filed bug 1975273 to resolve the reftest issues.

Flags: needinfo?(aleiserson)
Keywords: leave-open
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 142 Branch
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 142 Branch → 141 Branch
Attachment #9498446 - Flags: approval-mozilla-beta?

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
Attachment #9498446 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Status: REOPENED → RESOLVED
Closed: 4 months ago4 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: