summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/r300_fragprog.h
diff options
context:
space:
mode:
authorNicolai Haehnle <nhaehnle@gmail.com>2008-06-13 23:46:04 +0200
committerNicolai Haehnle <nhaehnle@gmail.com>2008-06-14 04:14:05 +0200
commitb5170bc9d32530ec93dae4b543d3552e83d6b4a1 (patch)
tree543131515ec859f224af9b8b16fe46eddfede514 /src/mesa/drivers/dri/r300/r300_fragprog.h
parente2aa45c2f9584ff76151a99b4fcd0ecb56260473 (diff)
r300: Add radeon_program and trivial refactoring of r300_fragprog to use it
The idea/hope is that radeon_program will serve as an intermediate representation for r3xx up to r6xx fragment and vertex programs. Right now, it is nothing more than a simplistic wrapper around Mesa's prog_instruction, together with the notion of clauses, taken from r6xx docs. The clauses will eventually be used to represent the nodes that are used in r300 family fragment programs.
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_fragprog.h')
-rw-r--r--src/mesa/drivers/dri/r300/r300_fragprog.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_fragprog.h b/src/mesa/drivers/dri/r300/r300_fragprog.h
index 561d7c6423..8c836c4bda 100644
--- a/src/mesa/drivers/dri/r300/r300_fragprog.h
+++ b/src/mesa/drivers/dri/r300/r300_fragprog.h
@@ -40,6 +40,7 @@
#include "shader/prog_instruction.h"
#include "r300_context.h"
+#include "radeon_program.h"
/* supported hw opcodes */
#define PFS_OP_MAD 0
@@ -136,4 +137,23 @@ struct r300_fragment_program;
extern void r300TranslateFragmentShader(r300ContextPtr r300,
struct r300_fragment_program *fp);
+
+/**
+ * Used internally by the r300 fragment program code to store compile-time
+ * only data.
+ */
+struct r300_fragment_program_compiler {
+ r300ContextPtr r300;
+ struct r300_fragment_program *fp;
+ struct r300_fragment_program_code *code;
+ struct radeon_compiler compiler;
+};
+
+extern GLboolean r300FragmentProgramEmit(struct r300_fragment_program_compiler *compiler);
+
+
+extern void r300FragmentProgramDump(
+ struct r300_fragment_program *fp,
+ struct r300_fragment_program_code *code);
+
#endif