[Mesa-dev] [PATCH] meta/texsubimage: tex_image is always non-null, avoid confusing code
Eric Engestrom
eric.engestrom at imgtec.com
Fri Jul 8 16:44:46 UTC 2016
On Fri, Jul 08, 2016 at 12:35:11PM -0400, Ilia Mirkin wrote:
> Probably a copy-paste from mesa_meta_pbo_GetTexSubImage where tex_image
> may apparently be null.
>
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Indeed, tex_image is dereferenced 30 lines before, so at this point it
can't be null anymore.
Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>
> ---
>
> Happened upon this when trying to figure out the "incomplete fbo" issue.
>
> src/mesa/drivers/common/meta_tex_subimage.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/common/meta_tex_subimage.c b/src/mesa/drivers/common/meta_tex_subimage.c
> index 988af91..703efcd 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);
> --
> 2.7.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list