From bed4c7ea5ea65ae4d591c5f9fb6d0ab24ba268ee Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 30 Dec 2011 21:17:07 +0000 Subject: [PATCH] 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 Signed-off-by: Dave Airlie --- src/gallium/auxiliary/util/u_format_latc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/util/u_format_latc.c b/src/gallium/auxiliary/util/u_format_latc.c index 113a793e2cd..20feb241ee0 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 -- 2.30.2