mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 07:18:17 +02:00
anv: Fall back to HiZ when disabling CCS on HiZ+CCS
When an image configured for HIZ_CCS/HIZ_CCS_WT is bound to a BO lacking implicit CCS, we disable any compression it may have had. Such images are still compatible with ISL_AUX_USAGE_HIZ however. Fall back to that aux usage to retain the performance benefit. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15068>
This commit is contained in:
parent
ffbde42b93
commit
74e446b45b
1 changed files with 14 additions and 2 deletions
|
|
@ -1847,12 +1847,24 @@ VkResult anv_BindImageMemory2(
|
|||
const struct anv_bo *bo =
|
||||
image->bindings[binding].address.bo;
|
||||
|
||||
if (!bo || bo->has_implicit_ccs)
|
||||
continue;
|
||||
|
||||
if (!device->physical->has_implicit_ccs)
|
||||
continue;
|
||||
|
||||
if (!isl_aux_usage_has_ccs(image->planes[p].aux_usage))
|
||||
continue;
|
||||
|
||||
if (bo && !bo->has_implicit_ccs &&
|
||||
device->physical->has_implicit_ccs)
|
||||
if (image->planes[p].aux_surface.memory_range.size > 0) {
|
||||
assert(image->planes[p].aux_usage == ISL_AUX_USAGE_HIZ_CCS ||
|
||||
image->planes[p].aux_usage == ISL_AUX_USAGE_HIZ_CCS_WT);
|
||||
image->planes[p].aux_usage = ISL_AUX_USAGE_HIZ;
|
||||
} else {
|
||||
assert(image->planes[p].aux_usage == ISL_AUX_USAGE_CCS_E ||
|
||||
image->planes[p].aux_usage == ISL_AUX_USAGE_STC_CCS);
|
||||
image->planes[p].aux_usage = ISL_AUX_USAGE_NONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue