From 04d73e2dc201a3d6858f5d24af9979ffb3423b55 Mon Sep 17 00:00:00 2001 From: Nanley Chery Date: Mon, 14 Dec 2020 11:19:29 -0800 Subject: [PATCH] iris: Move depth-format assertion out of iris_blit Instead of having a depth-specific assertion in a generic portion of iris_blit, move it into the depth-specific cases of iris_resource_texture_aux_usage. Since iris_blit calls that function, the test still occurs. Reviewed-by: Lionel Landwerlin Part-of: --- src/gallium/drivers/iris/iris_blit.c | 3 --- src/gallium/drivers/iris/iris_resolve.c | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/iris/iris_blit.c b/src/gallium/drivers/iris/iris_blit.c index df212a5..1643e60 100644 --- a/src/gallium/drivers/iris/iris_blit.c +++ b/src/gallium/drivers/iris/iris_blit.c @@ -410,9 +410,6 @@ iris_blit(struct pipe_context *ctx, const struct pipe_blit_info *info) enum isl_aux_usage src_aux_usage = iris_resource_texture_aux_usage(ice, src_res, src_fmt.fmt); - if (iris_resource_level_has_hiz(src_res, info->src.level)) - assert(src_res->surf.format == src_fmt.fmt); - bool src_clear_supported = isl_aux_usage_has_fast_clears(src_aux_usage) && src_res->surf.format == src_fmt.fmt; diff --git a/src/gallium/drivers/iris/iris_resolve.c b/src/gallium/drivers/iris/iris_resolve.c index 9a9dea1..7c2f3ea 100644 --- a/src/gallium/drivers/iris/iris_resolve.c +++ b/src/gallium/drivers/iris/iris_resolve.c @@ -812,15 +812,18 @@ iris_resource_texture_aux_usage(struct iris_context *ice, switch (res->aux.usage) { case ISL_AUX_USAGE_HIZ: + assert(res->surf.format == view_format); if (iris_sample_with_depth_aux(devinfo, res)) return ISL_AUX_USAGE_HIZ; break; case ISL_AUX_USAGE_HIZ_CCS: + assert(res->surf.format == view_format); assert(!iris_sample_with_depth_aux(devinfo, res)); return ISL_AUX_USAGE_NONE; case ISL_AUX_USAGE_HIZ_CCS_WT: + assert(res->surf.format == view_format); if (iris_sample_with_depth_aux(devinfo, res)) return ISL_AUX_USAGE_HIZ_CCS_WT; break; -- 2.7.4