summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2010-02-08 18:05:22 -0500
committerZack Rusin <[email protected]>2010-02-08 18:22:11 -0500
commitc61bf363937f40624a5632745630d4f2b9907082 (patch)
treebb2388269117d6783400e17957ff8b0a68dfb5b5 /src/gallium/auxiliary/draw
parent74d23546c79fe8c8d87588fa423040e3b19a8fc6 (diff)
llvmpipe: export the tgsi translation code to a common layer
the llvmpipe tgsi translation is a lot more complete than what was in gallivm so replacing the latter with the former. this is needed since the draw llvm paths will use the same code. effectively the proven llvmpipe code becomes gallivm.
Diffstat (limited to 'src/gallium/auxiliary/draw')
-rw-r--r--src/gallium/auxiliary/draw/draw_private.h6
-rw-r--r--src/gallium/auxiliary/draw/draw_vs_llvm.c31
2 files changed, 0 insertions, 37 deletions
diff --git a/src/gallium/auxiliary/draw/draw_private.h b/src/gallium/auxiliary/draw/draw_private.h
index 69466d8749d..1e6e01af9e2 100644
--- a/src/gallium/auxiliary/draw/draw_private.h
+++ b/src/gallium/auxiliary/draw/draw_private.h
@@ -48,8 +48,6 @@
struct pipe_context;
-struct gallivm_prog;
-struct gallivm_cpu_engine;
struct draw_vertex_shader;
struct draw_context;
struct draw_stage;
@@ -193,10 +191,6 @@ struct draw_context
uint num_samplers;
struct tgsi_sampler **samplers;
- /* This (and the tgsi_exec_machine struct) probably need to be moved somewhere private.
- */
- struct gallivm_cpu_engine *engine;
-
/* Here's another one:
*/
struct aos_machine *aos_machine;
diff --git a/src/gallium/auxiliary/draw/draw_vs_llvm.c b/src/gallium/auxiliary/draw/draw_vs_llvm.c
index fd9166fda58..5f7a645f5d8 100644
--- a/src/gallium/auxiliary/draw/draw_vs_llvm.c
+++ b/src/gallium/auxiliary/draw/draw_vs_llvm.c
@@ -42,11 +42,8 @@
#ifdef MESA_LLVM
-#include "gallivm/gallivm.h"
-
struct draw_llvm_vertex_shader {
struct draw_vertex_shader base;
- struct gallivm_prog *llvm_prog;
struct tgsi_exec_machine *machine;
};
@@ -58,8 +55,6 @@ vs_llvm_prepare( struct draw_vertex_shader *base,
}
-
-
static void
vs_llvm_run_linear( struct draw_vertex_shader *base,
const float (*input)[4],
@@ -71,11 +66,6 @@ vs_llvm_run_linear( struct draw_vertex_shader *base,
{
struct draw_llvm_vertex_shader *shader =
(struct draw_llvm_vertex_shader *)base;
-
- gallivm_cpu_vs_exec(shader->llvm_prog, shader->machine,
- input, base->info.num_inputs, output, base->info.num_outputs,
- (const float (*)[4])constants[0],
- count, input_stride, output_stride);
}
@@ -122,27 +112,6 @@ draw_create_vs_llvm(struct draw_context *draw,
vs->base.delete = vs_llvm_delete;
vs->machine = draw->vs.machine;
- {
- struct gallivm_ir *ir = gallivm_ir_new(GALLIVM_VS);
- gallivm_ir_set_layout(ir, GALLIVM_SOA);
- gallivm_ir_set_components(ir, 4);
- gallivm_ir_fill_from_tgsi(ir, vs->base.state.tokens);
- vs->llvm_prog = gallivm_ir_compile(ir);
- gallivm_ir_delete(ir);
- }
-
- draw->vs.engine = gallivm_global_cpu_engine();
-
- /* XXX: Why are there two versions of this? Shouldn't creating the
- * engine be a separate operation to compiling a shader?
- */
- if (!draw->vs.engine) {
- draw->vs.engine = gallivm_cpu_engine_create(vs->llvm_prog);
- }
- else {
- gallivm_cpu_jit_compile(draw->vs.engine, vs->llvm_prog);
- }
-
return &vs->base;
}