From 6c0c95d6045d2d2b4e6a3a2f11457850031c57bc Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 22 Aug 2014 21:55:11 +0200 Subject: fontconfig libxcb/xcb-proto mesa xkeyboard-config git update 22 Aug 2014 libxcb/xcb-proto commit 8e3db42d67a0035bb16d16da28bd5eea7a269178 xkeyboard-config commit 10fce2c2baae471795d069f3a5f1307eedb9ff0a fontconfig commit 286cdc9c10b0453c25950103b6a1f7170d15bfdc mesa commit 97d03b9366bfa55b27feb92aa5afacd9c5f6f421 --- mesalib/src/mesa/main/texstore.c | 40 +++++++++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 7 deletions(-) (limited to 'mesalib/src/mesa/main/texstore.c') diff --git a/mesalib/src/mesa/main/texstore.c b/mesalib/src/mesa/main/texstore.c index 0e036d9eb..d2aba8ba1 100644 --- a/mesalib/src/mesa/main/texstore.c +++ b/mesalib/src/mesa/main/texstore.c @@ -68,6 +68,7 @@ #include "texcompress_rgtc.h" #include "texcompress_s3tc.h" #include "texcompress_etc.h" +#include "texcompress_bptc.h" #include "teximage.h" #include "texstore.h" #include "enums.h" @@ -1426,6 +1427,15 @@ texstore_compressed(TEXSTORE_PARAMS) table[MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1] = _mesa_texstore_etc2_srgb8_punchthrough_alpha1; + table[MESA_FORMAT_BPTC_RGBA_UNORM] = + _mesa_texstore_bptc_rgba_unorm; + table[MESA_FORMAT_BPTC_SRGB_ALPHA_UNORM] = + _mesa_texstore_bptc_rgba_unorm; + table[MESA_FORMAT_BPTC_RGB_SIGNED_FLOAT] = + _mesa_texstore_bptc_rgb_signed_float; + table[MESA_FORMAT_BPTC_RGB_UNSIGNED_FLOAT] = + _mesa_texstore_bptc_rgb_unsigned_float; + initialized = GL_TRUE; } @@ -1485,6 +1495,12 @@ texstore_swizzle(TEXSTORE_PARAMS) if (!is_array) return GL_FALSE; + if (srcFormat == GL_COLOR_INDEX) + return GL_FALSE; + + if (_mesa_texstore_needs_transfer_ops(ctx, baseInternalFormat, dstFormat)) + return GL_FALSE; + switch (srcType) { case GL_FLOAT: case GL_UNSIGNED_BYTE: @@ -2175,14 +2191,23 @@ _mesa_store_compressed_teximage(struct gl_context *ctx, GLuint dims, } +/** + * Compute compressed_pixelstore parameters for copying compressed + * texture data. + * \param dims number of texture image dimensions: 1, 2 or 3 + * \param texFormat the compressed texture format + * \param width, height, depth size of image to copy + * \param packing pixelstore parameters describing user-space image packing + * \param store returns the compressed_pixelstore parameters + */ void -_mesa_compute_compressed_pixelstore(GLuint dims, struct gl_texture_image *texImage, - GLsizei width, GLsizei height, GLsizei depth, - const struct gl_pixelstore_attrib *packing, - struct compressed_pixelstore *store) +_mesa_compute_compressed_pixelstore(GLuint dims, mesa_format texFormat, + GLsizei width, GLsizei height, + GLsizei depth, + const struct gl_pixelstore_attrib *packing, + struct compressed_pixelstore *store) { GLuint bw, bh; - const mesa_format texFormat = texImage->TexFormat; _mesa_get_format_block_size(texFormat, &bw, &bh); @@ -2252,8 +2277,9 @@ _mesa_store_compressed_texsubimage(struct gl_context *ctx, GLuint dims, return; } - _mesa_compute_compressed_pixelstore(dims, texImage, width, height, depth, - &ctx->Unpack, &store); + _mesa_compute_compressed_pixelstore(dims, texImage->TexFormat, + width, height, depth, + &ctx->Unpack, &store); /* get pointer to src pixels (may be in a pbo which we'll map here) */ data = _mesa_validate_pbo_compressed_teximage(ctx, dims, imageSize, data, -- cgit v1.2.3