From 6dc4e6ae15676cf4acdebb9c798bfa4083ad1e14 Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Wed, 7 Nov 2007 13:26:45 -0500 Subject: Redo the way we pass arguments to the llvm. simply pass aligned arrays, they should cast to vectors without any problems. also remove unnecessary memset --- src/mesa/pipe/draw/draw_vertex_shader_llvm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/mesa/pipe/draw') diff --git a/src/mesa/pipe/draw/draw_vertex_shader_llvm.c b/src/mesa/pipe/draw/draw_vertex_shader_llvm.c index 10fd33fbdee..34a4d276840 100644 --- a/src/mesa/pipe/draw/draw_vertex_shader_llvm.c +++ b/src/mesa/pipe/draw/draw_vertex_shader_llvm.c @@ -115,13 +115,12 @@ void draw_vertex_shader_queue_flush_llvm(struct draw_context *draw) unsigned i; struct vertex_header *dests[VS_QUEUE_LENGTH]; - float inputs[VS_QUEUE_LENGTH][PIPE_MAX_SHADER_INPUTS][4]; - float outputs[VS_QUEUE_LENGTH][PIPE_MAX_SHADER_INPUTS][4]; + float inputs[VS_QUEUE_LENGTH][PIPE_MAX_SHADER_INPUTS][4] ALIGN16_ATTRIB; + float outputs[VS_QUEUE_LENGTH][PIPE_MAX_SHADER_INPUTS][4] ALIGN16_ATTRIB; float (*consts)[4] = (float (*)[4]) draw->user.constants; struct gallivm_prog *prog = draw->vertex_shader->llvm_prog; const float *scale = draw->viewport.scale; const float *trans = draw->viewport.translate; - /* fetch the inputs */ for (i = 0; i < draw->vs.queue_nr; ++i) { unsigned elt = draw->vs.queue[i].elt; @@ -135,6 +134,7 @@ void draw_vertex_shader_queue_flush_llvm(struct draw_context *draw) draw->vertex_shader->state->num_inputs, draw->vertex_info.num_attribs - 2); + /* store machine results */ for (int i = 0; i < draw->vs.queue_nr; ++i) { unsigned slot; @@ -158,7 +158,6 @@ void draw_vertex_shader_queue_flush_llvm(struct draw_context *draw) vOut->clipmask = compute_clipmask(vOut->clip, draw->plane, draw->nr_planes); vOut->edgeflag = 1; - /* divide by w */ w = 1.0f / w; x *= w; -- cgit v1.2.3