aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/iris/iris_resolve.c3
-rw-r--r--src/gallium/drivers/iris/iris_resource.c3
-rw-r--r--src/gallium/drivers/iris/iris_state.c1
3 files changed, 3 insertions, 4 deletions
diff --git a/src/gallium/drivers/iris/iris_resolve.c b/src/gallium/drivers/iris/iris_resolve.c
index 0350e58a225..0d647630f5d 100644
--- a/src/gallium/drivers/iris/iris_resolve.c
+++ b/src/gallium/drivers/iris/iris_resolve.c
@@ -1019,8 +1019,7 @@ iris_resource_render_aux_usage(struct iris_context *ice,
format_ccs_e_compat_with_resource(devinfo, res, render_format))
return ISL_AUX_USAGE_CCS_E;
- /* Otherwise, we try to fall back to CCS_D */
- if (isl_format_supports_ccs_d(devinfo, render_format))
+ if (res->aux.usage == ISL_AUX_USAGE_CCS_D)
return ISL_AUX_USAGE_CCS_D;
default:
diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c
index 513105d5c2c..232494a9c1f 100644
--- a/src/gallium/drivers/iris/iris_resource.c
+++ b/src/gallium/drivers/iris/iris_resource.c
@@ -525,8 +525,7 @@ iris_resource_configure_aux(struct iris_screen *screen,
} else if (has_ccs) {
if (want_ccs_e_for_format(devinfo, res->surf.format))
res->aux.possible_usages |= 1 << ISL_AUX_USAGE_CCS_E;
-
- if (isl_format_supports_ccs_d(devinfo, res->surf.format))
+ else if (isl_format_supports_ccs_d(devinfo, res->surf.format))
res->aux.possible_usages |= 1 << ISL_AUX_USAGE_CCS_D;
}
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c
index 462a04091be..9d824507ad8 100644
--- a/src/gallium/drivers/iris/iris_state.c
+++ b/src/gallium/drivers/iris/iris_state.c
@@ -4521,6 +4521,7 @@ surf_state_offset_for_aux(struct iris_resource *res,
unsigned aux_modes,
enum isl_aux_usage aux_usage)
{
+ assert(aux_modes & (1 << aux_usage));
return SURFACE_STATE_ALIGNMENT *
util_bitcount(aux_modes & ((1 << aux_usage) - 1));
}