diff options
Diffstat (limited to 'src/mesa/swrast')
-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); + } } } |