From 81911101eedffed5ab13bce5a76bbcd2eefaffd6 Mon Sep 17 00:00:00 2001 From: Anuj Phogat Date: Mon, 17 Sep 2012 14:47:56 -0700 Subject: mesa: Add decoding functions for GL_COMPRESSED_RGB8_ETC2 Data in GL_COMPRESSED_RGB8_ETC2 format is decoded and stored in MESA_FORMAT_RGBX8888_REV. v2: Use CLAMP macro and stdbool.h Signed-off-by: Anuj Phogat Reviewed-by: Brian Paul --- src/mesa/main/texcompress_etc.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/mesa/main/texcompress_etc.h') diff --git a/src/mesa/main/texcompress_etc.h b/src/mesa/main/texcompress_etc.h index 411e1540d30..2508f5fa3a3 100644 --- a/src/mesa/main/texcompress_etc.h +++ b/src/mesa/main/texcompress_etc.h @@ -34,10 +34,15 @@ struct swrast_texture_image; GLboolean _mesa_texstore_etc1_rgb8(TEXSTORE_PARAMS); +GLboolean +_mesa_texstore_etc2_rgb8(TEXSTORE_PARAMS); + void _mesa_fetch_texel_2d_f_etc1_rgb8(const struct swrast_texture_image *texImage, GLint i, GLint j, GLint k, GLfloat *texel); - +void +_mesa_fetch_texel_2d_f_etc2_rgb8(const struct swrast_texture_image *texImage, + GLint i, GLint j, GLint k, GLfloat *texel); void _mesa_etc1_unpack_rgba8888(uint8_t *dst_row, unsigned dst_stride, @@ -45,5 +50,12 @@ _mesa_etc1_unpack_rgba8888(uint8_t *dst_row, unsigned src_stride, unsigned src_width, unsigned src_height); - +void +_mesa_unpack_etc2_format(uint8_t *dst_row, + unsigned dst_stride, + const uint8_t *src_row, + unsigned src_stride, + unsigned src_width, + unsigned src_height, + gl_format format); #endif -- cgit v1.2.3