From 7d840de18f6bc44287e93112870ed02b614f421b Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Tue, 30 Nov 2010 22:15:40 +0000 Subject: [PATCH] cogl-pipeline: Add more ignored state changes for program generation For shader generation backends we don't need to worry about changes to the texture object and changing the user matrix. The missing user matrix flag was causing test-cogl-multitexture to regenerate the shader every frame. --- cogl/cogl-pipeline-arbfp.c | 5 ++++- cogl/cogl-pipeline-glsl.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cogl/cogl-pipeline-arbfp.c b/cogl/cogl-pipeline-arbfp.c index 3e19f510a..6a39ab63f 100644 --- a/cogl/cogl-pipeline-arbfp.c +++ b/cogl/cogl-pipeline-arbfp.c @@ -946,7 +946,10 @@ _cogl_pipeline_backend_arbfp_layer_pre_change_notify ( CoglPipelineBackendARBfpPrivate *priv; static const unsigned long not_fragment_op_changes = COGL_PIPELINE_LAYER_STATE_COMBINE_CONSTANT | - COGL_PIPELINE_LAYER_STATE_TEXTURE; + COGL_PIPELINE_LAYER_STATE_TEXTURE | + COGL_PIPELINE_LAYER_STATE_FILTERS | + COGL_PIPELINE_LAYER_STATE_WRAP_MODES | + COGL_PIPELINE_LAYER_STATE_USER_MATRIX; priv = get_arbfp_priv (owner); if (!priv) diff --git a/cogl/cogl-pipeline-glsl.c b/cogl/cogl-pipeline-glsl.c index e2b99bd41..fbefbf828 100644 --- a/cogl/cogl-pipeline-glsl.c +++ b/cogl/cogl-pipeline-glsl.c @@ -1204,7 +1204,10 @@ _cogl_pipeline_backend_glsl_layer_pre_change_notify ( CoglPipelineBackendGlslPrivate *priv; static const unsigned long not_fragment_op_changes = COGL_PIPELINE_LAYER_STATE_COMBINE_CONSTANT | - COGL_PIPELINE_LAYER_STATE_TEXTURE; + COGL_PIPELINE_LAYER_STATE_TEXTURE | + COGL_PIPELINE_LAYER_STATE_FILTERS | + COGL_PIPELINE_LAYER_STATE_WRAP_MODES | + COGL_PIPELINE_LAYER_STATE_USER_MATRIX; priv = get_glsl_priv (owner); if (!priv)