Mesa (master): i965/miptree: Remove format assertion in alloc_aux

Nanley Chery nchery at kemper.freedesktop.org
Fri May 18 16:56:39 UTC 2018


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

Author: Nanley Chery <nanley.g.chery at intel.com>
Date:   Wed May 16 11:03:24 2018 -0700

i965/miptree: Remove format assertion in alloc_aux

intel_miptree_supports_{ccs,mcs,hiz} ensures the format is valid for the
color or depth miptree before the miptree is assigned an aux_usage.
alloc_aux switches on the aux_usage so don't assert that the format is
valid.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>

---

 src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index 1a797326a8..b783cf3abf 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -1804,13 +1804,10 @@ intel_miptree_alloc_aux(struct brw_context *brw,
       aux_surf_ok = true;
       break;
    case ISL_AUX_USAGE_HIZ:
-      assert(!_mesa_is_format_color_format(mt->format));
-
       initial_state = ISL_AUX_STATE_AUX_INVALID;
       aux_surf_ok = isl_surf_get_hiz_surf(&brw->isl_dev, &mt->surf, &aux_surf);
       break;
    case ISL_AUX_USAGE_MCS:
-      assert(_mesa_is_format_color_format(mt->format));
       assert(brw->screen->devinfo.gen >= 7); /* MCS only used on Gen7+ */
 
       /* From the Ivy Bridge PRM, Vol 2 Part 1 p326:
@@ -1831,8 +1828,6 @@ intel_miptree_alloc_aux(struct brw_context *brw,
       break;
    case ISL_AUX_USAGE_CCS_D:
    case ISL_AUX_USAGE_CCS_E:
-      assert(_mesa_is_format_color_format(mt->format));
-
       /* When CCS_E is used, we need to ensure that the CCS starts off in a
        * valid state.  From the Sky Lake PRM, "MCS Buffer for Render
        * Target(s)":




More information about the mesa-commit mailing list