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 <brianp@vmware.com>
This commit is contained in:
parent
b1097607db
commit
e5aa69f6a6
1 changed files with 12 additions and 0 deletions
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue