diff options
Diffstat (limited to 'src/mesa/main/texstore.c')
-rw-r--r-- | src/mesa/main/texstore.c | 54 |
1 files changed, 30 insertions, 24 deletions
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index 7dd4a1fa650..8a3e5f77979 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -65,6 +65,7 @@ #include "pack.h" #include "texcompress.h" #include "texcompress_fxt1.h" +#include "texcompress_rgtc.h" #include "texcompress_s3tc.h" #include "teximage.h" #include "texstore.h" @@ -310,15 +311,15 @@ compute_component_mapping(GLenum inFormat, GLenum outFormat, * \param srcPacking source image pixel packing * \return resulting image with format = textureBaseFormat and type = GLfloat. */ -static GLfloat * -make_temp_float_image(struct gl_context *ctx, GLuint dims, - GLenum logicalBaseFormat, - GLenum textureBaseFormat, - GLint srcWidth, GLint srcHeight, GLint srcDepth, - GLenum srcFormat, GLenum srcType, - const GLvoid *srcAddr, - const struct gl_pixelstore_attrib *srcPacking, - GLbitfield transferOps) +GLfloat * +_mesa_make_temp_float_image(struct gl_context *ctx, GLuint dims, + GLenum logicalBaseFormat, + GLenum textureBaseFormat, + GLint srcWidth, GLint srcHeight, GLint srcDepth, + GLenum srcFormat, GLenum srcType, + const GLvoid *srcAddr, + const struct gl_pixelstore_attrib *srcPacking, + GLbitfield transferOps) { GLfloat *tempImage; const GLint components = _mesa_components_in_format(logicalBaseFormat); @@ -2065,7 +2066,7 @@ _mesa_texstore_argb2101010(TEXSTORE_PARAMS) } else { /* general path */ - const GLfloat *tempImage = make_temp_float_image(ctx, dims, + const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, baseInternalFormat, baseFormat, srcWidth, srcHeight, srcDepth, @@ -2317,7 +2318,7 @@ _mesa_texstore_unorm1616(TEXSTORE_PARAMS) } else { /* general path */ - const GLfloat *tempImage = make_temp_float_image(ctx, dims, + const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, baseInternalFormat, baseFormat, srcWidth, srcHeight, srcDepth, @@ -2394,7 +2395,7 @@ _mesa_texstore_unorm16(TEXSTORE_PARAMS) } else { /* general path */ - const GLfloat *tempImage = make_temp_float_image(ctx, dims, + const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, baseInternalFormat, baseFormat, srcWidth, srcHeight, srcDepth, @@ -2452,7 +2453,7 @@ _mesa_texstore_rgba_16(TEXSTORE_PARAMS) } else { /* general path */ - const GLfloat *tempImage = make_temp_float_image(ctx, dims, + const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, baseInternalFormat, baseFormat, srcWidth, srcHeight, srcDepth, @@ -2519,7 +2520,7 @@ _mesa_texstore_signed_rgba_16(TEXSTORE_PARAMS) } else { /* general path */ - const GLfloat *tempImage = make_temp_float_image(ctx, dims, + const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, baseInternalFormat, baseFormat, srcWidth, srcHeight, srcDepth, @@ -2901,7 +2902,7 @@ _mesa_texstore_signed_r8(TEXSTORE_PARAMS) /* XXX look at adding optimized paths */ { /* general path */ - const GLfloat *tempImage = make_temp_float_image(ctx, dims, + const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, baseInternalFormat, baseFormat, srcWidth, srcHeight, srcDepth, @@ -2946,7 +2947,7 @@ _mesa_texstore_signed_rg88(TEXSTORE_PARAMS) /* XXX look at adding optimized paths */ { /* general path */ - const GLfloat *tempImage = make_temp_float_image(ctx, dims, + const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, baseInternalFormat, baseFormat, srcWidth, srcHeight, srcDepth, @@ -2991,7 +2992,7 @@ _mesa_texstore_signed_rgbx8888(TEXSTORE_PARAMS) { /* general path */ - const GLfloat *tempImage = make_temp_float_image(ctx, dims, + const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, baseInternalFormat, baseFormat, srcWidth, srcHeight, srcDepth, @@ -3104,7 +3105,7 @@ _mesa_texstore_signed_rgba8888(TEXSTORE_PARAMS) } else { /* general path */ - const GLfloat *tempImage = make_temp_float_image(ctx, dims, + const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, baseInternalFormat, baseFormat, srcWidth, srcHeight, srcDepth, @@ -3413,7 +3414,7 @@ _mesa_texstore_rgba_float32(TEXSTORE_PARAMS) } else { /* general path */ - const GLfloat *tempImage = make_temp_float_image(ctx, dims, + const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, baseInternalFormat, baseFormat, srcWidth, srcHeight, srcDepth, @@ -3483,7 +3484,7 @@ _mesa_texstore_rgba_float16(TEXSTORE_PARAMS) } else { /* general path */ - const GLfloat *tempImage = make_temp_float_image(ctx, dims, + const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, baseInternalFormat, baseFormat, srcWidth, srcHeight, srcDepth, @@ -3549,7 +3550,7 @@ _mesa_texstore_rgba_int8(TEXSTORE_PARAMS) } else { /* general path */ - const GLfloat *tempImage = make_temp_float_image(ctx, dims, + const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, baseInternalFormat, baseFormat, srcWidth, srcHeight, srcDepth, @@ -3614,7 +3615,7 @@ _mesa_texstore_rgba_int16(TEXSTORE_PARAMS) } else { /* general path */ - const GLfloat *tempImage = make_temp_float_image(ctx, dims, + const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, baseInternalFormat, baseFormat, srcWidth, srcHeight, srcDepth, @@ -3679,7 +3680,7 @@ _mesa_texstore_rgba_int32(TEXSTORE_PARAMS) } else { /* general path */ - const GLfloat *tempImage = make_temp_float_image(ctx, dims, + const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, baseInternalFormat, baseFormat, srcWidth, srcHeight, srcDepth, @@ -4128,7 +4129,12 @@ texstore_funcs[MESA_FORMAT_COUNT] = { MESA_FORMAT_SIGNED_RG_16, _mesa_texstore_signed_rgba_16 }, { MESA_FORMAT_SIGNED_RGB_16, _mesa_texstore_signed_rgba_16 }, { MESA_FORMAT_SIGNED_RGBA_16, _mesa_texstore_signed_rgba_16 }, - { MESA_FORMAT_RGBA_16, _mesa_texstore_rgba_16 } + { MESA_FORMAT_RGBA_16, _mesa_texstore_rgba_16 }, + + { MESA_FORMAT_RED_RGTC1, _mesa_texstore_red_rgtc1 }, + { MESA_FORMAT_SIGNED_RED_RGTC1, _mesa_texstore_signed_red_rgtc1 }, + { MESA_FORMAT_RG_RGTC2, _mesa_texstore_rg_rgtc2 }, + { MESA_FORMAT_SIGNED_RG_RGTC2, _mesa_texstore_signed_rg_rgtc2 } }; |