summaryrefslogtreecommitdiff
path: root/src/mesa/pipe
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe')
-rw-r--r--src/mesa/pipe/draw/draw_private.h2
-rw-r--r--src/mesa/pipe/draw/draw_vertex_fetch.c4
-rw-r--r--src/mesa/pipe/draw/draw_vertex_shader.c7
-rw-r--r--src/mesa/pipe/draw/draw_vertex_shader_llvm.c4
-rw-r--r--src/mesa/pipe/llvm/llvmtgsi.cpp6
-rw-r--r--src/mesa/pipe/llvm/llvmtgsi.h4
-rw-r--r--src/mesa/pipe/softpipe/sp_quad_fs.c4
7 files changed, 26 insertions, 5 deletions
diff --git a/src/mesa/pipe/draw/draw_private.h b/src/mesa/pipe/draw/draw_private.h
index b672cc2e8b..e4c0551124 100644
--- a/src/mesa/pipe/draw/draw_private.h
+++ b/src/mesa/pipe/draw/draw_private.h
@@ -251,7 +251,9 @@ extern void draw_vertex_cache_reset_vertex_ids( struct draw_context *draw );
extern void draw_vertex_shader_queue_flush( struct draw_context *draw );
+#ifdef MESA_LLVM
extern void draw_vertex_shader_queue_flush_llvm( struct draw_context *draw );
+#endif
struct tgsi_exec_machine;
diff --git a/src/mesa/pipe/draw/draw_vertex_fetch.c b/src/mesa/pipe/draw/draw_vertex_fetch.c
index 1b093b7342..de1cd06da6 100644
--- a/src/mesa/pipe/draw/draw_vertex_fetch.c
+++ b/src/mesa/pipe/draw/draw_vertex_fetch.c
@@ -96,7 +96,7 @@ void draw_vertex_fetch( struct draw_context *draw,
for (j = 0; j < count; j++) {
uint attr;
- printf("fetch vertex %u: \n", j);
+ /*printf("fetch vertex %u: \n", j);*/
/* loop over vertex attributes (vertex shader inputs) */
for (attr = 0; attr < draw->vertex_shader->state->num_inputs; attr++) {
@@ -111,7 +111,7 @@ void draw_vertex_fetch( struct draw_context *draw,
fetch_attrib4(src, draw->vertex_element[attr].src_format, p);
- printf("> %u: %f %f %f %f\n", attr, p[0], p[1], p[2], p[3]);
+ /*printf(" %u: %f %f %f %f\n", attr, p[0], p[1], p[2], p[3]);*/
/* Transform to AoS xxxx/yyyy/zzzz/wwww representation:
*/
diff --git a/src/mesa/pipe/draw/draw_vertex_shader.c b/src/mesa/pipe/draw/draw_vertex_shader.c
index fb20dfa4e1..24cbf20fc7 100644
--- a/src/mesa/pipe/draw/draw_vertex_shader.c
+++ b/src/mesa/pipe/draw/draw_vertex_shader.c
@@ -161,6 +161,10 @@ run_vertex_program(struct draw_context *draw,
vOut[j]->data[slot][3] = machine->Outputs[slot].xyzw[3].f[j];
#if DBG
printf("output[%d][%d]: %f %f %f %f\n", j, slot,
+ vOut[j]->data[slot][0],
+ vOut[j]->data[slot][1],
+ vOut[j]->data[slot][2],
+ vOut[j]->data[slot][3]);
#endif
}
} /* loop over vertices */
@@ -175,10 +179,13 @@ void draw_vertex_shader_queue_flush( struct draw_context *draw )
{
unsigned i, j;
+// fprintf(stderr, " q(%d) ", draw->vs.queue_nr );
+#ifdef MESA_LLVM
if (draw->vertex_shader->state->llvm_prog) {
draw_vertex_shader_queue_flush_llvm(draw);
return;
}
+#endif
/* run vertex shader on vertex cache entries, four per invokation */
for (i = 0; i < draw->vs.queue_nr; i += 4) {
diff --git a/src/mesa/pipe/draw/draw_vertex_shader_llvm.c b/src/mesa/pipe/draw/draw_vertex_shader_llvm.c
index bcc44f7980..99f0aca9e5 100644
--- a/src/mesa/pipe/draw/draw_vertex_shader_llvm.c
+++ b/src/mesa/pipe/draw/draw_vertex_shader_llvm.c
@@ -35,6 +35,8 @@
#include "draw_context.h"
#include "draw_vertex.h"
+#ifdef MESA_LLVM
+
#include "pipe/llvm/llvmtgsi.h"
#include "pipe/tgsi/exec/tgsi_core.h"
@@ -199,3 +201,5 @@ void draw_vertex_shader_queue_flush_llvm(struct draw_context *draw)
draw->vs.queue_nr = 0;
}
+
+#endif /* MESA_LLVM */
diff --git a/src/mesa/pipe/llvm/llvmtgsi.cpp b/src/mesa/pipe/llvm/llvmtgsi.cpp
index ade4573fb8..066175cdf9 100644
--- a/src/mesa/pipe/llvm/llvmtgsi.cpp
+++ b/src/mesa/pipe/llvm/llvmtgsi.cpp
@@ -10,7 +10,6 @@
#include "pipe/tgsi/exec/tgsi_util.h"
#include "pipe/tgsi/exec/tgsi_parse.h"
#include "pipe/tgsi/exec/tgsi_dump.h"
-//#include "pipe/tgsi/tgsi_platform.h"
#include <llvm/Module.h>
#include <llvm/CallingConv.h>
@@ -36,6 +35,7 @@
#include <fstream>
#include <iostream>
+#ifdef MESA_LLVM
struct ga_llvm_prog {
void *module;
@@ -159,7 +159,7 @@ translate_instruction(llvm::Module *module,
} else if (src->SrcRegister.File == TGSI_FILE_TEMPORARY) {
val = storage->tempElement(src->SrcRegister.Index);
} else {
- fprintf(stderr, "ERROR: not support llvm source\n");
+ fprintf(stderr, "ERROR: not supported llvm source\n");
return;
}
@@ -751,3 +751,5 @@ void ga_llvm_prog_dump(struct ga_llvm_prog *prog, const char *file_prefix)
std::cout<<"; ---------- End shader "<<prog->id<<std::endl;
}
}
+
+#endif /* MESA_LLVM */
diff --git a/src/mesa/pipe/llvm/llvmtgsi.h b/src/mesa/pipe/llvm/llvmtgsi.h
index 2b9540f747..40798f9217 100644
--- a/src/mesa/pipe/llvm/llvmtgsi.h
+++ b/src/mesa/pipe/llvm/llvmtgsi.h
@@ -7,6 +7,8 @@ extern "C" {
#include "pipe/p_state.h"
+#ifdef MESA_LLVM
+
struct tgsi_exec_machine;
struct tgsi_token;
struct tgsi_sampler;
@@ -29,6 +31,8 @@ int ga_llvm_prog_exec(struct ga_llvm_prog *prog,
void ga_llvm_prog_dump(struct ga_llvm_prog *prog, const char *file_prefix);
+#endif /* MESA_LLVM */
+
#if defined __cplusplus
} // extern "C"
#endif
diff --git a/src/mesa/pipe/softpipe/sp_quad_fs.c b/src/mesa/pipe/softpipe/sp_quad_fs.c
index 00afcd930a..3371b109fc 100644
--- a/src/mesa/pipe/softpipe/sp_quad_fs.c
+++ b/src/mesa/pipe/softpipe/sp_quad_fs.c
@@ -109,7 +109,9 @@ shade_quad(
machine->InterpCoefs );
}
else {
- //ga_llvm_prog_exec(softpipe->fs->llvm_prog);
+#ifdef MESA_LLVM
+ /*ga_llvm_prog_exec(softpipe->fs->llvm_prog);*/
+#endif
quad->mask &= tgsi_exec_machine_run( machine );
}