On 05/06/2014 02:33 AM, Ilia Mirkin wrote:
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 <[email protected]>
---
I ran into an assert in mesa/st when choosing the texture format because the
target was 0. (While trying to implement texture views.) Not sure why it cares
about the target, but this seems correct.
src/mesa/main/teximage.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index c7f301c..845ba80 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;
Reviewed-by: Brian Paul <[email protected]>
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev