summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/draw
diff options
context:
space:
mode:
authorZack Rusin <zack@tungstengraphics.com>2007-11-07 13:26:45 -0500
committerZack Rusin <zack@tungstengraphics.com>2007-12-11 09:49:33 -0500
commit6dc4e6ae15676cf4acdebb9c798bfa4083ad1e14 (patch)
tree3bf05cec05d14cf6d907c8b6b41a03459a8c6550 /src/mesa/pipe/draw
parent9d6e6e86d9592afbdbaa83fc89891e6813fc3f2f (diff)
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
Diffstat (limited to 'src/mesa/pipe/draw')
-rw-r--r--src/mesa/pipe/draw/draw_vertex_shader_llvm.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mesa/pipe/draw/draw_vertex_shader_llvm.c b/src/mesa/pipe/draw/draw_vertex_shader_llvm.c
index 10fd33fbde..34a4d27684 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;