diff options
author | Pauli Nieminen <[email protected]> | 2012-06-12 21:38:59 +0300 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2012-08-12 16:18:46 -0700 |
commit | bf6c1b74705243efdd43f07d381768fceede1f91 (patch) | |
tree | f95403a6fbeea8fb98221350eb2128090b268b55 | |
parent | b9daa834633f0e012a35f67cf232464e5cb3b9b6 (diff) |
meta: texture rectangle textures may not have mipmaps
Avoid INVALID_OPERATION error if decompressing rectangle texture.
Setting mipmap level limits for those textures is error that must not be
hit by meta code to mislead user.
[v3/Kayden]: Resolve conflicts due to Eric picking a subset of Pauli's
original changes.
Signed-off-by: Pauli Nieminen <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r-- | src/mesa/drivers/common/meta.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 850a2b4d690..d36b1a3b8a3 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -3410,8 +3410,10 @@ decompress_texture_image(struct gl_context *ctx, const GLint maxLevelSave = texObj->MaxLevel; /* restrict sampling to the texture level of interest */ - _mesa_TexParameteri(target, GL_TEXTURE_BASE_LEVEL, texImage->Level); - _mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, texImage->Level); + if (target != GL_TEXTURE_RECTANGLE_ARB) { + _mesa_TexParameteri(target, GL_TEXTURE_BASE_LEVEL, texImage->Level); + _mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, texImage->Level); + } /* No sRGB decode or encode.*/ if (ctx->Extensions.EXT_framebuffer_sRGB) { |