summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/draw
diff options
context:
space:
mode:
authorZack Rusin <zack@tungstengraphics.com>2007-10-16 05:41:06 -0400
committerZack Rusin <zack@tungstengraphics.com>2007-10-24 11:21:03 -0400
commit5e0205023e8e6a08b0eb61286e15eb095f32ab3d (patch)
tree6261e444496113f5558a8bb041c57f10c8d0a2dd /src/mesa/pipe/draw
parent5ffdada717466a78b5b148764ba23c7a95098887 (diff)
Cleanup some of the testing code. Implement first pass at actually
running shaders in llvm.
Diffstat (limited to 'src/mesa/pipe/draw')
-rw-r--r--src/mesa/pipe/draw/draw_vertex_shader.c1
-rw-r--r--src/mesa/pipe/draw/draw_vertex_shader_llvm.c29
2 files changed, 2 insertions, 28 deletions
diff --git a/src/mesa/pipe/draw/draw_vertex_shader.c b/src/mesa/pipe/draw/draw_vertex_shader.c
index 874259e727..e36ecdc849 100644
--- a/src/mesa/pipe/draw/draw_vertex_shader.c
+++ b/src/mesa/pipe/draw/draw_vertex_shader.c
@@ -132,6 +132,7 @@ run_vertex_program(struct draw_context *draw,
y = vOut[j]->clip[1] = machine->Outputs[0].xyzw[1].f[j];
z = vOut[j]->clip[2] = machine->Outputs[0].xyzw[2].f[j];
w = vOut[j]->clip[3] = machine->Outputs[0].xyzw[3].f[j];
+ printf("output %d: %f %f %f %f\n", 0, x, y, z, w);
vOut[j]->clipmask = compute_clipmask(vOut[j]->clip, draw->plane, draw->nr_planes);
vOut[j]->edgeflag = 1;
diff --git a/src/mesa/pipe/draw/draw_vertex_shader_llvm.c b/src/mesa/pipe/draw/draw_vertex_shader_llvm.c
index 37315f7566..97a0480b5c 100644
--- a/src/mesa/pipe/draw/draw_vertex_shader_llvm.c
+++ b/src/mesa/pipe/draw/draw_vertex_shader_llvm.c
@@ -98,11 +98,6 @@ void vertex_fetch(struct draw_context *draw,
}
}
-void execute_shader(void *dests, void *inputs, void *consts)
-{
- fprintf(stderr, "EXECUTING--\n");
-}
-
/**
* Called by the draw module when the vertx cache needs to be flushed.
* This involves running the vertex shader.
@@ -118,28 +113,6 @@ void draw_vertex_shader_queue_flush_llvm(struct draw_context *draw)
struct ga_llvm_prog *prog = draw->vertex_shader->state->llvm_prog;
fprintf(stderr, "--- XX q(%d) \n", draw->vs.queue_nr);
- /* Consts does not require 16 byte alignment. */
- fprintf(stderr, "0AAAAA = %f %f %f %f\n",
- consts[0][0],
- consts[0][1],
- consts[0][2],
- consts[0][3]);
-
- fprintf(stderr, "1AAAAA = %f %f %f %f\n",
- consts[1][0],
- consts[1][1],
- consts[1][2],
- consts[1][3]);
- fprintf(stderr, "2AAAAA = %f %f %f %f\n",
- consts[2][0],
- consts[2][1],
- consts[2][2],
- consts[2][3]);
- fprintf(stderr, "3AAAAA = %f %f %f %f\n",
- consts[3][0],
- consts[3][1],
- consts[3][2],
- consts[3][3]);
/* fetch the inputs */
for (i = 0; i < draw->vs.queue_nr; ++i) {
@@ -151,7 +124,7 @@ void draw_vertex_shader_queue_flush_llvm(struct draw_context *draw)
/* batch execute the shaders on all the vertices */
ga_llvm_prog_exec(prog, inputs, outputs, consts,
draw->vs.queue_nr,
- draw->vertex_info.num_attribs);
+ draw->vertex_shader->state->num_inputs);
/* FIXME: finish conversion */
/* dests = outputs */