[cogl] framebuffer: dec current_pipeline_age to force color_mask
- From: Robert Bragg <rbragg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl] framebuffer: dec current_pipeline_age to force color_mask
- Date: Thu, 28 Jul 2011 19:49:55 +0000 (UTC)
commit b8503418ff693afd16023f3e05e7907492745820
Author: Robert Bragg <robert linux intel com>
Date: Thu Jul 21 00:41:00 2011 +0100
framebuffer: dec current_pipeline_age to force color_mask
When we need to guarantee that the glColorMask is re-asserted the next
time that a primitive is drawn it is not enough to just OR in the
LOGIC_OPS flag to ctx->current_pipeline_changes_since_flush because
_cogl_pipeline_flush_gl_state actually checks the age of the pipeline
before checking that. If the pipeline hasn't aged then we bail out
early. This makes sure we decrement
ctx->current_pipeline_changes_since_flush so the next time we come to
flush a pipeline we will see a differing age.
Reviewed-by: Neil Roberts <neil linux intel com>
cogl/cogl-framebuffer.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/cogl/cogl-framebuffer.c b/cogl/cogl-framebuffer.c
index 6ece74d..a86e4a6 100644
--- a/cogl/cogl-framebuffer.c
+++ b/cogl/cogl-framebuffer.c
@@ -257,6 +257,7 @@ _cogl_clear4f (unsigned long buffers,
/* Make sure the ColorMask is updated when the next primitive is drawn */
ctx->current_pipeline_changes_since_flush |=
COGL_PIPELINE_STATE_LOGIC_OPS;
+ ctx->current_pipeline_age--;
}
}
@@ -1528,6 +1529,7 @@ cogl_framebuffer_set_color_mask (CoglFramebuffer *framebuffer,
/* Make sure the ColorMask is updated when the next primitive is drawn */
ctx->current_pipeline_changes_since_flush |=
COGL_PIPELINE_STATE_LOGIC_OPS;
+ ctx->current_pipeline_age--;
}
gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]