diff options
author | Zack Rusin <[email protected]> | 2013-04-09 05:01:54 -0700 |
---|---|---|
committer | Zack Rusin <[email protected]> | 2013-04-10 12:33:59 -0700 |
commit | d56f2d52675397610717875c4a2a5edb04e2c997 (patch) | |
tree | b18c21d14710c07924f7ceebf9a35aba10dd638c /src/gallium/auxiliary/gallivm/lp_bld_tgsi.h | |
parent | c1cd19c3b8339a48024e381515806186b8056256 (diff) |
gallivm: fix loops and conditionals within GS
We were using simple temporaries, without using alloca or phi
nodes which meant that on every iteration of the loop our
temporaries, which were holding the number of vertices and
primitives which were emitted, were being reset to zero. Now
we're using alloca to allocate those variables to preserve
them across conditionals.
Signed-off-by: Zack Rusin <[email protected]>
Reviewed-by: Jose Fonseca <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_tgsi.h')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_tgsi.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h index 558a8dd7dd8..23ccaccc15e 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h @@ -393,9 +393,9 @@ struct lp_build_tgsi_soa_context struct lp_build_context elem_bld; const struct lp_build_tgsi_gs_iface *gs_iface; - LLVMValueRef emitted_prims_vec; - LLVMValueRef total_emitted_vertices_vec; - LLVMValueRef emitted_vertices_vec; + LLVMValueRef emitted_prims_vec_ptr; + LLVMValueRef total_emitted_vertices_vec_ptr; + LLVMValueRef emitted_vertices_vec_ptr; /* if a shader doesn't have ENDPRIM instruction but it has * a number of EMIT instructions it means the END instruction * implicitly invokes ENDPRIM. handle this via a flag here |