diff options
author | Brian Paul <[email protected]> | 2010-11-15 09:25:32 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-11-15 09:31:33 -0700 |
commit | 3e910faed55c9c8398d2e03018d2d8041c55ae6a (patch) | |
tree | 98e49b131fb83803aae08332834cbdbe7a70b32c /src/mesa/drivers/dri | |
parent | f2f1c61950f47efd1a53aeb8c3453173ad8b4ea2 (diff) |
evergreen: set gl_texture_image::TexFormat field in evergreenSetTexBuffer()
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/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/r600/evergreen_tex.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r600/evergreen_tex.c b/src/mesa/drivers/dri/r600/evergreen_tex.c index 58420ed1239..65b71c80164 100644 --- a/src/mesa/drivers/dri/r600/evergreen_tex.c +++ b/src/mesa/drivers/dri/r600/evergreen_tex.c @@ -1205,6 +1205,7 @@ void evergreenSetTexBuffer(__DRIcontext *pDRICtx, GLint target, GLint glx_textur switch (rb->cpp) { case 4: if (glx_texture_format == __DRI_TEXTURE_FORMAT_RGB) { + texImage->TexFormat = MESA_FORMAT_RGB888; SETfield(t->SQ_TEX_RESOURCE7, FMT_8_8_8_8, EG_SQ_TEX_RESOURCE_WORD7_0__DATA_FORMAT_shift, EG_SQ_TEX_RESOURCE_WORD7_0__DATA_FORMAT_mask); @@ -1218,6 +1219,7 @@ void evergreenSetTexBuffer(__DRIcontext *pDRICtx, GLint target, GLint glx_textur 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_RESOURCE7, FMT_8_8_8_8, EG_SQ_TEX_RESOURCE_WORD7_0__DATA_FORMAT_shift, EG_SQ_TEX_RESOURCE_WORD7_0__DATA_FORMAT_mask); @@ -1236,6 +1238,7 @@ void evergreenSetTexBuffer(__DRIcontext *pDRICtx, GLint target, GLint glx_textur case 3: default: // FMT_8_8_8 ??? + texImage->TexFormat = MESA_FORMAT_RGB888; SETfield(t->SQ_TEX_RESOURCE7, FMT_8_8_8_8, EG_SQ_TEX_RESOURCE_WORD7_0__DATA_FORMAT_shift, EG_SQ_TEX_RESOURCE_WORD7_0__DATA_FORMAT_mask); @@ -1251,6 +1254,7 @@ void evergreenSetTexBuffer(__DRIcontext *pDRICtx, GLint target, GLint glx_textur pitch_val /= 4; break; case 2: + texImage->TexFormat = MESA_FORMAT_RGB565; SETfield(t->SQ_TEX_RESOURCE7, FMT_5_6_5, EG_SQ_TEX_RESOURCE_WORD7_0__DATA_FORMAT_shift, EG_SQ_TEX_RESOURCE_WORD7_0__DATA_FORMAT_mask); |