Mesa (main): iris: Drop redundant iris_resource_disable_aux call

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Dec 1 20:53:08 UTC 2021


Module: Mesa
Branch: main
Commit: c394f2f0ea25c9ca83f0eed3f96c7376eb780bab
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c394f2f0ea25c9ca83f0eed3f96c7376eb780bab

Author: Nanley Chery <nanley.g.chery at intel.com>
Date:   Mon Aug 16 09:08:24 2021 -0700

iris: Drop redundant iris_resource_disable_aux call

Drop the call to iris_resource_disable_aux in
iris_resource_configure_aux. With the previous patches, we no longer
create CCS surfaces and pick the AUX_NONE usage. As a result, if the aux
usage is NONE, all iris_resource fields already indicate that aux is
disabled.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12398>

---

 src/gallium/drivers/iris/iris_resource.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c
index 79a8abcf56b..1e05b9e67df 100644
--- a/src/gallium/drivers/iris/iris_resource.c
+++ b/src/gallium/drivers/iris/iris_resource.c
@@ -773,7 +773,8 @@ iris_resource_configure_aux(struct iris_screen *screen,
       } else if (want_ccs_e_for_format(devinfo, res->surf.format)) {
          res->aux.possible_usages |= devinfo->ver < 12 ?
             1 << ISL_AUX_USAGE_CCS_E : 1 << ISL_AUX_USAGE_GFX12_CCS_E;
-      } else if (isl_format_supports_ccs_d(devinfo, res->surf.format)) {
+      } else {
+         assert(isl_format_supports_ccs_d(devinfo, res->surf.format));
          res->aux.possible_usages |= 1 << ISL_AUX_USAGE_CCS_D;
       }
    }
@@ -788,9 +789,6 @@ iris_resource_configure_aux(struct iris_screen *screen,
 
    switch (res->aux.usage) {
    case ISL_AUX_USAGE_NONE:
-      /* Update relevant fields to indicate that aux is disabled. */
-      iris_resource_disable_aux(res);
-
       /* Having no aux buffer is only okay if there's no modifier with aux. */
       return !res->mod_info || res->mod_info->aux_usage == ISL_AUX_USAGE_NONE;
    case ISL_AUX_USAGE_HIZ:



More information about the mesa-commit mailing list