projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
21c4792
)
gallium/util: fix up inaccurate behavior of util_framebuffer_state_equal (v2)
author
Marek Olšák
<marek.olsak@amd.com>
Sun, 27 Mar 2016 17:11:09 +0000
(19:11 +0200)
committer
Marek Olšák
<marek.olsak@amd.com>
Sun, 27 Mar 2016 22:46:23 +0000
(
00:46
+0200)
v2: move the nr_cbufs check above the loop
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> (v1)
src/gallium/auxiliary/util/u_framebuffer.c
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/util/u_framebuffer.c
b/src/gallium/auxiliary/util/u_framebuffer.c
index 2e0ef749e820603fc5635707076ddc4b9afe9760..49b391d8162212c25ba8c71202d2180e04e0eac3 100644
(file)
--- 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;
}