[cogl/wip/neil/snippets: 2/26] framebuffer: Fix an unitialized variable
- From: Neil Roberts <nroberts src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/wip/neil/snippets: 2/26] framebuffer: Fix an unitialized variable
- Date: Fri, 2 Dec 2011 12:45:11 +0000 (UTC)
commit 4f66cbb9db2f6be6c5a485a978ac8f7e64e194d3
Author: Neil Roberts <neil linux intel com>
Date: Tue Nov 29 21:16:36 2011 +0000
framebuffer: Fix an unitialized variable
The differences variable in _cogl_framebuffer_flush_state was being
used uninitialized so it would randomly flush extra framebuffer
state. I wonder why GCC didn't pick up on this?
cogl/cogl-framebuffer.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/cogl/cogl-framebuffer.c b/cogl/cogl-framebuffer.c
index db3e547..f8fc101 100644
--- a/cogl/cogl-framebuffer.c
+++ b/cogl/cogl-framebuffer.c
@@ -1603,7 +1603,7 @@ _cogl_framebuffer_flush_state (CoglFramebuffer *draw_buffer,
/* We can assume that any state that has changed for the current
* framebuffer is different to the currently flushed value. */
- differences |= ctx->current_draw_buffer_changes;
+ differences = ctx->current_draw_buffer_changes;
/* Any state of the current framebuffer that hasn't already been
* flushed is assumed to be unknown so we will always flush that
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]