diff options
author | Brian Paul <[email protected]> | 2008-07-15 14:41:47 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-07-15 16:40:38 -0600 |
commit | 7d7d114e5963abf57ad50159524f830e430ec51d (patch) | |
tree | 24d147121fffc4f95041c6cdee2e47243a738aec /src/mesa/shader/slang | |
parent | 27e3f7f21d4405edbdbe98b5b62b1eaeec0d4aab (diff) |
mesa: fix storage size computation in emit_arith()
Diffstat (limited to 'src/mesa/shader/slang')
-rw-r--r-- | src/mesa/shader/slang/slang_emit.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 6d79380ab5f..b087483b020 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -539,8 +539,9 @@ emit_arith(slang_emit_info *emitInfo, slang_ir_node *n) /* result storage */ if (!n->Store) { - /* XXX this size isn't correct, it depends on the operands */ - if (!alloc_temp_storage(emitInfo, n, info->ResultSize)) + GLint size = n->Children[0]->Store + ? n->Children[0]->Store->Size : info->ResultSize; + if (!alloc_temp_storage(emitInfo, n, size)) return NULL; } storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); |