summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/compiler/r500_fragprog_emit.c
diff options
context:
space:
mode:
authorTom Stellard <tstellar@gmail.com>2012-01-14 08:08:33 -0500
committerTom Stellard <thomas.stellard@amd.com>2012-03-04 19:36:27 -0500
commitbefcce264c8bf8fdac233e6a01cadc595a1d11d3 (patch)
treed94c7bab725c2b349bffe9176061b0e99d2f8c52 /src/gallium/drivers/r300/compiler/r500_fragprog_emit.c
parent95594bae47d8b3302be188e6f0be2d69c5507bb3 (diff)
downloadexternal_mesa3d-befcce264c8bf8fdac233e6a01cadc595a1d11d3.zip
external_mesa3d-befcce264c8bf8fdac233e6a01cadc595a1d11d3.tar.gz
external_mesa3d-befcce264c8bf8fdac233e6a01cadc595a1d11d3.tar.bz2
r300/compiler: Add support for inline literals
On R500 chips, shader instructions can take 7-bit (3-bit mantissa, 4-bit exponent) floating point values as inputs in place of registers.
Diffstat (limited to 'src/gallium/drivers/r300/compiler/r500_fragprog_emit.c')
-rw-r--r--src/gallium/drivers/r300/compiler/r500_fragprog_emit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/compiler/r500_fragprog_emit.c b/src/gallium/drivers/r300/compiler/r500_fragprog_emit.c
index 87b96d1..f6b6c0f 100644
--- a/src/gallium/drivers/r300/compiler/r500_fragprog_emit.c
+++ b/src/gallium/drivers/r300/compiler/r500_fragprog_emit.c
@@ -210,6 +210,8 @@ static unsigned int use_source(struct r500_fragment_program_code* code, struct r
} else if (src.File == RC_FILE_TEMPORARY || src.File == RC_FILE_INPUT) {
use_temporary(code, src.Index);
return src.Index;
+ } else if (src.File == RC_FILE_INLINE) {
+ return src.Index | (1 << 7);
}
return 0;