From b8503418ff693afd16023f3e05e7907492745820 Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Thu, 21 Jul 2011 00:41:00 +0100 Subject: [PATCH] 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 --- cogl/cogl-framebuffer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cogl/cogl-framebuffer.c b/cogl/cogl-framebuffer.c index 6ece74d33..a86e4a68a 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