diff options
author | Christoph Bumiller <[email protected]> | 2010-08-18 14:37:47 +0200 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2010-08-18 14:37:47 +0200 |
commit | 3e54d63429fe7ca5db3c75c181abbaf7a7f55724 (patch) | |
tree | e129c36aaef712525f0a04fc5b06c445e3cf84df /src/gallium/auxiliary/util/u_framebuffer.c | |
parent | eaab76457818fad0926b84c663440e8987e1f19f (diff) | |
parent | 85d9bc236d6a8ff8f12cbc2150f8c3740354f573 (diff) |
Merge remote branch 'origin/master' into nv50-compiler
Diffstat (limited to 'src/gallium/auxiliary/util/u_framebuffer.c')
-rw-r--r-- | src/gallium/auxiliary/util/u_framebuffer.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/util/u_framebuffer.c b/src/gallium/auxiliary/util/u_framebuffer.c index 768ae9ceb5d..7803ec6a8b5 100644 --- a/src/gallium/auxiliary/util/u_framebuffer.c +++ b/src/gallium/auxiliary/util/u_framebuffer.c @@ -85,9 +85,11 @@ util_copy_framebuffer_state(struct pipe_framebuffer_state *dst, dst->width = src->width; dst->height = src->height; - for (i = 0; i < Elements(src->cbufs); i++) { + 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++) + pipe_surface_reference(&dst->cbufs[i], NULL); dst->nr_cbufs = src->nr_cbufs; |