meta/texsubimage: tex_image is always non-null, avoid confusing code
authorIlia Mirkin <imirkin@alum.mit.edu>
Fri, 8 Jul 2016 16:35:11 +0000 (12:35 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Tue, 12 Jul 2016 01:18:05 +0000 (21:18 -0400)
Probably a copy-paste from mesa_meta_pbo_GetTexSubImage where tex_image
may apparently be null.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
src/mesa/drivers/common/meta_tex_subimage.c

index 988af91ce4eaf1882991fbdc60adb0bec50b34ca..703efcd669bc30a521152132cb3932092afb99e9 100644 (file)
@@ -235,7 +235,7 @@ _mesa_meta_pbo_TexSubImage(struct gl_context *ctx, GLuint dims,
    if (drawFb == NULL)
       goto fail;
 
-   _mesa_bind_framebuffers(ctx, drawFb, tex_image ? readFb : ctx->ReadBuffer);
+   _mesa_bind_framebuffers(ctx, drawFb, readFb);
 
    if (tex_image->TexObject->Target == GL_TEXTURE_1D_ARRAY) {
       assert(depth == 1);