diff options
author | Brian Paul <brianp@vmware.com> | 2010-11-15 09:24:42 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2010-11-15 09:31:27 -0700 |
commit | f2f1c61950f47efd1a53aeb8c3453173ad8b4ea2 (patch) | |
tree | b8bebfb37eae6c70d6e641c87ff3277f86a87117 /src/mesa | |
parent | 401f1efd3a4b5042b7ee471d08e458a52e3499e3 (diff) |
r300: set gl_texture_image::TexFormat field in r300SetTexBuffer2()
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/r300/r300_texstate.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_texstate.c b/src/mesa/drivers/dri/r300/r300_texstate.c index 0116c5d2fa4..a4fbd99308b 100644 --- a/src/mesa/drivers/dri/r300/r300_texstate.c +++ b/src/mesa/drivers/dri/r300/r300_texstate.c @@ -481,18 +481,24 @@ void r300SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_format pitch_val = rb->pitch; switch (rb->cpp) { case 4: - if (texture_format == __DRI_TEXTURE_FORMAT_RGB) + if (texture_format == __DRI_TEXTURE_FORMAT_RGB) { + texImage->TexFormat = MESA_FORMAT_RGB888; t->pp_txformat = R300_EASY_TX_FORMAT(X, Y, Z, ONE, W8Z8Y8X8); - else + } + else { + texImage->TexFormat = MESA_FORMAT_ARGB8888; t->pp_txformat = R300_EASY_TX_FORMAT(X, Y, Z, W, W8Z8Y8X8); + } pitch_val /= 4; break; case 3: default: + texImage->TexFormat = MESA_FORMAT_RGB888; t->pp_txformat = R300_EASY_TX_FORMAT(X, Y, Z, ONE, W8Z8Y8X8); pitch_val /= 4; break; case 2: + texImage->TexFormat = MESA_FORMAT_RGB565; t->pp_txformat = R300_EASY_TX_FORMAT(X, Y, Z, ONE, Z5Y6X5); pitch_val /= 2; break; |