summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorJerome Glisse <[email protected]>2007-01-04 20:27:49 +0100
committerJerome Glisse <[email protected]>2007-01-04 20:31:35 +0100
commit1d312ae0137eb39bf74fac91eb97ed25c289a4ca (patch)
tree3afe617c804a408e183986886863bbc294933506 /src/mesa/drivers/dri
parent8d287d0f5e18246a3c8fbad6101ac32b4eaf6c32 (diff)
r300: Correct bug introduced by fragprog rework.
Thx for Tilman who spoted the bugs.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/r300/r300_fragprog.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_fragprog.c b/src/mesa/drivers/dri/r300/r300_fragprog.c
index f00162a6dc7..179bc58e9e9 100644
--- a/src/mesa/drivers/dri/r300/r300_fragprog.c
+++ b/src/mesa/drivers/dri/r300/r300_fragprog.c
@@ -257,7 +257,7 @@ static const GLuint undef = REG(REG_TYPE_TEMP,
GL_FALSE);
/* constant one source */
-static const GLuint pfs_one = REG(REG_TYPE_TEMP,
+static const GLuint pfs_one = REG(REG_TYPE_CONST,
0,
SWIZZLE_111,
SWIZZLE_ONE,
@@ -265,7 +265,7 @@ static const GLuint pfs_one = REG(REG_TYPE_TEMP,
GL_TRUE);
/* constant half source */
-static const GLuint pfs_half = REG(REG_TYPE_TEMP,
+static const GLuint pfs_half = REG(REG_TYPE_CONST,
0,
SWIZZLE_HHH,
SWIZZLE_HALF,
@@ -273,7 +273,7 @@ static const GLuint pfs_half = REG(REG_TYPE_TEMP,
GL_TRUE);
/* constant zero source */
-static const GLuint pfs_zero = REG(REG_TYPE_TEMP,
+static const GLuint pfs_zero = REG(REG_TYPE_CONST,
0,
SWIZZLE_000,
SWIZZLE_ZERO,
@@ -463,7 +463,8 @@ static int swz_native(struct r300_fragment_program *rp,
GLuint arbneg)
{
/* Native swizzle, handle negation */
- src |= ((arbneg >> 3) & 1) << REG_NEGS_SHIFT;
+ src = (src & ~REG_NEGS_SHIFT) |
+ (((arbneg >> 3) & 1) << REG_NEGS_SHIFT);
if ((arbneg & 0x7) == 0x0) {
src = src & ~REG_NEGV_MASK;