From 94f65d095a1365b69a041302b473e40c6ccae3c3 Mon Sep 17 00:00:00 2001 From: Hui Qi Tay Date: Tue, 28 Sep 2010 17:49:25 +0100 Subject: draw: cliptest and viewport done in a single loop in vertex shader Cliptesting now done at the end of vs in draw_llvm instead of draw_pt_post_vs. Added viewport mapping transformation and further cliptesting to vertex shader in draw_llvm.c Alternative path where vertex header setup, clip coordinates store, cliptesting and viewport mapping are done earlier in the vertex shader. Still need to hook this up properly according to the return value of "draw_llvm_shader" function. --- src/gallium/auxiliary/draw/draw_llvm.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gallium/auxiliary/draw/draw_llvm.h') diff --git a/src/gallium/auxiliary/draw/draw_llvm.h b/src/gallium/auxiliary/draw/draw_llvm.h index b881ef6..1142ea5 100644 --- a/src/gallium/auxiliary/draw/draw_llvm.h +++ b/src/gallium/auxiliary/draw/draw_llvm.h @@ -120,7 +120,7 @@ struct draw_jit_context lp_build_struct_get_ptr(_builder, _ptr, 0, "id") #define draw_jit_header_clip(_builder, _ptr) \ - lp_build_struct_get(_builder, _ptr, 1, "clip") + lp_build_struct_get_ptr(_builder, _ptr, 1, "clip") #define draw_jit_header_data(_builder, _ptr) \ lp_build_struct_get_ptr(_builder, _ptr, 2, "data") @@ -136,7 +136,7 @@ struct draw_jit_context lp_build_struct_get(_builder, _ptr, 2, "buffer_offset") -typedef void +typedef int (*draw_jit_vert_func)(struct draw_jit_context *context, struct vertex_header *io, const char *vbuffers[PIPE_MAX_ATTRIBS], @@ -147,7 +147,7 @@ typedef void unsigned instance_id); -typedef void +typedef int (*draw_jit_vert_func_elts)(struct draw_jit_context *context, struct vertex_header *io, const char *vbuffers[PIPE_MAX_ATTRIBS], -- cgit v1.1