mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
radeonsi: fix si_get_dmabuf_modifier_planes for gfx12
DCC_RETILE/DCC only makes sense if TILE_VERSION is lower than AMD_FMT_MOD_TILE_VER_GFX12. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30159>
This commit is contained in:
parent
0bb83a4060
commit
252485b0e2
1 changed files with 9 additions and 7 deletions
|
|
@ -1588,13 +1588,15 @@ si_get_dmabuf_modifier_planes(struct pipe_screen *pscreen, uint64_t modifier,
|
|||
{
|
||||
unsigned planes = util_format_get_num_planes(format);
|
||||
|
||||
if (IS_AMD_FMT_MOD(modifier) && planes == 1) {
|
||||
if (AMD_FMT_MOD_GET(DCC_RETILE, modifier))
|
||||
return 3;
|
||||
else if (AMD_FMT_MOD_GET(DCC, modifier))
|
||||
return 2;
|
||||
else
|
||||
return 1;
|
||||
if (AMD_FMT_MOD_GET(TILE_VERSION, modifier) < AMD_FMT_MOD_TILE_VER_GFX12) {
|
||||
if (IS_AMD_FMT_MOD(modifier) && planes == 1) {
|
||||
if (AMD_FMT_MOD_GET(DCC_RETILE, modifier))
|
||||
return 3;
|
||||
else if (AMD_FMT_MOD_GET(DCC, modifier))
|
||||
return 2;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return planes;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue