OSDN Git Service

i965/fs: Don't set dependency hints on instructions with spilled destinations
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 27 Oct 2014 23:50:12 +0000 (16:50 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 28 Oct 2014 00:54:10 +0000 (17:54 -0700)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp

index 2313af9..44c74a3 100644 (file)
@@ -881,6 +881,14 @@ fs_visitor::spill_reg(int spill_reg)
          inst->dst.reg = spill_src.reg;
          inst->dst.reg_offset = 0;
 
+         /* If we're immediately spilling the register, we should not use
+          * destination dependency hints.  Doing so will cause the GPU do
+          * try to read and write the register at the same time and may
+          * hang the GPU.
+          */
+         inst->no_dd_clear = false;
+         inst->no_dd_check = false;
+
         /* If our write is going to affect just part of the
           * inst->regs_written(), then we need to unspill the destination
           * since we write back out all of the regs_written().