summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/r300_context.h
diff options
context:
space:
mode:
authorNicolai Haehnle <nhaehnle@gmail.com>2008-07-12 21:13:03 +0200
committerNicolai Haehnle <nhaehnle@gmail.com>2008-07-12 21:16:16 +0200
commite81ba58bf4c20229677cdf89b5970b55cefb2199 (patch)
treee3a34f2db1ee2e0feb10c76c05f3f6f6cf4b50ed /src/mesa/drivers/dri/r300/r300_context.h
parent3b8081603bf846285e56a6ecafaf182935fd8733 (diff)
r300_fragprog: Use nqssa+dce and program_pair for emit
Share almost all code with r500_fragprog now. This also fixes Piglit's texrect-many test, which means that the compiz bicubic plugin should work with hardware acceleration now.
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_context.h')
-rw-r--r--src/mesa/drivers/dri/r300/r300_context.h24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_context.h b/src/mesa/drivers/dri/r300/r300_context.h
index 8e9c5cee5f..98af6d8f10 100644
--- a/src/mesa/drivers/dri/r300/r300_context.h
+++ b/src/mesa/drivers/dri/r300/r300_context.h
@@ -683,16 +683,25 @@ struct r300_fragment_program_external_state {
};
+struct r300_fragment_program_node {
+ int tex_offset; /**< first tex instruction */
+ int tex_end; /**< last tex instruction, relative to tex_offset */
+ int alu_offset; /**< first ALU instruction */
+ int alu_end; /**< last ALU instruction, relative to alu_offset */
+ int flags;
+};
+
/**
* Stores an R300 fragment program in its compiled-to-hardware form.
*/
struct r300_fragment_program_code {
struct {
- int length;
+ int length; /**< total # of texture instructions used */
GLuint inst[PFS_MAX_TEX_INST];
} tex;
struct {
+ int length; /**< total # of ALU instructions used */
struct {
GLuint inst0;
GLuint inst1;
@@ -701,21 +710,10 @@ struct r300_fragment_program_code {
} inst[PFS_MAX_ALU_INST];
} alu;
- struct {
- int tex_offset;
- int tex_end;
- int alu_offset;
- int alu_end;
- int flags;
- } node[4];
+ struct r300_fragment_program_node node[4];
int cur_node;
int first_node_has_tex;
- int alu_offset;
- int alu_end;
- int tex_offset;
- int tex_end;
-
/**
* Remember which program register a given hardware constant
* belongs to.