Mesa (master): i965: isl: Move the MCS gen7+ assertion into ISL

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


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

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

i965: isl: Move the MCS gen7+ assertion into ISL

This is useful for every user of ISL. Drop the comment along the way to
match similar functions in ISL.

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

---

 src/intel/isl/isl.c                           | 2 ++
 src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 2 --
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c
index 7dfead00dc..f39d8a7999 100644
--- a/src/intel/isl/isl.c
+++ b/src/intel/isl/isl.c
@@ -1642,6 +1642,8 @@ isl_surf_get_mcs_surf(const struct isl_device *dev,
                       const struct isl_surf *surf,
                       struct isl_surf *mcs_surf)
 {
+   assert(ISL_DEV_GEN(dev) >= 7);
+
    /* It must be multisampled with an array layout */
    assert(surf->samples > 1 && surf->msaa_layout == ISL_MSAA_LAYOUT_ARRAY);
 
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index b783cf3abf..5f19e23b01 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -1808,8 +1808,6 @@ intel_miptree_alloc_aux(struct brw_context *brw,
       aux_surf_ok = isl_surf_get_hiz_surf(&brw->isl_dev, &mt->surf, &aux_surf);
       break;
    case ISL_AUX_USAGE_MCS:
-      assert(brw->screen->devinfo.gen >= 7); /* MCS only used on Gen7+ */
-
       /* From the Ivy Bridge PRM, Vol 2 Part 1 p326:
        *
        *     When MCS buffer is enabled and bound to MSRT, it is required that




More information about the mesa-commit mailing list