Module: Mesa
Branch: main
Commit: 4616aa2fac29100be99afe0ff382e442f152d421
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4616aa2fac29100be99afe0ff382e442f152d421

Author: Lionel Landwerlin <[email protected]>
Date:   Mon Mar  7 10:44:57 2022 +0200

isl: assert on gfx6 condition that should not be met

Those 2 cases should have been handled earlier.

Signed-off-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Nanley Chery <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14039>

---

 src/intel/isl/isl_gfx6.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/intel/isl/isl_gfx6.c b/src/intel/isl/isl_gfx6.c
index e3c6ccec2a7..80a404ac8cb 100644
--- a/src/intel/isl/isl_gfx6.c
+++ b/src/intel/isl/isl_gfx6.c
@@ -53,11 +53,11 @@ isl_gfx6_choose_msaa_layout(const struct isl_device *dev,
    if (info->dim != ISL_SURF_DIM_2D)
       return false;
 
+   /* Should have been filtered by isl_gfx6_filter_tiling() */
+   assert(!isl_surf_usage_is_display(info->usage));
+   assert(tiling != ISL_TILING_LINEAR);
+
    /* More obvious restrictions */
-   if (isl_surf_usage_is_display(info->usage))
-      return false;
-   if (tiling == ISL_TILING_LINEAR)
-      return false;
    if (info->levels > 1)
       return false;
 

Reply via email to