Closed Bug 1863475 Opened 6 months ago Closed 29 days ago

Page rendering artifacts on particular Shadertoy example (WR TDR behavior could be better)

Categories

(Core :: Graphics: WebRender, defect, P3)

Firefox 119
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: hello, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0

Steps to reproduce:

  1. Load https://www.shadertoy.com/view/4ttSWf and wait (~10s in my case)
  2. Notice extremely high GPU usage given size of shader canvas
  3. Browser window (including taskbar/address bar/non-WebGL page context) will begin to intermittently render large rectangular sections of the screen in the wrong place

Actual results:

The attached screenshot is worth a thousand words here. It's cropped, but otherwise unedited. There were no other windowed applications running when I took the screenshot (you're not seeing parts of any other windows).

It seems like this particular shader is somehow causing Firefox to draw portions of the window into bad painting bounds. Failed to reproduce in multiple other browsers. Didn't have time to test on other hardware or with anything but the current (as of submitting this report) Nvidia driver (546.01).

Notes...

  • The artifacts appear sporadically and last from a fraction of a second to several seconds
  • The artifacts can appear over the WebGL canvas, over the rest of the page (over "normal" DOM content), and as shown in the attached screenshot, also over the browser menus (navigation, bookmarks, address bar, etc.) and window titlebar (notice the minimize/maximize buttons in the screenshot).
  • The problem doesn't seem to appear when the shader is rendering in fullscreen mode (though the performance is abysmal)
  • I can replicate this issue at any resolution, but as the window's size increases, the artifacts increase in size, frequency, and duration
  • Hardware: ASUS RTX 2080 Ti OC, Intel i7-13700k, Samsung G9 running with VRR enabled in 240hz mode at native 5120x1440
  • Reproduced on a new Firefox profile
  • Ran out of time to test without HDR/Auto-HDR enabled in Windows, or with the most recent Firefox nightly

Expected results:

The browser should always render itself, the active page, and any visible WebGL contents into the correct areas of the browser window at all times

The Bugbug bot thinks this bug should belong to the 'Core::Graphics: WebRender' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Graphics: WebRender
Product: Firefox → Core

The severity field is not set for this bug.
:gw, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(gwatson)

Added to triage tracker as I'm not sure what the appropriate severity is for this one.

Blocks: gfx-triage
Severity: -- → S3
Flags: needinfo?(gwatson)

This looks like the WebGL usage is somehow impacting other parts of Firefox's rendering, so I think this is pretty serious.

Severity: S3 → S2
Flags: needinfo?(jgilbert)

I'll attempt repro on my nvidia windows 10 system and see if I can characterize this more exactly.

Flags: needinfo?(ahale)

Could you try enable gfx.webrender.debug.picture-caching in about:config, and capture a screenshot with that enabled when the artifacts occur? It would be interesting to see if the picture cache tile boundaries align with the artifacts.

Flags: needinfo?(hello)

This is probably webgl causing a TDR (~timed-out device reset) where the webrender context resets in the middle of a wr rendering, but with default GL state, and so starts drawing into FB0 and such things. Not great but not terrible. No real path to exploit, but it'd be nice for WR to be better-behaved in this case.

I can't repro this on the following computers:

  • Ryzen 7 5800X + Geforce RTX 3080 Ti
    • Windows 11
    • Windows 10 (same machine, dual boot for testing)
  • Ryzen 9 7950X3D + Radeon RX 7900 XTX on Windows 11
  • Dell laptop with Core i9-11900H
    • using Intel UHD Graphics on Windows 11
    • NVIDIA RTX 3050 Ti Laptop GPU on Windows 11 (same machine, device enabled and graphics preference set to high performance for Firefox.exe)
  • MSI gaming laptop with Core i7-8750H CPU
    • using Intel UHD Graphics 630 on Windows 11
    • using RTX 2060 Ti laptop GPU (this model is approximately desktop equivalent unlike most laptop GPUs, )

In all cases the display is stable, no artifacting outside the shadertoy view, fans run loudly though on all of these.

I tried with and without vsync on a few of these configurations.

I agree with Kelsey's assessment that this is a TDR, and hence a hardware problem (most commonly either thermal or power related, can be a problem just with that board too).

Flags: needinfo?(ahale)
Severity: S2 → S3
Summary: Page rendering artifacts on particular Shadertoy example → Page rendering artifacts on particular Shadertoy example (WR TDR behavior could be better)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(jgilbert)
Priority: -- → P3
No longer blocks: gfx-triage

Glenn, I must have missed the email notification for your needinfo request, my apologies. For better or worse, I am no longer able to reproduce this issue on the original hardware in question, using current browser and driver versions. The system is otherwise virtually unchanged from the initial repro state. I appreciate the investigation.

Flags: needinfo?(hello)
Status: NEW → RESOLVED
Closed: 29 days ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: