diff options
author | Brian Paul <[email protected]> | 2010-11-15 09:16:31 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-11-15 09:18:47 -0700 |
commit | 0ef3b298e60bc34ffbd1165f6edef78e82377166 (patch) | |
tree | 407ec88b44b2505e0260a898279e4e2864d95697 /src/mesa | |
parent | 86abc1f104c99ecc45385ba669c5274e0d68c516 (diff) |
r600: set gl_texture_image::TexFormat field in r600SetTexBuffer2()
See https://bugs.freedesktop.org/show_bug.cgi?id=31544
Note: this is a candidate for the 7.9 branch.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/r600/r600_texstate.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r600/r600_texstate.c b/src/mesa/drivers/dri/r600/r600_texstate.c index 3869768bf0e..20fe32ae9ec 100644 --- a/src/mesa/drivers/dri/r600/r600_texstate.c +++ b/src/mesa/drivers/dri/r600/r600_texstate.c @@ -1060,6 +1060,7 @@ void r600SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_fo switch (rb->cpp) { case 4: if (glx_texture_format == __DRI_TEXTURE_FORMAT_RGB) { + texImage->TexFormat = MESA_FORMAT_RGB888; SETfield(t->SQ_TEX_RESOURCE1, FMT_8_8_8_8, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask); @@ -1072,6 +1073,7 @@ void r600SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_fo SETfield(t->SQ_TEX_RESOURCE4, SQ_SEL_1, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask); } else { + texImage->TexFormat = MESA_FORMAT_ARGB8888; SETfield(t->SQ_TEX_RESOURCE1, FMT_8_8_8_8, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask); @@ -1089,6 +1091,7 @@ void r600SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_fo case 3: default: // FMT_8_8_8 ??? + texImage->TexFormat = MESA_FORMAT_RGB888; SETfield(t->SQ_TEX_RESOURCE1, FMT_8_8_8_8, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask); @@ -1103,6 +1106,7 @@ void r600SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_fo pitch_val /= 4; break; case 2: + texImage->TexFormat = MESA_FORMAT_RGB565; SETfield(t->SQ_TEX_RESOURCE1, FMT_5_6_5, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask); |