summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/llvm/gallivm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/llvm/gallivm.h')
-rw-r--r--src/mesa/pipe/llvm/gallivm.h44
1 files changed, 29 insertions, 15 deletions
diff --git a/src/mesa/pipe/llvm/gallivm.h b/src/mesa/pipe/llvm/gallivm.h
index 4695de3127..b104520cb7 100644
--- a/src/mesa/pipe/llvm/gallivm.h
+++ b/src/mesa/pipe/llvm/gallivm.h
@@ -43,31 +43,34 @@ extern "C" {
struct tgsi_token;
+struct gallivm_ir;
struct gallivm_prog;
struct gallivm_cpu_engine;
struct tgsi_interp_coef;
struct tgsi_sampler;
+struct tgsi_exec_vector;
enum gallivm_shader_type {
GALLIVM_VS,
GALLIVM_FS
};
-struct gallivm_prog *gallivm_from_tgsi(const struct tgsi_token *tokens, enum gallivm_shader_type type);
-void gallivm_prog_delete(struct gallivm_prog *prog);
-int gallivm_prog_exec(struct gallivm_prog *prog,
- float (*inputs)[PIPE_MAX_SHADER_INPUTS][4],
- float (*dests)[PIPE_MAX_SHADER_INPUTS][4],
- float (*consts)[4],
- int num_vertices,
- int num_inputs,
- int num_attribs);
-int gallivm_fragment_shader_exec(struct gallivm_prog *prog,
- float x, float y,
- float (*dests)[PIPE_MAX_SHADER_INPUTS][4],
- float (*inputs)[PIPE_MAX_SHADER_INPUTS][4],
- float (*consts)[4],
- struct tgsi_sampler *samplers);
+enum gallivm_vector_layout {
+ GALLIVM_AOS,
+ GALLIVM_SOA
+};
+
+struct gallivm_ir *gallivm_ir_new(enum gallivm_shader_type type);
+void gallivm_ir_set_layout(struct gallivm_ir *ir,
+ enum gallivm_vector_layout layout);
+void gallivm_ir_set_components(struct gallivm_ir *ir, int num);
+void gallivm_ir_fill_from_tgsi(struct gallivm_ir *ir,
+ const struct tgsi_token *tokens);
+void gallivm_ir_delete(struct gallivm_ir *ir);
+
+
+struct gallivm_prog *gallivm_ir_compile(struct gallivm_ir *ir);
+
void gallivm_prog_inputs_interpolate(struct gallivm_prog *prog,
float (*inputs)[PIPE_MAX_SHADER_INPUTS][4],
const struct tgsi_interp_coef *coefs);
@@ -76,9 +79,20 @@ 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();
+int gallivm_cpu_vs_exec(struct gallivm_prog *prog,
+ struct tgsi_exec_vector *inputs,
+ struct tgsi_exec_vector *dests,
+ float (*consts)[4]);
+int gallivm_cpu_fs_exec(struct gallivm_prog *prog,
+ float x, float y,
+ float (*dests)[PIPE_MAX_SHADER_INPUTS][4],
+ float (*inputs)[PIPE_MAX_SHADER_INPUTS][4],
+ float (*consts)[4],
+ struct tgsi_sampler *samplers);
void gallivm_cpu_jit_compile(struct gallivm_cpu_engine *ee, struct gallivm_prog *prog);
void gallivm_cpu_engine_delete(struct gallivm_cpu_engine *ee);
+
#endif /* MESA_LLVM */
#if defined __cplusplus