iris: Allow disabling aux via INTEL_DEBUG options
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 11 Dec 2018 08:43:05 +0000 (00:43 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:12 +0000 (10:26 -0800)
src/gallium/drivers/iris/iris_resource.c

index ca09a70fc5bff0ec90c6c3ba6a1148adfb73f097..9c7420f2b4c836493a29b6c56bec4def577e66df 100644 (file)
@@ -568,8 +568,10 @@ iris_resource_create_with_modifiers(struct pipe_screen *pscreen,
          res->aux.possible_usages |= 1 << ISL_AUX_USAGE_MCS;
    } else {
       if (has_depth) {
-         res->aux.possible_usages |= 1 << ISL_AUX_USAGE_HIZ;
-      } else if (supports_ccs(devinfo, &res->surf)) {
+         if (likely(!(INTEL_DEBUG & DEBUG_NO_HIZ)))
+            res->aux.possible_usages |= 1 << ISL_AUX_USAGE_HIZ;
+      } else if (likely(!(INTEL_DEBUG & DEBUG_NO_RBC)) &&
+                 supports_ccs(devinfo, &res->surf)) {
          if (isl_format_supports_ccs_e(devinfo, res->surf.format))
             res->aux.possible_usages |= 1 << ISL_AUX_USAGE_CCS_E;