mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
radeonsi/gfx12: disallow DCC for protected content
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
This commit is contained in:
parent
c90d4e0d57
commit
3de719045a
1 changed files with 8 additions and 0 deletions
|
|
@ -240,6 +240,7 @@ static int si_init_surface(struct si_screen *sscreen, struct radeon_surf *surfac
|
|||
|
||||
if (surface->modifier == DRM_FORMAT_MOD_INVALID &&
|
||||
(ptex->bind & PIPE_BIND_CONST_BW ||
|
||||
ptex->bind & PIPE_BIND_PROTECTED ||
|
||||
sscreen->debug_flags & DBG(NO_DCC) ||
|
||||
(ptex->bind & PIPE_BIND_SCANOUT && sscreen->debug_flags & DBG(NO_DISPLAY_DCC))))
|
||||
flags |= RADEON_SURF_DISABLE_DCC;
|
||||
|
|
@ -1614,6 +1615,13 @@ si_modifier_supports_resource(struct pipe_screen *screen,
|
|||
modifier != DRM_FORMAT_MOD_LINEAR)
|
||||
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) &&
|
||||
AMD_FMT_MOD_GET(TILE_VERSION, modifier) >= AMD_FMT_MOD_TILE_VER_GFX12 &&
|
||||
AMD_FMT_MOD_GET(DCC, modifier))
|
||||
return false;
|
||||
|
||||
ac_modifier_max_extent(&sscreen->info, modifier, &max_width, &max_height);
|
||||
return templ->width0 <= max_width && templ->height0 <= max_height;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue