On 03/15/2013 12:34 PM, srol...@vmware.com wrote:
From: Roland Scheidegger<srol...@vmware.com>
If we're in some conditional we must not return, or the code after
the condition is never executed.
(Probably the same for loops.)
This fixes https://bugs.freedesktop.org/show_bug.cgi?id=62357.
Note: This is a candidate for the stable branches.
---
src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
index 0dc26b5..b5f0ace 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
@@ -348,7 +348,9 @@ static void lp_exec_mask_ret(struct lp_exec_mask *mask, int
*pc)
LLVMBuilderRef builder = mask->bld->gallivm->builder;
LLVMValueRef exec_mask;
- if (mask->call_stack_size == 0) {
+ if (mask->call_stack_size == 0&&
+ mask->cond_stack_size == 0&&
+ mask->loop_stack_size == 0) {
/* returning from main() */
*pc = -1;
return;
Reviewed-by: Brian Paul <bri...@vmware.com>
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev