diff options
| author | Zack Rusin <zack@tungstengraphics.com> | 2008-02-04 10:07:02 -0500 |
|---|---|---|
| committer | Ben Skeggs <skeggsb@gmail.com> | 2008-02-15 13:51:09 +1100 |
| commit | 716206c190b1b1408c09807671d28dcc8906f855 (patch) | |
| tree | ae6d6d445683626289e55dcc14ff7fb0e81b5328 /src/mesa/pipe/llvm/gallivm_p.h | |
| parent | 474f1a1d56fbb5472dd9bbf5828c413ae7e629dd (diff) | |
rewrite the way we handle ir in llvm code
introduce intermediate step gallivm_ir before compiling it
down to the final llvm ir.
Diffstat (limited to 'src/mesa/pipe/llvm/gallivm_p.h')
| -rw-r--r-- | src/mesa/pipe/llvm/gallivm_p.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/mesa/pipe/llvm/gallivm_p.h b/src/mesa/pipe/llvm/gallivm_p.h new file mode 100644 index 0000000000..2c6e5e8f5f --- /dev/null +++ b/src/mesa/pipe/llvm/gallivm_p.h @@ -0,0 +1,56 @@ +#ifndef GALLIVM_P_H +#define GALLIVM_P_H + +#ifdef MESA_LLVM + +namespace llvm { + class Module; +} + +#if defined __cplusplus +extern "C" { +#endif + +enum gallivm_shader_type; +enum gallivm_vector_layout; + +struct gallivm_interpolate { + int attrib; + int chan; + int type; +}; + +struct gallivm_ir { + llvm::Module *module; + int id; + enum gallivm_shader_type type; + enum gallivm_vector_layout layout; + int num_components; + int num_consts; + + //FIXME: this might not be enough for some shaders + struct gallivm_interpolate interpolators[32*4]; + int num_interp; +}; + +struct gallivm_prog { + llvm::Module *module; + void *function; + + int id; + enum gallivm_shader_type type; + + int num_consts; + + //FIXME: this might not be enough for some shaders + struct gallivm_interpolate interpolators[32*4]; + int num_interp; +}; + +#endif /* MESA_LLVM */ + +#if defined __cplusplus +} // extern "C" +#endif + +#endif |
