[Cogl] [PATCH] Fix interleaved snippet generation bug

Neil Roberts neil at linux.intel.com
Wed Mar 20 07:11:39 PDT 2013


Good catch, thanks for the patch. However the patch is making a few
unrelated style changes which make it harder to follow. Could you please
avoid re-indenting the for loop and adding/removing the blank lines? That
way the patch should end up as only changing two lines which makes it
much easier to understand if we ever end up looking back at it in the
git history.

The commit message is not quite right because the snippets for vertex
and fragment hooks are stored in separate lists so interleaving them
would not cause the problem. The problem should only occur if snippets
with different hooks within the fragment or vertex stage are mixed. So
for example, if you add two snippets for the COGL_SNIPPET_HOOK_VERTEX
hook but insert a snippet for COGL_SNIPPET_HOOK_VERTEX_TRANSFORM
in-between it would trigger the problem. It doesn't necessarily have to
be the new global declarations hook.

Regards,
- Neil

Plamena Manolova <plamena.n.manolova at intel.com> writes:

> Having declartion snippets interleaved with either
> vertex or fragment ones used to cause a bug during
> snippet code generation.
---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



More information about the Cogl mailing list