diff options
author | José Fonseca <jrfonseca@tungstengraphics.com> | 2008-03-11 23:51:27 +0000 |
---|---|---|
committer | José Fonseca <jrfonseca@tungstengraphics.com> | 2008-03-12 00:27:52 +0000 |
commit | 21ff00306131cd5598f95285badaaabc98021e11 (patch) | |
tree | 368c179285e871a208d386100a99d08eb3da5222 /src/gallium/drivers/softpipe/sp_state_sampler.c | |
parent | 45c59895113f997e5f2b7e346f95e46099fa3566 (diff) |
gallium: Silence MSVC warnings.
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_state_sampler.c')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_state_sampler.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/drivers/softpipe/sp_state_sampler.c b/src/gallium/drivers/softpipe/sp_state_sampler.c index 7cf85b9207..033288a0aa 100644 --- a/src/gallium/drivers/softpipe/sp_state_sampler.c +++ b/src/gallium/drivers/softpipe/sp_state_sampler.c @@ -56,6 +56,7 @@ softpipe_bind_sampler_states(struct pipe_context *pipe, unsigned num, void **sampler) { struct softpipe_context *softpipe = softpipe_context(pipe); + unsigned i; assert(num <= PIPE_MAX_SAMPLERS); @@ -66,9 +67,10 @@ softpipe_bind_sampler_states(struct pipe_context *pipe, draw_flush(softpipe->draw); - memcpy(softpipe->sampler, sampler, num * sizeof(void *)); - memset(&softpipe->sampler[num], 0, (PIPE_MAX_SAMPLERS - num) * - sizeof(void *)); + for (i = 0; i < num; ++i) + softpipe->sampler[i] = sampler[i]; + for (i = num; i < PIPE_MAX_SAMPLERS; ++i) + softpipe->sampler[i] = NULL; softpipe->num_samplers = num; |