diff options
author | Dave Airlie <[email protected]> | 2012-03-23 16:17:33 +0000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2012-03-25 17:15:52 +0100 |
commit | 7b6424143d8bf572cadd46adcbaa91d2a5598635 (patch) | |
tree | 2f700f222f7ce5619b5cec323e7e6d23f2b6fc36 | |
parent | d6c5ad52b2473064f0b3e031a2e1b59480c68c43 (diff) |
intel: fix TFP at 16-bpp
don't ask why I had to debug this.
tested to fix g-s and kwin at 16-bpp on Ironlake.
Signed-off-by: Dave Airlie <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_tex_image.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c index 1f574351504..094d3cd30c4 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_image.c +++ b/src/mesa/drivers/dri/intel/intel_tex_image.c @@ -341,13 +341,18 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, if (!rb || !rb->mt) return; - if (texture_format == __DRI_TEXTURE_FORMAT_RGB) { + if (rb->mt->cpp == 4) { + if (texture_format == __DRI_TEXTURE_FORMAT_RGB) { + internalFormat = GL_RGB; + texFormat = MESA_FORMAT_XRGB8888; + } + else { + internalFormat = GL_RGBA; + texFormat = MESA_FORMAT_ARGB8888; + } + } else if (rb->mt->cpp == 2) { internalFormat = GL_RGB; - texFormat = MESA_FORMAT_XRGB8888; - } - else { - internalFormat = GL_RGBA; - texFormat = MESA_FORMAT_ARGB8888; + texFormat = MESA_FORMAT_RGB565; } _mesa_lock_texture(&intel->ctx, texObj); |