From: Brian Paul Date: Wed, 26 Nov 2008 16:35:08 +0000 (-0700) Subject: mesa: add missing size check for assignment optimization X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aa40de5c6f7f70844d4a4c726456cceaee9f0e4d;p=mesa.git mesa: add missing size check for assignment optimization --- diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index f31e9b4e6c7..e3cb252a3d7 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -1324,7 +1324,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