[Mesa-dev] [PATCH] mesa: pass target through to driver when choosing texture format

Ilia Mirkin imirkin at alum.mit.edu
Tue May 6 01:33:26 PDT 2014


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 at alum.mit.edu>
---

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;
-- 
1.8.3.2



More information about the mesa-dev mailing list