intel/fs: Disable SIMD32 dispatch for fragment shaders with discard.
authorFrancisco Jerez <currojerez@riseup.net>
Fri, 6 Jan 2017 01:51:51 +0000 (17:51 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 28 Jun 2018 20:19:38 +0000 (13:19 -0700)
Current discard handling requires dedicating the second flag register to
discard.  However, control-flow in SIMD32 requires both flag registers
so it's incompatible with the current discard handling.  Just don't
support SIMD32+discard for now.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/intel/compiler/brw_fs_nir.cpp

index 9273b300241b5c88eec5f8cec11f3e802fcffdee..7ee68debad278293cc55e6b248bce25c6020cdc3 100644 (file)
@@ -3361,6 +3361,8 @@ fs_visitor::nir_emit_fs_intrinsic(const fs_builder &bld,
       if (devinfo->gen >= 6) {
          emit_discard_jump();
       }
+
+      limit_dispatch_width(16, "Fragment discard not implemented in SIMD32 mode.");
       break;
    }