diff options
author | Robert Bragg <robert@linux.intel.com> | 2011-07-21 00:41:00 +0100 |
---|---|---|
committer | Robert Bragg <robert@linux.intel.com> | 2011-07-28 20:44:21 +0100 |
commit | b8503418ff693afd16023f3e05e7907492745820 (patch) | |
tree | d5f7ad99581276488d948648ebc58436de479ca5 | |
parent | d51c3c423e44939b330ba9833045f52e66d81a53 (diff) | |
download | cogl-b8503418ff693afd16023f3e05e7907492745820.tar.gz |
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>
-rw-r--r-- | 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 6ece74d3..a86e4a68 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 |