Mesa (master): iris: Move depth-format assertion out of iris_blit

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jan 7 23:08:46 UTC 2021


Module: Mesa
Branch: master
Commit: 04d73e2dc201a3d6858f5d24af9979ffb3423b55
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=04d73e2dc201a3d6858f5d24af9979ffb3423b55

Author: Nanley Chery <nanley.g.chery at intel.com>
Date:   Mon Dec 14 11:19:29 2020 -0800

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 <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8340>

---

 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 df212a50ef8..1643e607959 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 9a9dea1d5ae..7c2f3ea51a0 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;



More information about the mesa-commit mailing list