summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-02-06 10:47:31 -0700
committerBrian Paul <[email protected]>2009-02-06 10:47:31 -0700
commit1df62651b2e9a8d0afd790738e2695a16ade1eeb (patch)
tree6798435af6af4aa2b9e88ae16a8b2804b529c87d /src/mesa/swrast
parente01a03d2220199a4541f2cb8b42035237a571aa4 (diff)
swrast: return (0,0,0,1) when sampling incomplete textures, not (0,0,0,0)
Fixes piglit shaders/fp-incomplete-tex test.
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r--src/mesa/swrast/s_fragprog.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c
index 58ef91ec010..bbb784c46e8 100644
--- a/src/mesa/swrast/s_fragprog.c
+++ b/src/mesa/swrast/s_fragprog.c
@@ -84,7 +84,8 @@ fetch_texel_lod( GLcontext *ctx, const GLfloat texcoord[4], GLfloat lambda,
swizzle_texel(rgba, color, texObj->_Swizzle);
}
else {
- color[0] = color[1] = color[2] = color[3] = 0.0F;
+ color[0] = color[1] = color[2] = 0.0F;
+ color[3] = 1.0F;
}
}
@@ -126,7 +127,8 @@ fetch_texel_deriv( GLcontext *ctx, const GLfloat texcoord[4],
swizzle_texel(rgba, color, texObj->_Swizzle);
}
else {
- color[0] = color[1] = color[2] = color[3] = 0.0F;
+ color[0] = color[1] = color[2] = 0.0F;
+ color[3] = 1.0F;
}
}