summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOwen W. Taylor <[email protected]>2009-05-06 22:42:50 -0400
committerAlex Deucher <[email protected]>2009-05-13 19:04:18 -0400
commitea6a74abbe4053b958d640425e061f0ceec92291 (patch)
tree8e4ffd48dd237e3f930ed53b52f0da0f715c3bad /src
parent34eab5dd9c837769f1259e1f900b4528586d23b2 (diff)
Don't use an alpha texture format for GLX_TEXTURE_FORMAT_RGB_EXT
In r300SetTexBuffer2(), if the passed in text glx_texture_format is GLX_TEXTURE_FORMAT_RGB_EXT, then we should use an RGB-only texture format, even if the DRI buffer has four channels. https://bugs.freedesktop.org/show_bug.cgi?id=21609
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/r300/r300_texstate.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_texstate.c b/src/mesa/drivers/dri/r300/r300_texstate.c
index 443fafe5e22..6d6a90aa88a 100644
--- a/src/mesa/drivers/dri/r300/r300_texstate.c
+++ b/src/mesa/drivers/dri/r300/r300_texstate.c
@@ -449,7 +449,10 @@ void r300SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_fo
pitch_val = rb->pitch;
switch (rb->cpp) {
case 4:
- t->pp_txformat = R300_EASY_TX_FORMAT(X, Y, Z, W, W8Z8Y8X8);
+ if (glx_texture_format == GLX_TEXTURE_FORMAT_RGB_EXT)
+ t->pp_txformat = R300_EASY_TX_FORMAT(X, Y, Z, ONE, W8Z8Y8X8);
+ else
+ t->pp_txformat = R300_EASY_TX_FORMAT(X, Y, Z, W, W8Z8Y8X8);
t->pp_txfilter |= tx_table[2].filter;
pitch_val /= 4;
break;