summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-11-15 09:15:33 -0700
committerBrian Paul <[email protected]>2010-11-15 09:18:40 -0700
commit86abc1f104c99ecc45385ba669c5274e0d68c516 (patch)
treebc49d6d640f542474753a464f11733f249739e0c /src
parente86b4c919402ed1502b9db61583a0ff8615b5a9d (diff)
radeon: set gl_texture_image::TexFormat field in radeonSetTexBuffer2()
See https://bugs.freedesktop.org/show_bug.cgi?id=31544 Note: this is a candidate for the 7.9 branch
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texstate.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_texstate.c b/src/mesa/drivers/dri/radeon/radeon_texstate.c
index dd8ecdd500a..7409aeeeaa8 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texstate.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texstate.c
@@ -705,18 +705,24 @@ void radeonSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_form
t->override_offset = 0;
switch (rb->cpp) {
case 4:
- if (texture_format == __DRI_TEXTURE_FORMAT_RGB)
+ if (texture_format == __DRI_TEXTURE_FORMAT_RGB) {
t->pp_txformat = tx_table[MESA_FORMAT_RGB888].format;
- else
+ texImage->TexFormat = MESA_FORMAT_RGB888;
+ }
+ else {
t->pp_txformat = tx_table[MESA_FORMAT_ARGB8888].format;
+ texImage->TexFormat = MESA_FORMAT_ARGB8888;
+ }
t->pp_txfilter |= tx_table[MESA_FORMAT_ARGB8888].filter;
break;
case 3:
default:
+ texImage->TexFormat = MESA_FORMAT_RGB888;
t->pp_txformat = tx_table[MESA_FORMAT_RGB888].format;
t->pp_txfilter |= tx_table[MESA_FORMAT_RGB888].filter;
break;
case 2:
+ texImage->TexFormat = MESA_FORMAT_RGB565;
t->pp_txformat = tx_table[MESA_FORMAT_RGB565].format;
t->pp_txfilter |= tx_table[MESA_FORMAT_RGB565].filter;
break;