diff options
author | Nicolai Haehnle <nhaehnle@gmail.com> | 2008-07-12 01:14:35 +0200 |
---|---|---|
committer | Nicolai Haehnle <nhaehnle@gmail.com> | 2008-07-12 09:36:02 +0200 |
commit | b6765c34993b08bba4acf20738c8938413ed4daf (patch) | |
tree | d221e963335dc31af894485a657fb423aa4d79c5 /src/mesa/drivers/dri/r300/radeon_program.h | |
parent | d8d086c20b5a43353c4980cf234d8329900585f5 (diff) |
r500_fragprog: Major refactoring of final emit
Use an abstracted instruction scheduling and register allocation algorithm
that we will be able to share with r300_fragprog.
Unlike the original emit code, this code tries to pair instructions that
only use the RGB part of the ALU with instructions that only use the alpha
part. However, the pairing algorithm still has some shortcomings;
for example, it doesn't generate optimal code for the emulation of LIT.
Diffstat (limited to 'src/mesa/drivers/dri/r300/radeon_program.h')
-rw-r--r-- | src/mesa/drivers/dri/r300/radeon_program.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r300/radeon_program.h b/src/mesa/drivers/dri/r300/radeon_program.h index ba76bc47cf..2e01dd496b 100644 --- a/src/mesa/drivers/dri/r300/radeon_program.h +++ b/src/mesa/drivers/dri/r300/radeon_program.h @@ -45,6 +45,10 @@ enum { PROGRAM_BUILTIN = PROGRAM_FILE_MAX /**< not a real register, but a special swizzle constant */ }; +enum { + OPCODE_REPL_ALPHA = MAX_OPCODE /**< used in paired instructions */ +}; + #define SWIZZLE_0000 MAKE_SWIZZLE4(SWIZZLE_ZERO, SWIZZLE_ZERO, SWIZZLE_ZERO, SWIZZLE_ZERO) #define SWIZZLE_1111 MAKE_SWIZZLE4(SWIZZLE_ONE, SWIZZLE_ONE, SWIZZLE_ONE, SWIZZLE_ONE) |