mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
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)
This commit is contained in:
parent
22363a4137
commit
b833d26b3f
@ -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++;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user