summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPlamena Manolova <plamena.n.manolova@intel.com>2013-03-20 14:25:19 +0000
committerNeil Roberts <neil@linux.intel.com>2013-03-20 14:37:58 +0000
commitb833d26b3fc7604993b2fb695b6427303b2f30c2 (patch)
tree02c1849db802fdd24ae7167c53b37e0f6c479e04
parent22363a41377b68b592b1f777aacfe273fe8ae157 (diff)
Fix multiple snippet interleaving bug
Interleaving multiple snippets with different hooks (COGL_SNIPPET_HOOK_VERTEX and COGL_SNIPPET_HOOK_VERTEX_TRANSFORM, for instance) used to cause a bug during shader code generation. Reviewed-by: Neil Roberts <neil@linux.intel.com> (cherry picked from commit 38ca76695d54bbbfe3b940a6d0b2ae879e6fd66b)
-rw-r--r--cogl/cogl-pipeline-snippet.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cogl/cogl-pipeline-snippet.c b/cogl/cogl-pipeline-snippet.c
index 0e0f6209..8bfa8be5 100644
--- a/cogl/cogl-pipeline-snippet.c
+++ b/cogl/cogl-pipeline-snippet.c
@@ -100,7 +100,7 @@ _cogl_pipeline_snippet_generate_code (const CoglPipelineSnippetData *data)
for (snippet = first_snippet, snippet_num = 0;
snippet_num < n_snippets;
- snippet = COGL_LIST_NEXT (snippet, list_node), snippet_num++)
+ snippet = COGL_LIST_NEXT (snippet, list_node))
if (snippet->snippet->hook == data->hook)
{
const char *source;
@@ -180,6 +180,7 @@ _cogl_pipeline_snippet_generate_code (const CoglPipelineSnippetData *data)
data->return_variable);
g_string_append (data->source_buf, "}\n");
+ snippet_num++;
}
}