i965: Consider scratch writes to have side effects.
authorMatt Turner <mattst88@gmail.com>
Sat, 28 Feb 2015 21:36:21 +0000 (13:36 -0800)
committerMatt Turner <mattst88@gmail.com>
Mon, 2 Mar 2015 18:24:49 +0000 (10:24 -0800)
We could do better by tracking scratch reads and writes.

Cc: 10.5 <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88793
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/mesa/drivers/dri/i965/brw_shader.cpp

index fbb20bc06bb261e07556c37c8e25b92c3625cf96..ec3cfcbd255fd867729b650d99f72f84bb11dba7 100644 (file)
@@ -963,6 +963,7 @@ backend_instruction::has_side_effects() const
 {
    switch (opcode) {
    case SHADER_OPCODE_UNTYPED_ATOMIC:
+   case SHADER_OPCODE_GEN4_SCRATCH_WRITE:
    case SHADER_OPCODE_URB_WRITE_SIMD8:
    case FS_OPCODE_FB_WRITE:
       return true;