From: Ilia Mirkin Date: Fri, 8 Jul 2016 16:35:11 +0000 (-0400) Subject: meta/texsubimage: tex_image is always non-null, avoid confusing code X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8b7607d28a4d0db43a9bc5618d7f6ff44daa0dc2;p=mesa.git meta/texsubimage: tex_image is always non-null, avoid confusing code Probably a copy-paste from mesa_meta_pbo_GetTexSubImage where tex_image may apparently be null. Signed-off-by: Ilia Mirkin Reviewed-by: Eric Engestrom --- diff --git a/src/mesa/drivers/common/meta_tex_subimage.c b/src/mesa/drivers/common/meta_tex_subimage.c index 988af91ce4e..703efcd669b 100644 --- a/src/mesa/drivers/common/meta_tex_subimage.c +++ b/src/mesa/drivers/common/meta_tex_subimage.c @@ -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);