[cogl] progend-glsl: dirty prog for vertex state changes
- From: Robert Bragg <rbragg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl] progend-glsl: dirty prog for vertex state changes
- Date: Mon, 21 Jan 2013 17:25:29 +0000 (UTC)
commit 957e3d050624c224f1b46c20674df4922ffdadee
Author: Robert Bragg <robert linux intel com>
Date: Sat Jan 19 15:36:25 2013 +0000
progend-glsl: dirty prog for vertex state changes
_cogl_pipeline_progend_glsl_pre_change_notify and
_cogl_pipeline_progend_glsl_layer_pre_change_notify were only dirtying
the current program state for changes related to fragment processing.
This make both functions also check for changes that affect vertex
shader codegen.
This also fixes a mistake where
_cogl_pipeline_progend_glsl_layer_pre_change_notify was checking for
non-layer related changes which would never be seen, and instead it
should be checking for layer based changes only.
(cherry picked from commit efc48edb6fc59b12c252856c7263e562f4eb1777)
cogl/driver/gl/cogl-pipeline-progend-glsl.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/cogl/driver/gl/cogl-pipeline-progend-glsl.c b/cogl/driver/gl/cogl-pipeline-progend-glsl.c
index fd3c4d6..c4e4bc2 100644
--- a/cogl/driver/gl/cogl-pipeline-progend-glsl.c
+++ b/cogl/driver/gl/cogl-pipeline-progend-glsl.c
@@ -756,8 +756,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;
@@ -792,13 +795,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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]