summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/compiler/radeon_program.h
diff options
context:
space:
mode:
authorTom Stellard <tstellar@gmail.com>2010-07-13 21:25:27 -0700
committerTom Stellard <tstellar@gmail.com>2010-09-10 18:18:08 -0700
commit63432ecfce5415fbf07f1781ec77b5ea3efff599 (patch)
tree903818a193704d2053ce79cf0c8a2d43c3cbaa88 /src/mesa/drivers/dri/r300/compiler/radeon_program.h
parentd8a36620089e72d431ae853ec168f193f3376782 (diff)
r300/compiler: Enable presubtract sources
The r300 compiler can now emit instructions that select from the presubtract source. A peephole optimization has been added to convert instructions like: ADD Temp[0].x, none.1, -Temp[1].x into the INV (1 - src0) presubtract operation.
Diffstat (limited to 'src/mesa/drivers/dri/r300/compiler/radeon_program.h')
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_program.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program.h b/src/mesa/drivers/dri/r300/compiler/radeon_program.h
index 5582f56d92..f0a77d7b53 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_program.h
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_program.h
@@ -39,7 +39,7 @@
struct radeon_compiler;
struct rc_src_register {
- unsigned int File:3;
+ unsigned int File:4;
/** Negative values may be used for relative addressing. */
signed int Index:(RC_REGISTER_INDEX_BITS+1);
@@ -64,6 +64,11 @@ struct rc_dst_register {
unsigned int WriteMask:4;
};
+struct rc_presub_instruction {
+ rc_presubtract_op Opcode;
+ struct rc_src_register SrcReg[2];
+};
+
/**
* Instructions are maintained by the compiler in a doubly linked list
* of these structures.
@@ -108,6 +113,10 @@ struct rc_sub_instruction {
/** True if tex instruction should do shadow comparison */
unsigned int TexShadow:1;
/*@}*/
+
+ /** This holds information about the presubtract operation used by
+ * this instruction. */
+ struct rc_presub_instruction PreSub;
};
typedef enum {