mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
anv: Use different PAT entries for compressed resources
Displayable compressed resournces have a different PAT entry from the non-displayable compressed. Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29928>
This commit is contained in:
parent
6eeb079653
commit
2212865ce0
1 changed files with 7 additions and 2 deletions
|
|
@ -2176,8 +2176,13 @@ anv_device_get_pat_entry(struct anv_device *device,
|
|||
if (alloc_flags & ANV_BO_ALLOC_IMPORTED)
|
||||
return &device->info->pat.cached_coherent;
|
||||
|
||||
if (alloc_flags & ANV_BO_ALLOC_COMPRESSED)
|
||||
return &device->info->pat.compressed;
|
||||
if (alloc_flags & ANV_BO_ALLOC_COMPRESSED) {
|
||||
/* Compressed PAT entries are available on Xe2+. */
|
||||
assert(device->info->ver >= 20);
|
||||
return alloc_flags & ANV_BO_ALLOC_SCANOUT ?
|
||||
&device->info->pat.compressed_scanout :
|
||||
&device->info->pat.compressed;
|
||||
}
|
||||
|
||||
if (alloc_flags & (ANV_BO_ALLOC_EXTERNAL | ANV_BO_ALLOC_SCANOUT))
|
||||
return &device->info->pat.scanout;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue