diff options
author | Brian <brian.paul@tungstengraphics.com> | 2008-02-20 15:09:27 -0700 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2008-02-20 15:09:44 -0700 |
commit | 25ea1901b44107a5bc5351487e18d52d75df8ffd (patch) | |
tree | 6b5255f7342a5fccabdbe0d3c845a0fbb12693af /src/gallium/drivers/softpipe/sp_state_sampler.c | |
parent | fce61f341faf6a2e1a8497ab963985ddbffa8b0a (diff) |
gallium: replace some ordinary assignments with pipe_reference_texture()
This fixes at least one instance of dereferencing an invalid texture pointer.
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_state_sampler.c')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_state_sampler.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/softpipe/sp_state_sampler.c b/src/gallium/drivers/softpipe/sp_state_sampler.c index 9246915e19..18669a1c6e 100644 --- a/src/gallium/drivers/softpipe/sp_state_sampler.c +++ b/src/gallium/drivers/softpipe/sp_state_sampler.c @@ -30,6 +30,7 @@ */ #include "pipe/p_util.h" +#include "pipe/p_inlines.h" #include "draw/draw_context.h" @@ -82,7 +83,7 @@ softpipe_set_sampler_texture(struct pipe_context *pipe, draw_flush(softpipe->draw); assert(unit < PIPE_MAX_SAMPLERS); - softpipe->texture[unit] = softpipe_texture(texture); /* ptr, not struct */ + pipe_texture_reference(pipe, &softpipe->texture[unit], texture); sp_tile_cache_set_texture(pipe, softpipe->tex_cache[unit], texture); |