aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-10-04 10:53:47 +0200
committermarha <marha@users.sourceforge.net>2012-10-04 10:53:47 +0200
commit0130346adbce7e6b2422429887fc46c76806d845 (patch)
tree1b88028d42d79ab8062581d361a720b04a87fbc0 /mesalib/src/mesa/main/teximage.c
parent7ed9dbafdbc724c1030404f29678559134de559b (diff)
downloadvcxsrv-0130346adbce7e6b2422429887fc46c76806d845.tar.gz
vcxsrv-0130346adbce7e6b2422429887fc46c76806d845.tar.bz2
vcxsrv-0130346adbce7e6b2422429887fc46c76806d845.zip
randrproto mesa pixman git update 4 oct 2012
randrproto: 4fcbd8584e55ff789522a38a41a33c34446d1455 mesa: 185d6df3c10a7ff5defe163af614bfc41088910b pixman: 2e17b6dd4ee7c32684fb7ffc70d3ad3ebf7cb2ef
Diffstat (limited to 'mesalib/src/mesa/main/teximage.c')
-rw-r--r--mesalib/src/mesa/main/teximage.c34
1 files changed, 12 insertions, 22 deletions
diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c
index afda0eaaf..019516f00 100644
--- a/mesalib/src/mesa/main/teximage.c
+++ b/mesalib/src/mesa/main/teximage.c
@@ -203,6 +203,18 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
}
}
+ /* GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE && GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE */
+ if (ctx->API == API_OPENGLES2 &&
+ ctx->Extensions.ANGLE_texture_compression_dxt) {
+ switch (internalFormat) {
+ case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT:
+ case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT:
+ return GL_RGBA;
+ default:
+ ; /* fallthrough */
+ }
+ }
+
if (ctx->Extensions.S3_s3tc) {
switch (internalFormat) {
case GL_RGB_S3TC:
@@ -2043,28 +2055,6 @@ compressed_texture_error_check(struct gl_context *ctx, GLint dimensions,
goto error;
}
- /* check image size against compression block size */
- /* XXX possibly move this into the _mesa_legal_texture_dimensions() func */
- {
- gl_format texFormat =
- ctx->Driver.ChooseTextureFormat(ctx, target, proxy_format,
- choose_format, choose_type);
- GLuint bw, bh;
-
- _mesa_get_format_block_size(texFormat, &bw, &bh);
- if ((width > bw && width % bw > 0) ||
- (height > bh && height % bh > 0)) {
- /*
- * Per GL_ARB_texture_compression: GL_INVALID_OPERATION is
- * generated [...] if any parameter combinations are not
- * supported by the specific compressed internal format.
- */
- reason = "invalid width or height for compression format";
- error = GL_INVALID_OPERATION;
- goto error;
- }
- }
-
/* check image size in bytes */
if (expectedSize != imageSize) {
/* Per GL_ARB_texture_compression: GL_INVALID_VALUE is generated [...]