intel/compiler: add restrictions related to coarse pixel shading
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Thu, 29 Oct 2020 13:17:16 +0000 (15:17 +0200)
committerMarge Bot <eric+marge@anholt.net>
Sun, 2 May 2021 20:20:06 +0000 (20:20 +0000)
v2: Update to BITSET_TEST()

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7455>

src/intel/compiler/brw_fs.cpp

index 46a9e7c..a876aa4 100644 (file)
@@ -1517,6 +1517,9 @@ fs_visitor::emit_samplemaskin_setup()
 
    fs_reg *reg = new(this->mem_ctx) fs_reg(vgrf(glsl_type::int_type));
 
+   /* The HW doesn't provide us with expected values. */
+   assert(!wm_prog_data->per_coarse_pixel_dispatch);
+
    fs_reg coverage_mask =
       fetch_payload_reg(bld, payload.sample_mask_in_reg, BRW_REGISTER_TYPE_D);
 
@@ -9262,6 +9265,15 @@ brw_compile_fs(const struct brw_compiler *compiler,
                                "using SIMD8 when dual src blending.\n");
    }
 
+   if (key->coarse_pixel) {
+      if (prog_data->dual_src_blend) {
+         v8->limit_dispatch_width(8, "SIMD16 coarse pixel shading cannot"
+                                  " use SIMD8 messages.\n");
+      }
+      v8->limit_dispatch_width(16, "SIMD32 not supported with coarse"
+                               " pixel shading.\n");
+   }
+
    if (!has_spilled &&
        v8->max_dispatch_width >= 16 &&
        (!(INTEL_DEBUG & DEBUG_NO16) || params->use_rep_send)) {