diff options
author | Brian Paul <[email protected]> | 2012-10-02 09:52:55 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-10-02 15:19:00 -0600 |
commit | df4a88ac4398ec4c152eb57a7129c07bb623edd7 (patch) | |
tree | 475b45742b14412321de0646c894333958161966 /src/mesa/main/teximage.c | |
parent | 82e38ac91f60e4ca242814ad36a5eecb82156cc6 (diff) |
mesa: remove bogus compressed texture size checks
A compressed texture image size doesn't have to be a multiple of the
compressed block size (only sub-images do). Fixes issues when building
compressed mipmaps because we often wind up with non-block-size images
for the higher mipmap levels.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=55445
Note: This is a candidate for the stable branches.
Reviewed-by: Eric Anholt <[email protected]>
Tested-by: Sven Arvidsson <[email protected]>
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r-- | src/mesa/main/teximage.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 8e1e601da7c..019516f00a4 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -2055,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 [...] |