summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/llvm
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2007-10-31 06:51:19 -0400
committerZack Rusin <[email protected]>2007-11-02 07:15:17 -0400
commit7ff0df6c2bf11a36bc6101e361484bde57595a79 (patch)
tree62c3b8911fa5d35e5e9d524db3e8775e9799b1f6 /src/mesa/pipe/llvm
parentd8e66aca8443c6802ecd8f1a353024ed1d0f32c3 (diff)
Renaming llvmtgsi to gallivm. Taking first steps on the way to supporting
fragment shaders through llvm.
Diffstat (limited to 'src/mesa/pipe/llvm')
-rw-r--r--src/mesa/pipe/llvm/gallivm.cpp (renamed from src/mesa/pipe/llvm/llvmtgsi.cpp)10
-rw-r--r--src/mesa/pipe/llvm/gallivm.h (renamed from src/mesa/pipe/llvm/llvmtgsi.h)1
2 files changed, 10 insertions, 1 deletions
diff --git a/src/mesa/pipe/llvm/llvmtgsi.cpp b/src/mesa/pipe/llvm/gallivm.cpp
index c787f3ab9f2..b09a2ff8ee4 100644
--- a/src/mesa/pipe/llvm/llvmtgsi.cpp
+++ b/src/mesa/pipe/llvm/gallivm.cpp
@@ -31,7 +31,7 @@
*/
#ifdef MESA_LLVM
-#include "llvmtgsi.h"
+#include "gallivm.h"
#include "instructions.h"
#include "storage.h"
@@ -828,6 +828,7 @@ void gallivm_prog_dump(struct gallivm_prog *prog, const char *file_prefix)
}
+static struct gallivm_cpu_engine *CPU = 0;
/*!
This function creates a CPU based execution engine for the given gallivm_prog.
gallivm_cpu_engine should be used as a singleton throughout the library. Before
@@ -847,6 +848,7 @@ struct gallivm_cpu_engine * gallivm_cpu_engine_create(struct gallivm_prog *prog)
llvm::Function *func = mod->getFunction("run_vertex_shader");
prog->function = ee->getPointerToFunctionOrStub(func);
+ CPU = cpu;
return cpu;
}
@@ -874,6 +876,12 @@ void gallivm_cpu_engine_delete(struct gallivm_cpu_engine *cpu)
free(cpu);
}
+struct gallivm_cpu_engine * gallivm_global_cpu_engine()
+{
+ return CPU;
+}
+
#endif /* MESA_LLVM */
+
diff --git a/src/mesa/pipe/llvm/llvmtgsi.h b/src/mesa/pipe/llvm/gallivm.h
index dadc0ea4553..b4e98c881b2 100644
--- a/src/mesa/pipe/llvm/llvmtgsi.h
+++ b/src/mesa/pipe/llvm/gallivm.h
@@ -59,6 +59,7 @@ void gallivm_prog_dump(struct gallivm_prog *prog, const char *file_prefix);
struct gallivm_cpu_engine *gallivm_cpu_engine_create(struct gallivm_prog *prog);
+struct gallivm_cpu_engine *gallivm_global_cpu_engine();
void gallivm_cpu_jit_compile(struct gallivm_cpu_engine *ee, struct gallivm_prog *prog);
void gallivm_cpu_engine_delete(struct gallivm_cpu_engine *ee);