summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/r500_fragprog.c
diff options
context:
space:
mode:
authorNicolai Haehnle <nhaehnle@gmail.com>2008-07-05 16:07:37 +0200
committerNicolai Haehnle <nhaehnle@gmail.com>2008-07-05 18:04:10 +0200
commit364d45a3e1629f32c6ab5407f92618a16c9d45e0 (patch)
tree06e2c11a07332cffe72bab329c94369002288953 /src/mesa/drivers/dri/r300/r500_fragprog.c
parentdea8719f00ad46ed66b5d4f5e6c0b71e2d1054e9 (diff)
r500: Major refactoring of fragment program emit
Use the common facilities to convert non-native instructions into native ones. Worked hard to make the code easier to read (hopefully), by using helper functions instead of direct manipulation of the machine code. Fixes two bugs related to FLR and XPD.
Diffstat (limited to 'src/mesa/drivers/dri/r300/r500_fragprog.c')
-rw-r--r--src/mesa/drivers/dri/r300/r500_fragprog.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/r300/r500_fragprog.c b/src/mesa/drivers/dri/r300/r500_fragprog.c
index 62e06ea52c..b46e924ac7 100644
--- a/src/mesa/drivers/dri/r300/r500_fragprog.c
+++ b/src/mesa/drivers/dri/r300/r500_fragprog.c
@@ -27,6 +27,8 @@
#include "r500_fragprog.h"
+#include "radeon_program_alu.h"
+
/**
* Transform TEX, TXP, TXB, and KIL instructions in the following way:
@@ -316,11 +318,12 @@ void r500TranslateFragmentShader(r300ContextPtr r300,
insert_WPOS_trailer(&compiler);
- struct radeon_program_transformation transformations[1] = {
- { &transform_TEX, &compiler }
+ struct radeon_program_transformation transformations[2] = {
+ { &transform_TEX, &compiler },
+ { &radeonTransformALU, 0 }
};
radeonLocalTransform(r300->radeon.glCtx, compiler.program,
- 1, transformations);
+ 2, transformations);
if (RADEON_DEBUG & DEBUG_PIXEL) {
_mesa_printf("Compiler: after all transformations:\n");