summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-11-26 09:35:08 -0700
committerBrian Paul <[email protected]>2009-01-06 09:03:06 -0700
commite42ed1ed0bb2c429f94dd10b193cf1b0892870bf (patch)
tree183dcd728bd15cc9f58a850d11e44382ad9cf116
parent96cab36e2ea39a8a9a8f70465c83f8520f3c9574 (diff)
mesa: add missing size check for assignment optimization
(cherry picked from commit aa40de5c6f7f70844d4a4c726456cceaee9f0e4d)
-rw-r--r--src/mesa/shader/slang/slang_emit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c
index 9266070844a..7b45195b60b 100644
--- a/src/mesa/shader/slang/slang_emit.c
+++ b/src/mesa/shader/slang/slang_emit.c
@@ -1321,7 +1321,8 @@ emit_copy(slang_emit_info *emitInfo, slang_ir_node *n)
_slang_is_temp(emitInfo->vt, n->Children[1]->Store) &&
(inst->DstReg.File == n->Children[1]->Store->File) &&
(inst->DstReg.Index == n->Children[1]->Store->Index) &&
- !n->Children[0]->Store->IsIndirect) {
+ !n->Children[0]->Store->IsIndirect &&
+ n->Children[0]->Store->Size <= 4) {
/* Peephole optimization:
* The Right-Hand-Side has its results in a temporary place.
* Modify the RHS (and the prev instruction) to store its results