summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/draw
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2007-10-15 09:59:19 -0400
committerZack Rusin <[email protected]>2007-10-24 11:21:03 -0400
commit5ffdada717466a78b5b148764ba23c7a95098887 (patch)
treec7005dde4cfd245d650b21278f8d358397a34564 /src/mesa/pipe/draw
parent9e6d58fac26a12246e9e560f3802ebcbce2423bc (diff)
Execution engine is a singleton, for now keep it in the pipe.
Diffstat (limited to 'src/mesa/pipe/draw')
-rw-r--r--src/mesa/pipe/draw/draw_vertex_shader_llvm.c34
1 files changed, 32 insertions, 2 deletions
diff --git a/src/mesa/pipe/draw/draw_vertex_shader_llvm.c b/src/mesa/pipe/draw/draw_vertex_shader_llvm.c
index fd499010516..37315f75662 100644
--- a/src/mesa/pipe/draw/draw_vertex_shader_llvm.c
+++ b/src/mesa/pipe/draw/draw_vertex_shader_llvm.c
@@ -98,6 +98,10 @@ 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.
@@ -109,10 +113,33 @@ void draw_vertex_shader_queue_flush_llvm(struct draw_context *draw)
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 (*consts)[4] = (float (*)[4]) draw->mapped_constants;
struct ga_llvm_prog *prog = draw->vertex_shader->state->llvm_prog;
- fprintf(stderr, "--- XX q(%d) ", draw->vs.queue_nr);
+ 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) {
@@ -122,9 +149,12 @@ 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, dests, consts,
+ ga_llvm_prog_exec(prog, inputs, outputs, consts,
draw->vs.queue_nr,
draw->vertex_info.num_attribs);
+ /* FIXME: finish conversion */
+ /* dests = outputs */
+
draw->vs.queue_nr = 0;
}