Mesa (main): iris: Set DISABLE_AUX_BIT for AUX_USAGE_NONE modifiers
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Oct 21 20:47:54 UTC 2021
Module: Mesa
Branch: main
Commit: 114f87c1c70e56587cbc3d53f7593b633a008028
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=114f87c1c70e56587cbc3d53f7593b633a008028
Author: Nanley Chery <nanley.g.chery at intel.com>
Date: Mon Jul 19 10:16:56 2021 -0700
iris: Set DISABLE_AUX_BIT for AUX_USAGE_NONE modifiers
This avoids unnecessary surface padding on TGL+.
Also, drop some of the logic to handle modifiers in
iris_resource_configure_aux as the bit now causes it to be handled
implicitly.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11960>
---
src/gallium/drivers/iris/iris_resource.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c
index cfc6ff839a5..35dc31c3e67 100644
--- a/src/gallium/drivers/iris/iris_resource.c
+++ b/src/gallium/drivers/iris/iris_resource.c
@@ -635,6 +635,9 @@ iris_resource_configure_main(const struct iris_screen *screen,
isl_surf_usage_flags_t usage = 0;
+ if (res->mod_info && res->mod_info->aux_usage == ISL_AUX_USAGE_NONE)
+ usage |= ISL_SURF_USAGE_DISABLE_AUX_BIT;
+
if (templ->usage == PIPE_USAGE_STAGING)
usage |= ISL_SURF_USAGE_STAGING_BIT;
@@ -730,24 +733,13 @@ iris_resource_configure_aux(struct iris_screen *screen,
{
const struct intel_device_info *devinfo = &screen->devinfo;
- /* Try to create the auxiliary surfaces allowed by the modifier or by
- * the user if no modifier is specified.
- */
- assert(!res->mod_info ||
- res->mod_info->aux_usage == ISL_AUX_USAGE_NONE ||
- res->mod_info->aux_usage == ISL_AUX_USAGE_CCS_E ||
- res->mod_info->aux_usage == ISL_AUX_USAGE_GFX12_CCS_E ||
- res->mod_info->aux_usage == ISL_AUX_USAGE_MC);
-
const bool has_mcs =
isl_surf_get_mcs_surf(&screen->isl_dev, &res->surf, &res->aux.surf);
const bool has_hiz = !INTEL_DEBUG(DEBUG_NO_HIZ) &&
isl_surf_get_hiz_surf(&screen->isl_dev, &res->surf, &res->aux.surf);
- const bool has_ccs =
- ((!res->mod_info && !INTEL_DEBUG(DEBUG_NO_RBC)) ||
- (res->mod_info && res->mod_info->aux_usage != ISL_AUX_USAGE_NONE)) &&
+ const bool has_ccs = !INTEL_DEBUG(DEBUG_NO_RBC) &&
iris_get_ccs_surf(&screen->isl_dev, &res->surf, &res->aux.surf,
&res->aux.extra_aux.surf, 0);
More information about the mesa-commit
mailing list