summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c
diff options
context:
space:
mode:
authorHui Qi Tay <tayhuiqithq@gmail.com>2010-09-28 17:52:14 +0100
committerKeith Whitwell <keithw@vmware.com>2010-09-29 10:11:59 +0100
commit3744d1c7d30543520cede8a6c580f26985978953 (patch)
treefc73d4e5ca0d83c9998fde9e1511253386c2ea0e /src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c
parent94f65d095a1365b69a041302b473e40c6ccae3c3 (diff)
draw: added viewport and cliptest flags
Corrections in store_clip to store clip coordinates in AoS form. Viewport & cliptest flag options based on variant key. Put back draw_pt_post_vs and now 2 paths based on whether clipping occurs or not.
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c
index 77291e304e..dc138b980d 100644
--- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c
+++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c
@@ -217,6 +217,7 @@ llvm_pipeline_generic( struct draw_pt_middle_end *middle,
struct draw_vertex_info gs_vert_info;
struct draw_vertex_info *vert_info;
unsigned opt = fpme->opt;
+ unsigned clipped = 0;
llvm_vert_info.count = fetch_info->count;
llvm_vert_info.vertex_size = fpme->vertex_size;
@@ -230,7 +231,7 @@ llvm_pipeline_generic( struct draw_pt_middle_end *middle,
}
if (fetch_info->linear)
- fpme->current_variant->jit_func( &fpme->llvm->jit_context,
+ clipped = fpme->current_variant->jit_func( &fpme->llvm->jit_context,
llvm_vert_info.verts,
(const char **)draw->pt.user.vbuffer,
fetch_info->start,
@@ -239,7 +240,7 @@ llvm_pipeline_generic( struct draw_pt_middle_end *middle,
draw->pt.vertex_buffer,
draw->instance_id);
else
- fpme->current_variant->jit_func_elts( &fpme->llvm->jit_context,
+ clipped = fpme->current_variant->jit_func_elts( &fpme->llvm->jit_context,
llvm_vert_info.verts,
(const char **)draw->pt.user.vbuffer,
fetch_info->elts,
@@ -266,6 +267,9 @@ llvm_pipeline_generic( struct draw_pt_middle_end *middle,
FREE(vert_info->verts);
vert_info = &gs_vert_info;
prim_info = &gs_prim_info;
+
+ clipped = draw_pt_post_vs_run( fpme->post_vs, vert_info );
+
}
/* stream output needs to be done before clipping */
@@ -273,11 +277,11 @@ llvm_pipeline_generic( struct draw_pt_middle_end *middle,
vert_info,
prim_info );
- if (draw_pt_post_vs_run( fpme->post_vs, vert_info )) {
+ if (clipped) {
opt |= PT_PIPELINE;
}
- /* Do we need to run the pipeline?
+ /* Do we need to run the pipeline? Now will come here if clipped
*/
if (opt & PT_PIPELINE) {
pipeline( fpme,