summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2010-11-29 05:46:15 +0100
committerMarek Olšák <[email protected]>2010-11-29 17:26:40 +0100
commite5aa69f6a6779d1e0fb3d413ad7007b0fb90b176 (patch)
treef5fc663c30b016ca99777150cb5ac0e23d963e29 /src
parentb1097607db58ddaa91281e364dbb4aa53d904052 (diff)
st/mesa: fix texture border color for RED and RG base formats
The spec says the border color should be consistent with the internal format. Signed-off-by: Brian Paul <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_atom_sampler.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c
index f147d768084..b67068df373 100644
--- a/src/mesa/state_tracker/st_atom_sampler.c
+++ b/src/mesa/state_tracker/st_atom_sampler.c
@@ -121,6 +121,18 @@ static void
xlate_border_color(const GLfloat *colorIn, GLenum baseFormat, GLfloat *colorOut)
{
switch (baseFormat) {
+ case GL_RED:
+ colorOut[0] = colorIn[0];
+ colorOut[1] = 0.0F;
+ colorOut[2] = 0.0F;
+ colorOut[3] = 1.0F;
+ break;
+ case GL_RG:
+ colorOut[0] = colorIn[0];
+ colorOut[1] = colorIn[1];
+ colorOut[2] = 0.0F;
+ colorOut[3] = 1.0F;
+ break;
case GL_RGB:
colorOut[0] = colorIn[0];
colorOut[1] = colorIn[1];