Mesa (master): i965/fs: Don't perform CSE on inst HW_REG dests (unless it' s null)
Matt Turner
mattst88 at kemper.freedesktop.org
Sat Nov 9 17:13:04 UTC 2013
Module: Mesa
Branch: master
Commit: 68349e52194b7eba521b88d42ee8db3bfdf0a877
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=68349e52194b7eba521b88d42ee8db3bfdf0a877
Author: Matt Turner <mattst88 at gmail.com>
Date: Thu Nov 7 15:09:33 2013 -0800
i965/fs: Don't perform CSE on inst HW_REG dests (unless it's null)
Commit b16b3c87 began performing CSE on CMP instructions with null
destinations. I relaxed the restrictions a bit too much, thereby
allowing CSE to be performed on instructions with, for instance, an
explicit accumulator destination.
This broke the arb_gpu_shader5/fs-imulExtended shader tests because
they emit MUL instructions with the accumulator as the destination. CSE
would instead cause the MUL to write to a GRF, which is lower precision
than the accumulator.
Reviewed-by: Eric Anholt <eric at anholt.net>
Cc: 10.0 <mesa-stable at lists.freedesktop.org>
---
src/mesa/drivers/dri/i965/brw_fs_cse.cpp | 3 ++-
1 files changed, 2 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 4793874..27541db 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
@@ -129,7 +129,8 @@ fs_visitor::opt_cse_local(bblock_t *block, exec_list *aeb)
inst = (fs_inst *) inst->next) {
/* Skip some cases. */
- if (is_expression(inst) && !inst->is_partial_write())
+ if (is_expression(inst) && !inst->is_partial_write() &&
+ (inst->dst.file != HW_REG || inst->dst.is_null()))
{
bool found = false;
More information about the mesa-commit
mailing list