From 0ef3b298e60bc34ffbd1165f6edef78e82377166 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 15 Nov 2010 09:16:31 -0700 Subject: 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. --- src/mesa/drivers/dri/r600/r600_texstate.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mesa/drivers/dri/r600/r600_texstate.c') diff --git a/src/mesa/drivers/dri/r600/r600_texstate.c b/src/mesa/drivers/dri/r600/r600_texstate.c index 3869768bf0..20fe32ae9e 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); -- cgit v1.2.3