diff options
author | Pauli Nieminen <[email protected]> | 2012-06-12 21:38:56 +0300 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-08-01 15:55:51 -0700 |
commit | cbdc1d53542b3ecca0085399c4bb3b3371f94809 (patch) | |
tree | c835fd6c56f22692f8db127a882ae94e7a70d498 /src/mesa/swrast/s_context.c | |
parent | 8129dabb5f5ff717bb1ca32710ca6204d5345461 (diff) |
swrast: Support sampler object for texture fetching state
swrast needs to pass sampler object into all texture fetching functions
to use correct sampling state when sampler object is bound to the unit.
The changes were made using half manual regular expression replace.
v2: Fix NULL deref in _swrast_choose_triangle(), because the _Current
values aren't set yet, so we need to look at our texObj2D. (anholt)
Signed-off-by: Pauli Nieminen <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/swrast/s_context.c')
-rw-r--r-- | src/mesa/swrast/s_context.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index 432db71c8b0..4ed7b94c7bf 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -480,9 +480,7 @@ _swrast_update_texture_samplers(struct gl_context *ctx) /* Note: If tObj is NULL, the sample function will be a simple * function that just returns opaque black (0,0,0,1). */ - if (tObj) { - _mesa_update_fetch_functions(tObj); - } + _mesa_update_fetch_functions(ctx, u); swrast->TextureSample[u] = _swrast_choose_texture_sample_func(ctx, tObj, _mesa_get_samplerobj(ctx, u)); |