From: Ilia Mirkin Date: Tue, 6 May 2014 06:51:45 +0000 (-0400) Subject: mesa: pass target through to driver when choosing texture format X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9d95d64be0893a18922da75d2625235ae410d3ab;p=mesa.git mesa: pass target through to driver when choosing texture format This only matters for TextureView where the texObj's target has not been set yet, in all other instances, texObj->target should be the same as the passed-in target parameter. Signed-off-by: Ilia Mirkin Reviewed-by: Brian Paul --- diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index c7f301cbdd3..845ba80143f 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -3024,7 +3024,7 @@ _mesa_choose_texture_format(struct gl_context *ctx, } /* choose format from scratch */ - f = ctx->Driver.ChooseTextureFormat(ctx, texObj->Target, internalFormat, + f = ctx->Driver.ChooseTextureFormat(ctx, target, internalFormat, format, type); ASSERT(f != MESA_FORMAT_NONE); return f;