[Mesa-dev] [PATCH] mesa: Make CopyImage check against BaseLevel, not 0, for mipmapping.

Kenneth Graunke kenneth at whitecape.org
Tue Jan 3 04:01:49 UTC 2017


The intention here is to allow "base complete" instead of "mipmap
complete" as long as we're only copying from the base level (which
is usually 0, but not always).

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 src/mesa/main/copyimage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/main/copyimage.c b/src/mesa/main/copyimage.c
index cf25159e880..d10bf8cc61c 100644
--- a/src/mesa/main/copyimage.c
+++ b/src/mesa/main/copyimage.c
@@ -151,7 +151,7 @@ prepare_target(struct gl_context *ctx, GLuint name, GLenum target,
 
       _mesa_test_texobj_completeness(ctx, texObj);
       if (!texObj->_BaseComplete ||
-          (level != 0 && !texObj->_MipmapComplete)) {
+          (level != texObj->BaseLevel && !texObj->_MipmapComplete)) {
          _mesa_error(ctx, GL_INVALID_OPERATION,
                      "glCopyImageSubData(%sName incomplete)", dbg_prefix);
          return false;
-- 
2.11.0



More information about the mesa-dev mailing list