summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cogl/driver/gl/cogl-pipeline-progend-glsl.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/cogl/driver/gl/cogl-pipeline-progend-glsl.c b/cogl/driver/gl/cogl-pipeline-progend-glsl.c
index 417e156b..29fbe306 100644
--- a/cogl/driver/gl/cogl-pipeline-progend-glsl.c
+++ b/cogl/driver/gl/cogl-pipeline-progend-glsl.c
@@ -830,8 +830,11 @@ _cogl_pipeline_progend_glsl_pre_change_notify (CoglPipeline *pipeline,
{
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
- if ((change & _cogl_pipeline_get_state_for_fragment_codegen (ctx)))
- dirty_program_state (pipeline);
+ if ((change & (_cogl_pipeline_get_state_for_fragment_codegen (ctx) |
+ COGL_PIPELINE_STATE_AFFECTS_VERTEX_CODEGEN)))
+ {
+ dirty_program_state (pipeline);
+ }
else
{
int i;
@@ -866,13 +869,12 @@ _cogl_pipeline_progend_glsl_layer_pre_change_notify (
{
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
- if ((change & _cogl_pipeline_get_state_for_fragment_codegen (ctx)))
+ if ((change & (_cogl_pipeline_get_layer_state_for_fragment_codegen (ctx) |
+ COGL_PIPELINE_LAYER_STATE_AFFECTS_VERTEX_CODEGEN)))
{
dirty_program_state (owner);
- return;
}
-
- if (change & COGL_PIPELINE_LAYER_STATE_COMBINE_CONSTANT)
+ else if (change & COGL_PIPELINE_LAYER_STATE_COMBINE_CONSTANT)
{
CoglPipelineProgramState *program_state = get_program_state (owner);
if (program_state)
@@ -881,8 +883,7 @@ _cogl_pipeline_progend_glsl_layer_pre_change_notify (
program_state->unit_state[unit_index].dirty_combine_constant = TRUE;
}
}
-
- if (change & COGL_PIPELINE_LAYER_STATE_USER_MATRIX)
+ else if (change & COGL_PIPELINE_LAYER_STATE_USER_MATRIX)
{
CoglPipelineProgramState *program_state = get_program_state (owner);
if (program_state)