Closed Bug 1717028 Opened 4 months ago Closed 4 months ago

gfx.webrender.debug.render-targets displays shared texture atlases but not render targets

Categories

(Core :: Graphics: WebRender, defect)

defect

Tracking

()

RESOLVED FIXED
91 Branch
Tracking Status
firefox91 --- fixed

People

(Reporter: jnicol, Assigned: jnicol)

Details

Attachments

(1 file)

Quite a while back draw_render_target_debug() was changed to use Texture::is_render_target() to decide whether to display a texture (rather than the render targets being stored in a separate collection than other texture cache textures). However, is_render_target() just checks whether the texture can be rendered to (due to having an FBO), which includes most textures in the texture cache, not just ones we refer to as "render targets".

More recently, in bug 1711486, we attempted to ensure that gfx.webrender.debug.texture-cache did not show picture cache tiles. To do this we filtered the textures in do_debug_blit() to include only those with the flag TextureFlags::IS_SHARED_TEXTURE_CACHE. However, do_debug_blit() is shared by both draw_texture_cache_debug() and draw_render_target_debug(), and render targets do not have that flag set.

The consequence of both of these changes is that draw_render_target_debug() draws texture cache atlases, but doesn't actually display our render targets.

To fix this, we can filter by IS_SHARED_TEXTURE_CACHE in draw_texture_cache_debug() rather than do_debug_blit(). And in draw_render_target_debug() we can filter by the newly added TextureCacheCategory::RenderTarget, rather than is_render_target().

Over time the render target debug view has accidentally started
displaying other texture cache textures too, and then not actually
showing render targets. This makes it show only render target textures
again, as intended.

Assignee: nobody → jnicol
Status: NEW → ASSIGNED
Pushed by jnicol@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6fb7293d1976
Fix webrender render target debug view. r=nical
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
You need to log in before you can comment on or make changes to this bug.