isl: allow compression for storage images on gen12+
authorTapani Pälli <tapani.palli@intel.com>
Fri, 6 Mar 2020 07:27:13 +0000 (09:27 +0200)
committerMarge Bot <eric+marge@anholt.net>
Mon, 16 Mar 2020 10:34:21 +0000 (10:34 +0000)
This is done to be able to use ISL_AUX_USAGE_CCS_E with images.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4080>

src/intel/isl/isl_surface_state.c

index ddc51db8d23ddaebadb48621f7d870112571d88e..7aba99fbebfd62f821186368f1f2e4fcea3ab241 100644 (file)
@@ -609,8 +609,11 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state,
       /* The docs don't appear to say anything whatsoever about compression
        * and the data port.  Testing seems to indicate that the data port
        * completely ignores the AuxiliarySurfaceMode field.
       /* The docs don't appear to say anything whatsoever about compression
        * and the data port.  Testing seems to indicate that the data port
        * completely ignores the AuxiliarySurfaceMode field.
+       *
+       * On gen12 HDC supports compression.
        */
        */
-      assert(!(info->view->usage & ISL_SURF_USAGE_STORAGE_BIT));
+      if (GEN_GEN < 12)
+         assert(!(info->view->usage & ISL_SURF_USAGE_STORAGE_BIT));
 
       if (isl_surf_usage_is_depth(info->surf->usage))
          assert(isl_aux_usage_has_hiz(info->aux_usage));
 
       if (isl_surf_usage_is_depth(info->surf->usage))
          assert(isl_aux_usage_has_hiz(info->aux_usage));