diff options
author | Brian Paul <[email protected]> | 2013-11-07 16:59:40 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2013-11-11 08:12:18 -0700 |
commit | dc21b36daf9037f0747071e124b73f48ea5ff117 (patch) | |
tree | 1f248dd77ecd3c83feba9f697944a587eec89175 /src/gallium/auxiliary/util | |
parent | 944eebbdb4ea9dd8283f83ade01110be9bf2bba7 (diff) |
util: set all unused cbufs to NULL in util_copy_framebuffer_state()
This helps fix an issue in the svga driver, and is just safer all-around.
Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r-- | src/gallium/auxiliary/util/u_framebuffer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_framebuffer.c b/src/gallium/auxiliary/util/u_framebuffer.c index 7803ec6a8b5..f84485d1f1c 100644 --- a/src/gallium/auxiliary/util/u_framebuffer.c +++ b/src/gallium/auxiliary/util/u_framebuffer.c @@ -88,7 +88,8 @@ util_copy_framebuffer_state(struct pipe_framebuffer_state *dst, for (i = 0; i < src->nr_cbufs; i++) pipe_surface_reference(&dst->cbufs[i], src->cbufs[i]); - for (i = src->nr_cbufs; i < dst->nr_cbufs; i++) + /* Set remaining dest cbuf pointers to NULL */ + for ( ; i < Elements(dst->cbufs); i++) pipe_surface_reference(&dst->cbufs[i], NULL); dst->nr_cbufs = src->nr_cbufs; |