gfx.webrender.debug.texture-cache does not work with the native compositor
Categories
(Core :: Graphics: WebRender, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox86 | --- | fixed |
People
(Reporter: mstange, Assigned: mstange)
Details
Attachments
(3 files)
Flipping gfx.webrender.debug.texture-cache
to true
does not show the texture cache on screen, on macOS. Instead it seems to result in corrupted rendering.
Assignee | ||
Updated•5 years ago
|
Comment 1•5 years ago
|
||
If you turn off the compositor does it work?
Assignee | ||
Comment 2•5 years ago
|
||
Yes it does, and it doesn't cause corrupted rendering.
With compositor on, the profiler overlay and the epochs overlay render correctly. But when the texture-cache or render-targets prefs are set, the other overlays disappear and rendering is corrupted. I'll check which call causes the breakage.
Assignee | ||
Comment 3•5 years ago
•
|
||
(In reply to Markus Stange [:mstange] from comment #2)
Yes it does, and it doesn't cause corrupted rendering.
Nevermind, the corrupted rendering is independent of whether the compositor is used.
However, the corruption only occurs with the Intel driver. When I use the AMD GPU, no corruption occurs. I think this is due to a driver bug with clears. We clear discarded items in the texture cache but only if the texture cache debugging pref is enabled. We also clear new texture cache textures upon creation. If I comment out the new-texture clear, the corruption stops.
Assignee | ||
Comment 4•5 years ago
•
|
||
I have filed bug 1685144 about the driver-specific corruption.
Let's make this bug only about the "native compositor" part.
There are two main bugs here:
- When blitting the frame buffers, we bind the default framebuffer as the destination instead of using the framebuffer for the native surface of the profiler overlay, because we call
DrawTarget::new_default
. This breaks the blit and any subsequent overlay rendering. Instead, we should use theDrawTarget::NativeSurface
which we create inbind_debug_overlay
. - Rendering is upside down because the rectangle coordinates are written assuming origin-is-bottom-left. We should convert
do_debug_blit
to properly use FramebufferPixel coordinates.
Assignee | ||
Comment 5•5 years ago
|
||
render_impl() calls draw_frame(). We were drawing the debug overlays in both
functions, so the overlays were rendered twice.
This patch removes the drawing in draw_frame() and keeps the one in render_impl().
For anything that uses the debug renderer, such as the "epochs" overlay, this
means that the drawing commands were appended twice, and then all commands were
executed at the end of render_impl().
Comparing the "epochs" debug overlay with and without this change, this patch
noticeable]y reduces its opacity from "extra opaque" (due to double drawing) to
"normal translucency".
Also, when the native compositor was used, any debug drawing in draw_frame()
that wasn't using the debug renderer didn't actually work, because it wasn't
going into the debug overlay surface - only render_impl() correctly binds the
debug overlay surface when the native compositor is used.
Assignee | ||
Comment 6•5 years ago
|
||
Depends on D100961
Assignee | ||
Comment 7•5 years ago
|
||
This fixes upside-down drawing when the native compositor is used.
Depends on D100962
Comment 9•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1e959ac06d64
https://hg.mozilla.org/mozilla-central/rev/b417ddc07d24
https://hg.mozilla.org/mozilla-central/rev/2eb5b5fade1b
Description
•