mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
radeonsi: disable DCC for PIPE_BIND_USE_FRONT_RENDERING
Front rendering and (display) DCC are causing artifacts on screen. si_texture_get_handle deals with this problem by disabling dcc, but we can make it simpler by not allocating DCC at all when this flag is set. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32281>
This commit is contained in:
parent
666a6eb871
commit
d3798130ad
1 changed files with 7 additions and 0 deletions
|
|
@ -241,6 +241,7 @@ static int si_init_surface(struct si_screen *sscreen, struct radeon_surf *surfac
|
|||
if (modifier == DRM_FORMAT_MOD_INVALID &&
|
||||
(ptex->bind & PIPE_BIND_CONST_BW ||
|
||||
ptex->bind & PIPE_BIND_PROTECTED ||
|
||||
ptex->bind & PIPE_BIND_USE_FRONT_RENDERING ||
|
||||
sscreen->debug_flags & DBG(NO_DCC) ||
|
||||
(ptex->bind & PIPE_BIND_SCANOUT && sscreen->debug_flags & DBG(NO_DISPLAY_DCC))))
|
||||
flags |= RADEON_SURF_DISABLE_DCC;
|
||||
|
|
@ -290,6 +291,9 @@ static int si_init_surface(struct si_screen *sscreen, struct radeon_surf *surfac
|
|||
if (ptex->bind & PIPE_BIND_CONST_BW)
|
||||
flags |= RADEON_SURF_DISABLE_DCC;
|
||||
|
||||
if (ptex->bind & PIPE_BIND_USE_FRONT_RENDERING)
|
||||
flags |= RADEON_SURF_DISABLE_DCC;
|
||||
|
||||
switch (sscreen->info.gfx_level) {
|
||||
case GFX8:
|
||||
/* Stoney: 128bpp MSAA textures randomly fail piglit tests with DCC. */
|
||||
|
|
@ -1636,6 +1640,9 @@ si_modifier_supports_resource(struct pipe_screen *screen,
|
|||
modifier != DRM_FORMAT_MOD_LINEAR)
|
||||
return false;
|
||||
|
||||
if ((templ->bind & PIPE_BIND_USE_FRONT_RENDERING) && ac_modifier_has_dcc(modifier))
|
||||
return false;
|
||||
|
||||
/* Protected content doesn't support DCC on GFX12. */
|
||||
if (sscreen->info.gfx_level >= GFX12 && templ->bind & PIPE_BIND_PROTECTED &&
|
||||
IS_AMD_FMT_MOD(modifier) &&
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue