diff options
author | Brian Paul <[email protected]> | 2012-08-24 08:31:37 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-08-24 14:08:57 -0600 |
commit | d47a6ada9ca9670c60fc141fabadf40c63031c08 (patch) | |
tree | f39bc5068fec91606b1e03c7c602a864c1e89762 /src/mesa/main/teximage.c | |
parent | ba7218061b6a6c09d5d20f12de6267673276e094 (diff) |
mesa: add texture target field to ChooseTextureFormat() driver hook
This will let us choose the actual hardware format depending on the
type of texture.
v2: fixup radeon, nouveau, intel and swrast drivers too
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r-- | src/mesa/main/teximage.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 8ec48eb62a6..59b38dee4aa 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -2035,7 +2035,7 @@ compressed_texture_error_check(struct gl_context *ctx, GLint dimensions, /* check image size against compression block size */ { gl_format texFormat = - ctx->Driver.ChooseTextureFormat(ctx, proxy_format, + ctx->Driver.ChooseTextureFormat(ctx, target, proxy_format, choose_format, choose_type); GLuint bw, bh; @@ -2797,7 +2797,8 @@ _mesa_choose_texture_format(struct gl_context *ctx, } /* choose format from scratch */ - f = ctx->Driver.ChooseTextureFormat(ctx, internalFormat, format, type); + f = ctx->Driver.ChooseTextureFormat(ctx, texObj->Target, internalFormat, + format, type); ASSERT(f != MESA_FORMAT_NONE); return f; } |