diff options
author | Marek Olšák <[email protected]> | 2016-03-27 19:11:09 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-03-28 00:46:23 +0200 |
commit | 6262d6125a175d64045083341e74985652f44f17 (patch) | |
tree | fbf92f29a5275b88cb025e86ff7295ea9500ab56 /src/gallium | |
parent | 21c479256a4f195bce89bc313ab9367deef20bb1 (diff) |
gallium/util: fix up inaccurate behavior of util_framebuffer_state_equal (v2)
v2: move the nr_cbufs check above the loop
Reviewed-by: Ilia Mirkin <[email protected]> (v1)
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/util/u_framebuffer.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/util/u_framebuffer.c b/src/gallium/auxiliary/util/u_framebuffer.c index 2e0ef749e82..49b391d8162 100644 --- a/src/gallium/auxiliary/util/u_framebuffer.c +++ b/src/gallium/auxiliary/util/u_framebuffer.c @@ -55,16 +55,16 @@ util_framebuffer_state_equal(const struct pipe_framebuffer_state *dst, dst->height != src->height) return FALSE; - for (i = 0; i < Elements(src->cbufs); i++) { + if (dst->nr_cbufs != src->nr_cbufs) { + return FALSE; + } + + for (i = 0; i < src->nr_cbufs; i++) { if (dst->cbufs[i] != src->cbufs[i]) { return FALSE; } } - if (dst->nr_cbufs != src->nr_cbufs) { - return FALSE; - } - if (dst->zsbuf != src->zsbuf) { return FALSE; } |