diff options
author | Brian Paul <[email protected]> | 2011-09-17 14:50:48 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-09-17 14:57:40 -0600 |
commit | ce82914f5ad4bb9148370826099925590e9798fd (patch) | |
tree | 5d5e0c19f5d09c52df3aaa88a95c13a4ff89b7dd /src/mesa/swrast/s_context.c | |
parent | f0f28548c29690fc9e44a2f7b0d1965d9fc564fa (diff) |
mesa: move _mesa_update_fetch_functions() calls into swrast
Do it during swrast state validation since the FetchTexel() functions
are only called from swrast now and not core Mesa.
Remove assertions in mipmap.c since they're no longer appropriate.
Diffstat (limited to 'src/mesa/swrast/s_context.c')
-rw-r--r-- | src/mesa/swrast/s_context.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index df213357fae..963b7056be5 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -31,6 +31,7 @@ #include "main/colormac.h" #include "main/mtypes.h" #include "main/teximage.h" +#include "main/texfetch.h" #include "program/prog_parameter.h" #include "program/prog_statevars.h" #include "swrast.h" @@ -469,11 +470,14 @@ _swrast_update_texture_samplers(struct gl_context *ctx) return; /* pipe hack */ for (u = 0; u < ctx->Const.MaxTextureImageUnits; u++) { - const struct gl_texture_object *tObj = ctx->Texture.Unit[u]._Current; + struct gl_texture_object *tObj = ctx->Texture.Unit[u]._Current; /* Note: If tObj is NULL, the sample function will be a simple * function that just returns opaque black (0,0,0,1). */ - swrast->TextureSample[u] = _swrast_choose_texture_sample_func(ctx, tObj); + if (tObj) { + _mesa_update_fetch_functions(tObj); + swrast->TextureSample[u] = _swrast_choose_texture_sample_func(ctx, tObj); + } } } |