mesa: pass target through to driver when choosing texture format
authorIlia Mirkin <imirkin@alum.mit.edu>
Tue, 6 May 2014 06:51:45 +0000 (02:51 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Thu, 8 May 2014 00:40:46 +0000 (20:40 -0400)
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 <imirkin@alum.mit.edu>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/teximage.c

index c7f301cbdd31b6364332a32cfa77a39701185d97..845ba80143f7655d5d2b7b2da88816e1a5441e1f 100644 (file)
@@ -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;