summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2014-08-08 14:30:25 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2014-08-11 11:40:32 -0700
commitf5cc3fdcf1680b116612fac7c39f1bd79f5e555e (patch)
treeba2008c83a046d3e7e42a5c947a31664ed9db921 /src/mesa/drivers/dri/i965/brw_fs_cse.cpp
parent34ee3f5a343a9a9dde16994e35bb0b7ba8eab07a (diff)
i965/cse: Don't eliminate instructions with side-effects
This casues problems when converting atomics to use the GRF. Sometimes the atomic operation would get eaten by CSE when it shouldn't. v2: Roll the has_side_effects check into is_expression Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs_cse.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_cse.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
index 01790ada8b..033c09e0f8 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
@@ -103,7 +103,7 @@ is_expression(const fs_inst *const inst)
case SHADER_OPCODE_LOAD_PAYLOAD:
return !is_copy_payload(inst);
default:
- return inst->is_send_from_grf();
+ return inst->is_send_from_grf() && !inst->has_side_effects();
}
}