diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2008-05-19 12:48:06 -0600 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2008-05-19 12:48:06 -0600 |
commit | d00c8a52f37347fc72982611f910e85cbadca029 (patch) | |
tree | 3a0e5a80943c61c292025661419bcd0d6bf62b6c /src | |
parent | a846b156b8a0d2ef63de8f905af440f54e5668c7 (diff) | |
parent | 21e614eabc5e6a502504f307f3710b4dd0417923 (diff) |
Merge branch 'gallium-0.1' into gallium-tex-surfaces
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pipe_aaline.c | 8 | ||||
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pipe_pstipple.c | 5 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe_aaline.c b/src/gallium/auxiliary/draw/draw_pipe_aaline.c index 6dc20f2c90..b1ed8aa24e 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_aaline.c +++ b/src/gallium/auxiliary/draw/draw_pipe_aaline.c @@ -715,6 +715,11 @@ static void aaline_destroy(struct draw_stage *stage) { struct aaline_stage *aaline = aaline_stage(stage); + uint i; + + for (i = 0; i < PIPE_MAX_SAMPLERS; i++) { + pipe_texture_reference(&aaline->state.texture[i], NULL); + } if (aaline->sampler_cso) aaline->pipe->delete_sampler_state(aaline->pipe, aaline->sampler_cso); @@ -838,6 +843,9 @@ aaline_set_sampler_textures(struct pipe_context *pipe, for (i = 0; i < num; i++) { pipe_texture_reference(&aaline->state.texture[i], texture[i]); } + for ( ; i < PIPE_MAX_SAMPLERS; i++) { + pipe_texture_reference(&aaline->state.texture[i], NULL); + } aaline->num_textures = num; /* pass-through */ diff --git a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c index 4bca92ff11..4c92416eb1 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c +++ b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c @@ -564,6 +564,11 @@ static void pstip_destroy(struct draw_stage *stage) { struct pstip_stage *pstip = pstip_stage(stage); + uint i; + + for (i = 0; i < PIPE_MAX_SAMPLERS; i++) { + pipe_texture_reference(&pstip->state.textures[i], NULL); + } pstip->pipe->delete_sampler_state(pstip->pipe, pstip->sampler_cso); |