Module: Mesa
Branch: master
Commit: bed4c7ea5ea65ae4d591c5f9fb6d0ab24ba268ee
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=bed4c7ea5ea65ae4d591c5f9fb6d0ab24ba268ee

Author: Dave Airlie <airl...@gmail.com>
Date:   Fri Dec 30 21:17:07 2011 +0000

u_format: fix latc fetches.

This fixes the latc fetches for llvmpipe, fixes
fbo-generatemipmap-formats GL_ARB_texture_compression
fbo-generatemipmap-formats GL_ATI_texture_compression_3dc
fbo-generatemipmap-formats GL_EXT_texture_compression_latc

Signed-off-by: Dave Airlie <airl...@redhat.com>
Signed-off-by: Dave Airlie <airl...@gmail.com>

---

 src/gallium/auxiliary/util/u_format_latc.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_format_latc.c 
b/src/gallium/auxiliary/util/u_format_latc.c
index 113a793..20feb24 100644
--- a/src/gallium/auxiliary/util/u_format_latc.c
+++ b/src/gallium/auxiliary/util/u_format_latc.c
@@ -47,6 +47,9 @@ util_format_latc1_unorm_fetch_rgba_8unorm(uint8_t *dst, const 
uint8_t *src, unsi
    (void) u_format_signed_encode_rgtc_ubyte;
 
    u_format_unsigned_fetch_texel_rgtc(0, src, i, j, dst, 1);
+   dst[1] = dst[0];
+   dst[2] = dst[0];
+   dst[3] = 255;
 }
 
 void
@@ -173,7 +176,9 @@ void
 util_format_latc2_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, 
unsigned i, unsigned j)
 {
    u_format_unsigned_fetch_texel_rgtc(0, src, i, j, dst, 2);
-   u_format_unsigned_fetch_texel_rgtc(0, src + 8, i, j, dst + 1, 2);
+   dst[1] = dst[0];
+   dst[2] = dst[0];
+   u_format_unsigned_fetch_texel_rgtc(0, src + 8, i, j, dst + 3, 2);
 }
 
 void

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to