summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texobj.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-08-24 08:31:37 -0600
committerBrian Paul <[email protected]>2012-08-24 14:08:57 -0600
commitd47a6ada9ca9670c60fc141fabadf40c63031c08 (patch)
treef39bc5068fec91606b1e03c7c602a864c1e89762 /src/mesa/main/texobj.c
parentba7218061b6a6c09d5d20f12de6267673276e094 (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/texobj.c')
-rw-r--r--src/mesa/main/texobj.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 2b2dccfbc1f..638e418dab4 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -783,7 +783,8 @@ _mesa_get_fallback_texture(struct gl_context *ctx, gl_texture_index tex)
texObj->Sampler.MinFilter = GL_NEAREST;
texObj->Sampler.MagFilter = GL_NEAREST;
- texFormat = ctx->Driver.ChooseTextureFormat(ctx, GL_RGBA, GL_RGBA,
+ texFormat = ctx->Driver.ChooseTextureFormat(ctx, target,
+ GL_RGBA, GL_RGBA,
GL_UNSIGNED_BYTE);
/* need a loop here just for cube maps */