intel/fs: Disable opt_sampler_eot() in 32-wide dispatch.
authorFrancisco Jerez <currojerez@riseup.net>
Tue, 26 Apr 2016 00:08:42 +0000 (17:08 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 28 Jun 2018 20:19:38 +0000 (13:19 -0700)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/intel/compiler/brw_fs.cpp
src/intel/compiler/brw_fs_generator.cpp

index 84becb3d4b43f7f051325b507cfcd72f4937878a..bf301f4424bb3b4391ffe0fb7554e496272ef4c8 100644 (file)
@@ -2666,7 +2666,7 @@ fs_visitor::opt_sampler_eot()
 {
    brw_wm_prog_key *key = (brw_wm_prog_key*) this->key;
 
-   if (stage != MESA_SHADER_FRAGMENT)
+   if (stage != MESA_SHADER_FRAGMENT || dispatch_width > 16)
       return false;
 
    if (devinfo->gen != 9 && !devinfo->is_cherryview)
index 2265a60d1a654f67357b19ea74e370bddd872a85..0134afe0fe65fdac6a909b93ff6f8be83c982ae4 100644 (file)
@@ -887,6 +887,11 @@ fs_generator::generate_tex(fs_inst *inst, struct brw_reg dst, struct brw_reg src
    uint32_t return_format;
    bool is_combined_send = inst->eot;
 
+   /* Sampler EOT message of less than the dispatch width would kill the
+    * thread prematurely.
+    */
+   assert(!is_combined_send || inst->exec_size == dispatch_width);
+
    switch (dst.type) {
    case BRW_REGISTER_TYPE_D:
       return_format = BRW_SAMPLER_RETURN_FORMAT_SINT32;