I'm slightly apprehensive about this from the pov that we loose support for a quite basic feature on fixed function hardware which seems a bit of a shame but we did talk about this before and figured that there's nothing stopping us adding it back later if we want.<div>
<br></div><div>I think the patch looks good to land to me:</div><div><br></div><div>Reviewed-by: Robert Bragg <<a href="mailto:robert@linux.intel.com">robert@linux.intel.com</a>></div><div><br></div><div>thanks,</div>
<div>- Robert</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Nov 21, 2012 at 7:04 PM, Neil Roberts <span dir="ltr"><<a href="mailto:neil@linux.intel.com" target="_blank">neil@linux.intel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The pipeline layer user matrix is not used very often and the way it<br>
is currently implemented comes at a non-trivial cost. Any pipeline<br>
layer that requires the big state needs to have a CoglMatrix added to<br>
its state. The generated vertex shader will always multiply the<br>
coordinates by the matrix even if it is just the identity matrix.<br>
<br>
The same functionality can be achieved on programmable hardware using<br>
a shader snippet. The snippet hook for the texture coordinate<br>
transform is still available to make this convenient.<br>
<br>
If we later decide that this is a really useful feature for fixed<br>
function hardware then we can add it back in and try to make it work<br>
more efficiently. In the meantime however it seems like a good idea to<br>
get rid of the API now before Cogl 2.0 is released and the API becomes<br>
fixed.<br>
---<br>
 cogl/cogl-journal.c                          |   6 +-<br>
 cogl/cogl-pipeline-layer-private.h           |  11 ---<br>
 cogl/cogl-pipeline-layer-state-private.h     |   9 --<br>
 cogl/cogl-pipeline-layer-state.c             | 128 ------------------------<br>
 cogl/cogl-pipeline-layer-state.h             |  17 ----<br>
 cogl/cogl-pipeline-layer.c                   |   9 --<br>
 cogl/cogl-pipeline-private.h                 |   4 -<br>
 cogl/cogl-pipeline-state-private.h           |   3 -<br>
 cogl/cogl-pipeline-state.c                   |  52 ----------<br>
 cogl/cogl-pipeline.c                         |   4 +-<br>
 cogl/cogl-primitives.c                       |  25 -----<br>
 cogl/cogl-snippet.h                          |  29 ++----<br>
 cogl/driver/gl/cogl-pipeline-progend-glsl.c  |  36 -------<br>
 cogl/driver/gl/cogl-pipeline-vertend-fixed.c |  23 -----<br>
 cogl/driver/gl/cogl-pipeline-vertend-glsl.c  |  27 ++---<br>
 doc/reference/cogl2/cogl2-sections.txt       |   1 -<br>
 tests/conform/Makefile.am                    |   1 -<br>
 tests/conform/test-conform-main.c            |   1 -<br>
 tests/conform/test-pipeline-user-matrix.c    | 141 ---------------------------<br>
 tests/conform/test-snippets.c                |  16 +--<br>
 20 files changed, 23 insertions(+), 520 deletions(-)<br>
 delete mode 100644 tests/conform/test-pipeline-user-matrix.c<br>
<br>
diff --git a/cogl/cogl-journal.c b/cogl/cogl-journal.c<br>
index 79fc016..45752fc 100644<br>
--- a/cogl/cogl-journal.c<br>
+++ b/cogl/cogl-journal.c<br>
@@ -781,10 +781,10 @@ can_software_clip_entry (CoglJournalEntry *journal_entry,<br>
      entries using the same pipeline as the previous entry */<br>
   if (prev_journal_entry == NULL || pipeline != prev_journal_entry->pipeline)<br>
     {<br>
-      /* If there is a custom texture transform; either due to custom shader<br>
-       * snippets or a custom texture matrix then we can't reliably modify the<br>
+      /* If there are any snippets then we can't reliably modify the<br>
        * texture coordinates. */<br>
-      if (_cogl_pipeline_maybe_has_custom_texture_transform (pipeline))<br>
+      if (_cogl_pipeline_has_vertex_snippets (pipeline) ||<br>
+          _cogl_pipeline_has_fragment_snippets (pipeline))<br>
         return FALSE;<br>
     }<br>
<br>
diff --git a/cogl/cogl-pipeline-layer-private.h b/cogl/cogl-pipeline-layer-private.h<br>
index 84ccd9d..90ceeab 100644<br>
--- a/cogl/cogl-pipeline-layer-private.h<br>
+++ b/cogl/cogl-pipeline-layer-private.h<br>
@@ -54,7 +54,6 @@ typedef enum<br>
   COGL_PIPELINE_LAYER_STATE_SAMPLER_INDEX,<br>
   COGL_PIPELINE_LAYER_STATE_COMBINE_INDEX,<br>
   COGL_PIPELINE_LAYER_STATE_COMBINE_CONSTANT_INDEX,<br>
-  COGL_PIPELINE_LAYER_STATE_USER_MATRIX_INDEX,<br>
   COGL_PIPELINE_LAYER_STATE_POINT_SPRITE_COORDS_INDEX,<br>
   COGL_PIPELINE_LAYER_STATE_VERTEX_SNIPPETS_INDEX,<br>
   COGL_PIPELINE_LAYER_STATE_FRAGMENT_SNIPPETS_INDEX,<br>
@@ -87,8 +86,6 @@ typedef enum<br>
     1L<<COGL_PIPELINE_LAYER_STATE_COMBINE_INDEX,<br>
   COGL_PIPELINE_LAYER_STATE_COMBINE_CONSTANT =<br>
     1L<<COGL_PIPELINE_LAYER_STATE_COMBINE_CONSTANT_INDEX,<br>
-  COGL_PIPELINE_LAYER_STATE_USER_MATRIX =<br>
-    1L<<COGL_PIPELINE_LAYER_STATE_USER_MATRIX_INDEX,<br>
<br>
   COGL_PIPELINE_LAYER_STATE_POINT_SPRITE_COORDS =<br>
     1L<<COGL_PIPELINE_LAYER_STATE_POINT_SPRITE_COORDS_INDEX,<br>
@@ -115,7 +112,6 @@ typedef enum<br>
 #define COGL_PIPELINE_LAYER_STATE_NEEDS_BIG_STATE \<br>
   (COGL_PIPELINE_LAYER_STATE_COMBINE | \<br>
    COGL_PIPELINE_LAYER_STATE_COMBINE_CONSTANT | \<br>
-   COGL_PIPELINE_LAYER_STATE_USER_MATRIX | \<br>
    COGL_PIPELINE_LAYER_STATE_POINT_SPRITE_COORDS | \<br>
    COGL_PIPELINE_LAYER_STATE_VERTEX_SNIPPETS | \<br>
    COGL_PIPELINE_LAYER_STATE_FRAGMENT_SNIPPETS)<br>
@@ -176,9 +172,6 @@ typedef struct<br>
<br>
   float texture_combine_constant[4];<br>
<br>
-  /* The texture matrix dscribes how to transform texture coordinates */<br>
-  CoglMatrix matrix;<br>
-<br>
   CoglBool point_sprite_coords;<br>
<br>
   CoglPipelineSnippetList vertex_snippets;<br>
@@ -295,10 +288,6 @@ _cogl_pipeline_layer_prune_redundant_ancestry (CoglPipelineLayer *layer);<br>
 CoglBool<br>
 _cogl_pipeline_layer_has_alpha (CoglPipelineLayer *layer);<br>
<br>
-CoglBool<br>
-_cogl_pipeline_layer_has_user_matrix (CoglPipeline *pipeline,<br>
-                                      int layer_index);<br>
-<br>
 /*<br>
  * Calls the pre_paint method on the layer texture if there is<br>
  * one. This will determine whether mipmaps are needed based on the<br>
diff --git a/cogl/cogl-pipeline-layer-state-private.h b/cogl/cogl-pipeline-layer-state-private.h<br>
index db3ae81..c4eb027 100644<br>
--- a/cogl/cogl-pipeline-layer-state-private.h<br>
+++ b/cogl/cogl-pipeline-layer-state-private.h<br>
@@ -67,10 +67,6 @@ _cogl_pipeline_layer_sampler_equal (CoglPipelineLayer *authority0,<br>
                                     CoglPipelineLayer *authority1);<br>
<br>
 CoglBool<br>
-_cogl_pipeline_layer_user_matrix_equal (CoglPipelineLayer *authority0,<br>
-                                        CoglPipelineLayer *authority1);<br>
-<br>
-CoglBool<br>
 _cogl_pipeline_layer_point_sprite_coords_equal (CoglPipelineLayer *authority0,<br>
                                                 CoglPipelineLayer *authority1);<br>
<br>
@@ -113,11 +109,6 @@ _cogl_pipeline_layer_hash_combine_constant_state (CoglPipelineLayer *authority,<br>
                                                   CoglPipelineHashState *state);<br>
<br>
 void<br>
-_cogl_pipeline_layer_hash_user_matrix_state (CoglPipelineLayer *authority,<br>
-                                             CoglPipelineLayer **authorities,<br>
-                                             CoglPipelineHashState *state);<br>
-<br>
-void<br>
 _cogl_pipeline_layer_hash_point_sprite_state (CoglPipelineLayer *authority,<br>
                                               CoglPipelineLayer **authorities,<br>
                                               CoglPipelineHashState *state);<br>
diff --git a/cogl/cogl-pipeline-layer-state.c b/cogl/cogl-pipeline-layer-state.c<br>
index b69ff46..5c05d16 100644<br>
--- a/cogl/cogl-pipeline-layer-state.c<br>
+++ b/cogl/cogl-pipeline-layer-state.c<br>
@@ -1043,19 +1043,6 @@ _cogl_pipeline_layer_sampler_equal (CoglPipelineLayer *authority0,<br>
 }<br>
<br>
 CoglBool<br>
-_cogl_pipeline_layer_user_matrix_equal (CoglPipelineLayer *authority0,<br>
-                                        CoglPipelineLayer *authority1)<br>
-{<br>
-  CoglPipelineLayerBigState *big_state0 = authority0->big_state;<br>
-  CoglPipelineLayerBigState *big_state1 = authority1->big_state;<br>
-<br>
-  if (!cogl_matrix_equal (&big_state0->matrix, &big_state1->matrix))<br>
-    return FALSE;<br>
-<br>
-  return TRUE;<br>
-}<br>
-<br>
-CoglBool<br>
 _cogl_pipeline_layer_point_sprite_coords_equal (CoglPipelineLayer *authority0,<br>
                                                 CoglPipelineLayer *authority1)<br>
 {<br>
@@ -1381,94 +1368,6 @@ _cogl_pipeline_get_layer_combine_constant (CoglPipeline *pipeline,<br>
           sizeof (float) * 4);<br>
 }<br>
<br>
-/* We should probably make a public API version of this that has a<br>
-   matrix out-param. For an internal API it's good to be able to avoid<br>
-   copying the matrix */<br>
-const CoglMatrix *<br>
-_cogl_pipeline_get_layer_matrix (CoglPipeline *pipeline, int layer_index)<br>
-{<br>
-  CoglPipelineLayerState       change =<br>
-    COGL_PIPELINE_LAYER_STATE_USER_MATRIX;<br>
-  CoglPipelineLayer *layer;<br>
-  CoglPipelineLayer *authority;<br>
-<br>
-  _COGL_RETURN_VAL_IF_FAIL (cogl_is_pipeline (pipeline), NULL);<br>
-<br>
-  layer = _cogl_pipeline_get_layer (pipeline, layer_index);<br>
-<br>
-  authority = _cogl_pipeline_layer_get_authority (layer, change);<br>
-  return &authority->big_state->matrix;<br>
-}<br>
-<br>
-void<br>
-cogl_pipeline_set_layer_matrix (CoglPipeline *pipeline,<br>
-                               int layer_index,<br>
-                                const CoglMatrix *matrix)<br>
-{<br>
-  CoglPipelineLayerState state = COGL_PIPELINE_LAYER_STATE_USER_MATRIX;<br>
-  CoglPipelineLayer     *layer;<br>
-  CoglPipelineLayer     *authority;<br>
-  CoglPipelineLayer     *new;<br>
-<br>
-  _COGL_RETURN_IF_FAIL (cogl_is_pipeline (pipeline));<br>
-<br>
-  /* Note: this will ensure that the layer exists, creating one if it<br>
-   * doesn't already.<br>
-   *<br>
-   * Note: If the layer already existed it's possibly owned by another<br>
-   * pipeline. If the layer is created then it will be owned by<br>
-   * pipeline. */<br>
-  layer = _cogl_pipeline_get_layer (pipeline, layer_index);<br>
-<br>
-  /* Now find the ancestor of the layer that is the authority for the<br>
-   * state we want to change */<br>
-  authority = _cogl_pipeline_layer_get_authority (layer, state);<br>
-<br>
-  if (cogl_matrix_equal (matrix, &authority->big_state->matrix))<br>
-    return;<br>
-<br>
-  new = _cogl_pipeline_layer_pre_change_notify (pipeline, layer, state);<br>
-  if (new != layer)<br>
-    layer = new;<br>
-  else<br>
-    {<br>
-      /* If the original layer we found is currently the authority on<br>
-       * the state we are changing see if we can revert to one of our<br>
-       * ancestors being the authority. */<br>
-      if (layer == authority &&<br>
-          _cogl_pipeline_layer_get_parent (authority) != NULL)<br>
-        {<br>
-          CoglPipelineLayer *parent =<br>
-            _cogl_pipeline_layer_get_parent (authority);<br>
-          CoglPipelineLayer *old_authority =<br>
-            _cogl_pipeline_layer_get_authority (parent, state);<br>
-<br>
-          if (cogl_matrix_equal (matrix, &old_authority->big_state->matrix))<br>
-            {<br>
-              layer->differences &= ~state;<br>
-<br>
-              g_assert (layer->owner == pipeline);<br>
-              if (layer->differences == 0)<br>
-                _cogl_pipeline_prune_empty_layer_difference (pipeline,<br>
-                                                             layer);<br>
-              return;<br>
-            }<br>
-        }<br>
-    }<br>
-<br>
-  layer->big_state->matrix = *matrix;<br>
-<br>
-  /* If we weren't previously the authority on this state then we need<br>
-   * to extended our differences mask and so it's possible that some<br>
-   * of our ancestry will now become redundant, so we aim to reparent<br>
-   * ourselves if that's true... */<br>
-  if (layer != authority)<br>
-    {<br>
-      layer->differences |= state;<br>
-      _cogl_pipeline_layer_prune_redundant_ancestry (layer);<br>
-    }<br>
-}<br>
-<br>
 CoglTexture *<br>
 _cogl_pipeline_layer_get_texture (CoglPipelineLayer *layer)<br>
 {<br>
@@ -1477,23 +1376,6 @@ _cogl_pipeline_layer_get_texture (CoglPipelineLayer *layer)<br>
   return _cogl_pipeline_layer_get_texture_real (layer);<br>
 }<br>
<br>
-CoglBool<br>
-_cogl_pipeline_layer_has_user_matrix (CoglPipeline *pipeline,<br>
-                                      int layer_index)<br>
-{<br>
-  CoglPipelineLayer *layer;<br>
-  CoglPipelineLayer *authority;<br>
-<br>
-  layer = _cogl_pipeline_get_layer (pipeline, layer_index);<br>
-<br>
-  authority =<br>
-    _cogl_pipeline_layer_get_authority (layer,<br>
-                                        COGL_PIPELINE_LAYER_STATE_USER_MATRIX);<br>
-<br>
-  /* If the authority is the default pipeline then no, otherwise yes */<br>
-  return _cogl_pipeline_layer_get_parent (authority) ? TRUE : FALSE;<br>
-}<br>
-<br>
 void<br>
 _cogl_pipeline_layer_get_filters (CoglPipelineLayer *layer,<br>
                                   CoglPipelineFilter *min_filter,<br>
@@ -1766,16 +1648,6 @@ done:<br>
 }<br>
<br>
 void<br>
-_cogl_pipeline_layer_hash_user_matrix_state (CoglPipelineLayer *authority,<br>
-                                             CoglPipelineLayer **authorities,<br>
-                                             CoglPipelineHashState *state)<br>
-{<br>
-  CoglPipelineLayerBigState *big_state = authority->big_state;<br>
-  state->hash = _cogl_util_one_at_a_time_hash (state->hash, &big_state->matrix,<br>
-                                               sizeof (float) * 16);<br>
-}<br>
-<br>
-void<br>
 _cogl_pipeline_layer_hash_point_sprite_state (CoglPipelineLayer *authority,<br>
                                               CoglPipelineLayer **authorities,<br>
                                               CoglPipelineHashState *state)<br>
diff --git a/cogl/cogl-pipeline-layer-state.h b/cogl/cogl-pipeline-layer-state.h<br>
index a785411..9380ddf 100644<br>
--- a/cogl/cogl-pipeline-layer-state.h<br>
+++ b/cogl/cogl-pipeline-layer-state.h<br>
@@ -318,23 +318,6 @@ cogl_pipeline_set_layer_combine_constant (CoglPipeline    *pipeline,<br>
                                           const CoglColor *constant);<br>
<br>
 /**<br>
- * cogl_pipeline_set_layer_matrix:<br>
- * @pipeline: A #CoglPipeline object<br>
- * @layer_index: the index for the layer inside @pipeline<br>
- * @matrix: the transformation matrix for the layer<br>
- *<br>
- * This function lets you set a matrix that can be used to e.g. translate<br>
- * and rotate a single layer of a pipeline used to fill your geometry.<br>
- *<br>
- * Since: 1.10<br>
- * Stability: unstable<br>
- */<br>
-void<br>
-cogl_pipeline_set_layer_matrix (CoglPipeline     *pipeline,<br>
-                               int               layer_index,<br>
-                               const CoglMatrix *matrix);<br>
-<br>
-/**<br>
  * cogl_pipeline_get_n_layers:<br>
  * @pipeline: A #CoglPipeline object<br>
  *<br>
diff --git a/cogl/cogl-pipeline-layer.c b/cogl/cogl-pipeline-layer.c<br>
index d9590c8..a3a4545 100644<br>
--- a/cogl/cogl-pipeline-layer.c<br>
+++ b/cogl/cogl-pipeline-layer.c<br>
@@ -168,7 +168,6 @@ _cogl_pipeline_layer_init_multi_property_sparse_state (<br>
     case COGL_PIPELINE_LAYER_STATE_TEXTURE_TYPE:<br>
     case COGL_PIPELINE_LAYER_STATE_TEXTURE_DATA:<br>
     case COGL_PIPELINE_LAYER_STATE_POINT_SPRITE_COORDS:<br>
-    case COGL_PIPELINE_LAYER_STATE_USER_MATRIX:<br>
     case COGL_PIPELINE_LAYER_STATE_COMBINE_CONSTANT:<br>
     case COGL_PIPELINE_LAYER_STATE_SAMPLER:<br>
       g_return_if_reached ();<br>
@@ -593,12 +592,6 @@ _cogl_pipeline_layer_equal (CoglPipelineLayer *layer0,<br>
                           _cogl_pipeline_layer_sampler_equal))<br>
     return FALSE;<br>
<br>
-  if (layers_difference & COGL_PIPELINE_LAYER_STATE_USER_MATRIX &&<br>
-      !layer_state_equal (COGL_PIPELINE_LAYER_STATE_USER_MATRIX_INDEX,<br>
-                          authorities0, authorities1,<br>
-                          _cogl_pipeline_layer_user_matrix_equal))<br>
-    return FALSE;<br>
-<br>
   if (layers_difference & COGL_PIPELINE_LAYER_STATE_POINT_SPRITE_COORDS &&<br>
       !layer_state_equal (COGL_PIPELINE_LAYER_STATE_POINT_SPRITE_COORDS_INDEX,<br>
                           authorities0, authorities1,<br>
@@ -693,8 +686,6 @@ _cogl_pipeline_init_default_layers (void)<br>
<br>
   big_state->point_sprite_coords = FALSE;<br>
<br>
-  cogl_matrix_init_identity (&big_state->matrix);<br>
-<br>
   ctx->default_layer_0 = _cogl_pipeline_layer_object_new (layer);<br>
<br>
   /* TODO: we should make default_layer_n comprise of two<br>
diff --git a/cogl/cogl-pipeline-private.h b/cogl/cogl-pipeline-private.h<br>
index 1a3d049..e3411a2 100644<br>
--- a/cogl/cogl-pipeline-private.h<br>
+++ b/cogl/cogl-pipeline-private.h<br>
@@ -793,10 +793,6 @@ _cogl_pipeline_journal_ref (CoglPipeline *pipeline);<br>
 void<br>
 _cogl_pipeline_journal_unref (CoglPipeline *pipeline);<br>
<br>
-const CoglMatrix *<br>
-_cogl_pipeline_get_layer_matrix (CoglPipeline *pipeline,<br>
-                                 int layer_index);<br>
-<br>
 void<br>
 _cogl_pipeline_texture_storage_change_notify (CoglTexture *texture);<br>
<br>
diff --git a/cogl/cogl-pipeline-state-private.h b/cogl/cogl-pipeline-state-private.h<br>
index 8c8b2b8..a4079a9 100644<br>
--- a/cogl/cogl-pipeline-state-private.h<br>
+++ b/cogl/cogl-pipeline-state-private.h<br>
@@ -46,9 +46,6 @@ _cogl_pipeline_get_colorubv (CoglPipeline *pipeline,<br>
 }<br>
<br>
 CoglBool<br>
-_cogl_pipeline_maybe_has_custom_texture_transform (CoglPipeline *pipeline);<br>
-<br>
-CoglBool<br>
 _cogl_pipeline_has_vertex_snippets (CoglPipeline *pipeline);<br>
<br>
 CoglBool<br>
diff --git a/cogl/cogl-pipeline-state.c b/cogl/cogl-pipeline-state.c<br>
index c4ec4ea..726d418 100644<br>
--- a/cogl/cogl-pipeline-state.c<br>
+++ b/cogl/cogl-pipeline-state.c<br>
@@ -1252,58 +1252,6 @@ _cogl_pipeline_has_fragment_snippets (CoglPipeline *pipeline)<br>
   return found_fragment_snippet;<br>
 }<br>
<br>
-static CoglBool<br>
-check_maybe_has_custom_texture_transform  (CoglPipelineLayer *layer,<br>
-                                           void *user_data)<br>
-{<br>
-  CoglBool *maybe_has_custom_texture_transform = user_data;<br>
-  unsigned long matrix_state = COGL_PIPELINE_LAYER_STATE_USER_MATRIX;<br>
-  unsigned long frag_state = COGL_PIPELINE_LAYER_STATE_FRAGMENT_SNIPPETS;<br>
-  unsigned long vert_state = COGL_PIPELINE_LAYER_STATE_VERTEX_SNIPPETS;<br>
-  CoglPipelineLayer *matrix_authority;<br>
-  CoglPipelineLayer *frag_authority;<br>
-  CoglPipelineLayer *vert_authority;<br>
-<br>
-  matrix_authority = _cogl_pipeline_layer_get_authority (layer, matrix_state);<br>
-  if (!_cogl_pipeline_layer_get_parent (matrix_authority))<br>
-    {<br>
-      *maybe_has_custom_texture_transform = TRUE;<br>
-      return FALSE;<br>
-    }<br>
-<br>
-  frag_authority = _cogl_pipeline_layer_get_authority (layer, frag_state);<br>
-  if (!COGL_LIST_EMPTY (&frag_authority->big_state->fragment_snippets))<br>
-    {<br>
-      *maybe_has_custom_texture_transform = TRUE;<br>
-      return FALSE;<br>
-    }<br>
-<br>
-  vert_authority = _cogl_pipeline_layer_get_authority (layer, vert_state);<br>
-  if (!COGL_LIST_EMPTY (&vert_authority->big_state->vertex_snippets))<br>
-    {<br>
-      *maybe_has_custom_texture_transform = TRUE;<br>
-      return FALSE;<br>
-    }<br>
-<br>
-  return TRUE;<br>
-}<br>
-<br>
-CoglBool<br>
-_cogl_pipeline_maybe_has_custom_texture_transform (CoglPipeline *pipeline)<br>
-{<br>
-  CoglBool maybe_has_custom_texture_transform = FALSE;<br>
-<br>
-  if (_cogl_pipeline_has_non_layer_fragment_snippets (pipeline))<br>
-    return TRUE;<br>
-<br>
-  _cogl_pipeline_foreach_layer_internal (<br>
-                                       pipeline,<br>
-                                       check_maybe_has_custom_texture_transform,<br>
-                                       &maybe_has_custom_texture_transform);<br>
-<br>
-  return maybe_has_custom_texture_transform;<br>
-}<br>
-<br>
 void<br>
 _cogl_pipeline_hash_color_state (CoglPipeline *authority,<br>
                                  CoglPipelineHashState *state)<br>
diff --git a/cogl/cogl-pipeline.c b/cogl/cogl-pipeline.c<br>
index 85264ab..35d0094 100644<br>
--- a/cogl/cogl-pipeline.c<br>
+++ b/cogl/cogl-pipeline.c<br>
@@ -2338,8 +2338,6 @@ _cogl_pipeline_init_layer_state_hash_functions (void)<br>
     _cogl_pipeline_layer_hash_combine_state;<br>
   layer_state_hash_functions[COGL_PIPELINE_LAYER_STATE_COMBINE_CONSTANT_INDEX] =<br>
     _cogl_pipeline_layer_hash_combine_constant_state;<br>
-  layer_state_hash_functions[COGL_PIPELINE_LAYER_STATE_USER_MATRIX_INDEX] =<br>
-    _cogl_pipeline_layer_hash_user_matrix_state;<br>
   _index = COGL_PIPELINE_LAYER_STATE_POINT_SPRITE_COORDS_INDEX;<br>
   layer_state_hash_functions[_index] =<br>
     _cogl_pipeline_layer_hash_point_sprite_state;<br>
@@ -2352,7 +2350,7 @@ _cogl_pipeline_init_layer_state_hash_functions (void)<br>
<br>
   {<br>
   /* So we get a big error if we forget to update this code! */<br>
-  _COGL_STATIC_ASSERT (COGL_PIPELINE_LAYER_STATE_SPARSE_COUNT == 10,<br>
+  _COGL_STATIC_ASSERT (COGL_PIPELINE_LAYER_STATE_SPARSE_COUNT == 9,<br>
                        "Don't forget to install a hash function for new "<br>
                        "pipeline state and update assert at end of "<br>
                        "_cogl_pipeline_init_state_hash_functions");<br>
diff --git a/cogl/cogl-primitives.c b/cogl/cogl-primitives.c<br>
index 87ca8bc..89a7106 100644<br>
--- a/cogl/cogl-primitives.c<br>
+++ b/cogl/cogl-primitives.c<br>
@@ -589,31 +589,6 @@ _cogl_rectangles_validate_layer_cb (CoglPipeline *pipeline,<br>
         }<br>
     }<br>
<br>
-#ifdef COGL_ENABLE_DEBUG<br>
-  /* If the texture can't be repeated with the GPU (e.g. because it has<br>
-   * waste or if using GL_TEXTURE_RECTANGLE_ARB) then if a texture matrix<br>
-   * is also in use we don't know if the result will end up trying<br>
-   * to texture from the waste area.<br>
-   *<br>
-   * Note: we check can_hardware_repeat() first since it's cheaper.<br>
-   *<br>
-   * Note: cases where the texture coordinates will require repeating<br>
-   * will be caught by later validation.<br>
-   */<br>
-  if (!_cogl_texture_can_hardware_repeat (texture) &&<br>
-      _cogl_pipeline_layer_has_user_matrix (pipeline, layer_index))<br>
-    {<br>
-      static CoglBool warning_seen = FALSE;<br>
-      if (!warning_seen)<br>
-        g_warning ("layer %d of your pipeline uses a custom "<br>
-                   "texture matrix but because the texture doesn't "<br>
-                   "support hardware repeating you may see artefacts "<br>
-                   "due to sampling beyond the texture's bounds.",<br>
-                   state->i);<br>
-      warning_seen = TRUE;<br>
-    }<br>
-#endif<br>
-<br>
   return TRUE;<br>
 }<br>
<br>
diff --git a/cogl/cogl-snippet.h b/cogl/cogl-snippet.h<br>
index b9b97f3..5348363 100644<br>
--- a/cogl/cogl-snippet.h<br>
+++ b/cogl/cogl-snippet.h<br>
@@ -144,14 +144,6 @@ G_BEGIN_DECLS<br>
  *    equivalent to #gl_ModelViewProjectionMatrix.<br>
  *   </para></glossdef><br>
  *  </glossentry><br>
- *  <glossentry><br>
- *   <glossterm>uniform mat4<br>
- *         <emphasis>cogl_texture_matrix</emphasis>[]</glossterm><br>
- *   <glossdef><para><br>
- *    An array of matrices for transforming the texture<br>
- *    coordinates. This is equivalent to #gl_TextureMatrix.<br>
- *   </para></glossdef><br>
- *  </glossentry><br>
  * </glosslist><br>
  *<br>
  * In a vertex shader, the following are also available:<br>
@@ -317,8 +309,8 @@ typedef struct _CoglSnippet CoglSnippet;<br>
  * @COGL_SNIPPET_HOOK_VERTEX_TRANSFORM: A hook for the vertex transformation.<br>
  * @COGL_SNIPPET_HOOK_FRAGMENT: A hook for the entire fragment<br>
  *   processing stage of the pipeline.<br>
- * @COGL_SNIPPET_HOOK_TEXTURE_COORD_TRANSFORM: A hook for applying the<br>
- *   layer matrix to a texture coordinate for a layer.<br>
+ * @COGL_SNIPPET_HOOK_TEXTURE_COORD_TRANSFORM: A hook for transforming<br>
+ *   the texture coordinates for a layer.<br>
  * @COGL_SNIPPET_HOOK_LAYER_FRAGMENT: A hook for the fragment<br>
  *   processing of a particular layer.<br>
  * @COGL_SNIPPET_HOOK_TEXTURE_LOOKUP: A hook for the texture lookup<br>
@@ -433,16 +425,13 @@ typedef struct _CoglSnippet CoglSnippet;<br>
  * the processing for a layer or to modify the results.<br>
  * </para><br>
  * <para><br>
- * Within the snippet code for this hook there are two extra<br>
- * variables. The first is a mat4 called cogl_matrix which represents<br>
- * the user matrix for this layer. The second is called cogl_tex_coord<br>
- * and represents the incoming and outgoing texture coordinate. On<br>
- * entry to the hook, cogl_tex_coord contains the value of the<br>
- * corresponding texture coordinate attribute for this layer. The hook<br>
- * is expected to modify this variable. The output will be passed as a<br>
- * varying to the fragment processing stage. The default code will<br>
- * just multiply cogl_matrix by cogl_tex_coord and store the result in<br>
- * cogl_tex_coord.<br>
+ * Within the snippet code for this hook there is an extra variable<br>
+ * called cogl_tex_coord and represents the incoming and outgoing<br>
+ * texture coordinate. On entry to the hook, cogl_tex_coord contains<br>
+ * the value of the corresponding texture coordinate attribute for<br>
+ * this layer. The hook is expected to modify this variable. The<br>
+ * output will be passed as a varying to the fragment processing<br>
+ * stage. The default code will leave cogl_tex_coord untouched.<br>
  * </para><br>
  * <para><br>
  * The ‘declarations’ string in @snippet will be inserted in the<br>
diff --git a/cogl/driver/gl/cogl-pipeline-progend-glsl.c b/cogl/driver/gl/cogl-pipeline-progend-glsl.c<br>
index 245ed7f..484e356 100644<br>
--- a/cogl/driver/gl/cogl-pipeline-progend-glsl.c<br>
+++ b/cogl/driver/gl/cogl-pipeline-progend-glsl.c<br>
@@ -91,11 +91,8 @@ const CoglPipelineProgend _cogl_pipeline_glsl_progend;<br>
 typedef struct _UnitState<br>
 {<br>
   unsigned int dirty_combine_constant:1;<br>
-  unsigned int dirty_texture_matrix:1;<br>
<br>
   GLint combine_constant_uniform;<br>
-<br>
-  GLint texture_matrix_uniform;<br>
 } UnitState;<br>
<br>
 typedef struct<br>
@@ -370,16 +367,6 @@ get_uniform_cb (CoglPipeline *pipeline,<br>
<br>
   unit_state->combine_constant_uniform = uniform_location;<br>
<br>
-  g_string_set_size (ctx->codegen_source_buffer, 0);<br>
-  g_string_append_printf (ctx->codegen_source_buffer,<br>
-                          "cogl_texture_matrix%i", layer_index);<br>
-<br>
-  GE_RET( uniform_location,<br>
-          ctx, glGetUniformLocation (state->gl_program,<br>
-                                     ctx->codegen_source_buffer->str) );<br>
-<br>
-  unit_state->texture_matrix_uniform = uniform_location;<br>
-<br>
   state->unit++;<br>
<br>
   return TRUE;<br>
@@ -408,19 +395,6 @@ update_constants_cb (CoglPipeline *pipeline,<br>
       unit_state->dirty_combine_constant = FALSE;<br>
     }<br>
<br>
-  if (unit_state->texture_matrix_uniform != -1 &&<br>
-      (state->update_all || unit_state->dirty_texture_matrix))<br>
-    {<br>
-      const CoglMatrix *matrix;<br>
-      const float *array;<br>
-<br>
-      matrix = _cogl_pipeline_get_layer_matrix (pipeline, layer_index);<br>
-      array = cogl_matrix_get_array (matrix);<br>
-      GE (ctx, glUniformMatrix4fv (unit_state->texture_matrix_uniform,<br>
-                                   1, FALSE, array));<br>
-      unit_state->dirty_texture_matrix = FALSE;<br>
-    }<br>
-<br>
   return TRUE;<br>
 }<br>
<br>
@@ -833,16 +807,6 @@ _cogl_pipeline_progend_glsl_layer_pre_change_notify (<br>
           program_state->unit_state[unit_index].dirty_combine_constant = TRUE;<br>
         }<br>
     }<br>
-<br>
-  if (change & COGL_PIPELINE_LAYER_STATE_USER_MATRIX)<br>
-    {<br>
-      CoglPipelineProgramState *program_state = get_program_state (owner);<br>
-      if (program_state)<br>
-        {<br>
-          int unit_index = _cogl_pipeline_layer_get_unit_index (layer);<br>
-          program_state->unit_state[unit_index].dirty_texture_matrix = TRUE;<br>
-        }<br>
-    }<br>
 }<br>
<br>
 static void<br>
diff --git a/cogl/driver/gl/cogl-pipeline-vertend-fixed.c b/cogl/driver/gl/cogl-pipeline-vertend-fixed.c<br>
index 606cb41..61d9eba 100644<br>
--- a/cogl/driver/gl/cogl-pipeline-vertend-fixed.c<br>
+++ b/cogl/driver/gl/cogl-pipeline-vertend-fixed.c<br>
@@ -57,29 +57,6 @@ _cogl_pipeline_vertend_fixed_add_layer (CoglPipeline *pipeline,<br>
                                         unsigned long layers_difference,<br>
                                         CoglFramebuffer *framebuffer)<br>
 {<br>
-  CoglContext *ctx = framebuffer->context;<br>
-  int unit_index = _cogl_pipeline_layer_get_unit_index (layer);<br>
-  CoglTextureUnit *unit = _cogl_get_texture_unit (unit_index);<br>
-<br>
-  if (layers_difference & COGL_PIPELINE_LAYER_STATE_USER_MATRIX)<br>
-    {<br>
-      CoglPipelineLayerState state = COGL_PIPELINE_LAYER_STATE_USER_MATRIX;<br>
-      CoglPipelineLayer *authority =<br>
-        _cogl_pipeline_layer_get_authority (layer, state);<br>
-      CoglMatrixEntry *matrix_entry;<br>
-<br>
-      _cogl_matrix_stack_set (unit->matrix_stack,<br>
-                              &authority->big_state->matrix);<br>
-<br>
-      _cogl_set_active_texture_unit (unit_index);<br>
-<br>
-      matrix_entry = unit->matrix_stack->last_entry;<br>
-      _cogl_matrix_entry_flush_to_gl_builtins (ctx, matrix_entry,<br>
-                                               COGL_MATRIX_TEXTURE,<br>
-                                               framebuffer,<br>
-                                               FALSE /* enable flip */);<br>
-    }<br>
-<br>
   return TRUE;<br>
 }<br>
<br>
diff --git a/cogl/driver/gl/cogl-pipeline-vertend-glsl.c b/cogl/driver/gl/cogl-pipeline-vertend-glsl.c<br>
index 6387473..13759ab 100644<br>
--- a/cogl/driver/gl/cogl-pipeline-vertend-glsl.c<br>
+++ b/cogl/driver/gl/cogl-pipeline-vertend-glsl.c<br>
@@ -249,33 +249,23 @@ _cogl_pipeline_vertend_glsl_add_layer (CoglPipeline *pipeline,<br>
     return TRUE;<br>
<br>
   g_string_append_printf (shader_state->header,<br>
-                          "uniform mat4 cogl_texture_matrix%i;\n"<br>
                           "attribute vec4 cogl_tex_coord%i_in;\n"<br>
                           "varying vec4 _cogl_tex_coord%i;\n"<br>
                           "#define cogl_tex_coord%i_out _cogl_tex_coord%i\n",<br>
                           layer_index,<br>
                           layer_index,<br>
                           layer_index,<br>
-                          layer_index,<br>
                           layer_index);<br>
<br>
-  /* Transform the texture coordinates by the layer's user matrix.<br>
-   *<br>
-   * FIXME: this should avoid doing the transform if there is no user<br>
-   * matrix set. This might need a separate layer state flag for<br>
-   * whether there is a user matrix<br>
-   *<br>
-   * FIXME: we could be more clever here and try to detect if the<br>
-   * fragment program is going to use the texture coordinates and<br>
-   * avoid setting them if not<br>
+  /* Hook to transform the texture coordinates. By default this just<br>
+   * directly uses the texture coordinates.<br>
    */<br>
<br>
   g_string_append_printf (shader_state->header,<br>
                           "vec4\n"<br>
-                          "cogl_real_transform_layer%i (mat4 matrix, "<br>
-                          "vec4 tex_coord)\n"<br>
+                          "cogl_real_transform_layer%i (vec4 tex_coord)\n"<br>
                           "{\n"<br>
-                          "  return matrix * tex_coord;\n"<br>
+                          "  return tex_coord;\n"<br>
                           "}\n",<br>
                           layer_index);<br>
<br>
@@ -292,8 +282,8 @@ _cogl_pipeline_vertend_glsl_add_layer (CoglPipeline *pipeline,<br>
   snippet_data.return_type = "vec4";<br>
   snippet_data.return_variable = "cogl_tex_coord";<br>
   snippet_data.return_variable_is_argument = TRUE;<br>
-  snippet_data.arguments = "cogl_matrix, cogl_tex_coord";<br>
-  snippet_data.argument_declarations = "mat4 cogl_matrix, vec4 cogl_tex_coord";<br>
+  snippet_data.arguments = "cogl_tex_coord";<br>
+  snippet_data.argument_declarations = "vec4 cogl_tex_coord";<br>
   snippet_data.source_buf = shader_state->header;<br>
<br>
   _cogl_pipeline_snippet_generate_code (&snippet_data);<br>
@@ -304,10 +294,7 @@ _cogl_pipeline_vertend_glsl_add_layer (CoglPipeline *pipeline,<br>
<br>
   g_string_append_printf (shader_state->source,<br>
                           "  cogl_tex_coord%i_out = "<br>
-                          "cogl_transform_layer%i (cogl_texture_matrix%i,\n"<br>
-                          "                           "<br>
-                          "                        cogl_tex_coord%i_in);\n",<br>
-                          layer_index,<br>
+                          "cogl_transform_layer%i (cogl_tex_coord%i_in);\n",<br>
                           layer_index,<br>
                           layer_index,<br>
                           layer_index);<br>
diff --git a/doc/reference/cogl2/cogl2-sections.txt b/doc/reference/cogl2/cogl2-sections.txt<br>
index ba43264..004c0c0 100644<br>
--- a/doc/reference/cogl2/cogl2-sections.txt<br>
+++ b/doc/reference/cogl2/cogl2-sections.txt<br>
@@ -617,7 +617,6 @@ cogl_pipeline_set_layer_wrap_mode_t<br>
 cogl_pipeline_set_layer_wrap_mode_p<br>
 cogl_pipeline_set_layer_combine<br>
 cogl_pipeline_set_layer_combine_constant<br>
-cogl_pipeline_set_layer_matrix<br>
 cogl_pipeline_set_layer_point_sprite_coords_enabled<br>
 cogl_pipeline_get_layer_point_sprite_coords_enabled<br>
<br>
diff --git a/tests/conform/Makefile.am b/tests/conform/Makefile.am<br>
index b6430e2..3645f14 100644<br>
--- a/tests/conform/Makefile.am<br>
+++ b/tests/conform/Makefile.am<br>
@@ -35,7 +35,6 @@ test_sources = \<br>
        test-backface-culling.c \<br>
        test-just-vertex-shader.c \<br>
        test-path.c \<br>
-       test-pipeline-user-matrix.c \<br>
        test-pipeline-uniforms.c \<br>
        test-pixel-buffer.c \<br>
        test-premult.c \<br>
diff --git a/tests/conform/test-conform-main.c b/tests/conform/test-conform-main.c<br>
index b510543..5b89870 100644<br>
--- a/tests/conform/test-conform-main.c<br>
+++ b/tests/conform/test-conform-main.c<br>
@@ -52,7 +52,6 @@ main (int argc, char **argv)<br>
   UNPORTED_TEST (test_object);<br>
   UNPORTED_TEST (test_fixed);<br>
   UNPORTED_TEST (test_materials);<br>
-  ADD_TEST (test_pipeline_user_matrix, 0, 0);<br>
   ADD_TEST (test_blend_strings, 0, 0);<br>
   ADD_TEST (test_premult, 0, 0);<br>
   UNPORTED_TEST (test_readpixels);<br>
diff --git a/tests/conform/test-pipeline-user-matrix.c b/tests/conform/test-pipeline-user-matrix.c<br>
deleted file mode 100644<br>
index 9a7beea..0000000<br>
--- a/tests/conform/test-pipeline-user-matrix.c<br>
+++ /dev/null<br>
@@ -1,141 +0,0 @@<br>
-#include <cogl/cogl.h><br>
-<br>
-#include <string.h><br>
-<br>
-#include "test-utils.h"<br>
-<br>
-typedef struct _TestState<br>
-{<br>
-  int width;<br>
-  int height;<br>
-} TestState;<br>
-<br>
-static void<br>
-validate_result (TestState *state)<br>
-{<br>
-  uint32_t *pixels, *p;<br>
-  char *screen_pixel;<br>
-  const char *intended_pixel = "#ffffff";<br>
-<br>
-  /* The textures are setup so that when added together with the<br>
-     correct matrices then all of the pixels should be white. We can<br>
-     verify this by reading back the entire stage */<br>
-  pixels = g_malloc (state->width * state->height * 4);<br>
-<br>
-  cogl_framebuffer_read_pixels (test_fb,<br>
-                                0, 0, state->width, state->height,<br>
-                                COGL_PIXEL_FORMAT_RGBA_8888_PRE,<br>
-                                (uint8_t *)pixels);<br>
-<br>
-  for (p = pixels; p < pixels + state->width * state->height; p++)<br>
-    {<br>
-      screen_pixel = g_strdup_printf ("#%06x", GUINT32_FROM_BE (*p) >> 8);<br>
-      g_assert_cmpstr (screen_pixel, ==, intended_pixel);<br>
-      g_free (screen_pixel);<br>
-    }<br>
-}<br>
-<br>
-static void<br>
-paint (TestState *state)<br>
-{<br>
-  /* This texture is painted mirrored around the x-axis */<br>
-  uint8_t data0[] = {<br>
-    0xff, 0x00, 0x00, /* red -> becomes bottom left */<br>
-    0x00, 0xff, 0x00, /* green -> becomes bottom right */<br>
-    0x00, 0x00, 0xff, /* blue -> becomes top left */<br>
-    0xff, 0x00, 0xff  /* magenta -> becomes top right */<br>
-  };<br>
-  /* This texture is painted mirrored about the y-axis */<br>
-  uint8_t data1[] = {<br>
-    0x00, 0xff, 0x00, /* green -> becomes top right */<br>
-    0xff, 0xff, 0x00, /* yellow -> becomes top left */<br>
-    0xff, 0x00, 0xff, /* magenta -> becomes bottom right */<br>
-    0x00, 0xff, 0xff  /* cyan -> becomes bottom left */<br>
-  };<br>
-  CoglTexture *tex0, *tex1;<br>
-  CoglPipeline *pipeline;<br>
-  CoglMatrix matrix;<br>
-  CoglError *error = NULL;<br>
-<br>
-  cogl_framebuffer_orthographic (test_fb,<br>
-                                 0, 0,<br>
-                                 state->width,<br>
-                                 state->height,<br>
-                                 -1,<br>
-                                 100);<br>
-<br>
-  cogl_framebuffer_clear4f (test_fb, COGL_BUFFER_BIT_COLOR, 0, 0, 0, 1);<br>
-<br>
-  cogl_matrix_init_identity (&matrix);<br>
-  cogl_framebuffer_set_modelview_matrix (test_fb, &matrix);<br>
-<br>
-  tex0 = cogl_texture_new_from_data (2, 2,<br>
-                                     COGL_TEXTURE_NO_ATLAS,<br>
-                                     COGL_PIXEL_FORMAT_RGB_888,<br>
-                                     COGL_PIXEL_FORMAT_ANY,<br>
-                                     6,<br>
-                                     data0);<br>
-  tex1 = cogl_texture_new_from_data (2, 2,<br>
-                                     COGL_TEXTURE_NO_ATLAS,<br>
-                                     COGL_PIXEL_FORMAT_RGB_888,<br>
-                                     COGL_PIXEL_FORMAT_ANY,<br>
-                                     6,<br>
-                                     data1);<br>
-<br>
-  pipeline = cogl_pipeline_new (test_ctx);<br>
-<br>
-  /* Set the two textures as layers */<br>
-  cogl_pipeline_set_layer_texture (pipeline, 0, tex0);<br>
-  cogl_pipeline_set_layer_filters (pipeline, 0,<br>
-                                   COGL_PIPELINE_FILTER_NEAREST,<br>
-                                   COGL_PIPELINE_FILTER_NEAREST);<br>
-  cogl_pipeline_set_layer_texture (pipeline, 1, tex1);<br>
-  cogl_pipeline_set_layer_filters (pipeline, 1,<br>
-                                   COGL_PIPELINE_FILTER_NEAREST,<br>
-                                   COGL_PIPELINE_FILTER_NEAREST);<br>
-<br>
-  /* Set a combine mode so that the two textures get added together */<br>
-  if (!cogl_pipeline_set_layer_combine (pipeline, 1,<br>
-                                       "RGBA=ADD(PREVIOUS, TEXTURE)",<br>
-                                       &error))<br>
-    {<br>
-      g_warning ("Error setting blend string: %s", error->message);<br>
-      g_assert_not_reached ();<br>
-    }<br>
-<br>
-  /* Set a matrix on the first layer so that it will mirror about the y-axis */<br>
-  cogl_matrix_init_identity (&matrix);<br>
-  cogl_matrix_translate (&matrix, 0.0f, 1.0f, 0.0f);<br>
-  cogl_matrix_scale (&matrix, 1.0f, -1.0f, 1.0f);<br>
-  cogl_pipeline_set_layer_matrix (pipeline, 0, &matrix);<br>
-<br>
-  /* Set a matrix on the second layer so that it will mirror about the x-axis */<br>
-  cogl_matrix_init_identity (&matrix);<br>
-  cogl_matrix_translate (&matrix, 1.0f, 0.0f, 0.0f);<br>
-  cogl_matrix_scale (&matrix, -1.0f, 1.0f, 1.0f);<br>
-  cogl_pipeline_set_layer_matrix (pipeline, 1, &matrix);<br>
-<br>
-  cogl_framebuffer_draw_rectangle (test_fb,<br>
-                                   pipeline,<br>
-                                   0, 0,<br>
-                                   state->width, state->height);<br>
-<br>
-  cogl_object_unref (tex1);<br>
-  cogl_object_unref (tex0);<br>
-  cogl_object_unref (pipeline);<br>
-}<br>
-<br>
-void<br>
-test_pipeline_user_matrix (void)<br>
-{<br>
-  TestState state;<br>
-<br>
-  state.width = cogl_framebuffer_get_width (test_fb);<br>
-  state.height = cogl_framebuffer_get_height (test_fb);<br>
-<br>
-  paint (&state);<br>
-  validate_result (&state);<br>
-<br>
-  if (cogl_test_verbose ())<br>
-    g_print ("OK\n");<br>
-}<br>
diff --git a/tests/conform/test-snippets.c b/tests/conform/test-snippets.c<br>
index 51bd090..eeb1cdb 100644<br>
--- a/tests/conform/test-snippets.c<br>
+++ b/tests/conform/test-snippets.c<br>
@@ -430,15 +430,10 @@ test_modify_vertex_layer (TestState *state)<br>
 {<br>
   CoglPipeline *pipeline;<br>
   CoglSnippet *snippet;<br>
-  CoglMatrix matrix;<br>
<br>
   /* Test modifying the vertex layer code */<br>
   pipeline = create_texture_pipeline (state);<br>
<br>
-  cogl_matrix_init_identity (&matrix);<br>
-  cogl_matrix_translate (&matrix, 0.0f, 1.0f, 0.0f);<br>
-  cogl_pipeline_set_layer_matrix (pipeline, 0, &matrix);<br>
-<br>
   snippet = cogl_snippet_new (COGL_SNIPPET_HOOK_TEXTURE_COORD_TRANSFORM,<br>
                               NULL,<br>
                               "cogl_tex_coord.x = 1.0;");<br>
@@ -448,7 +443,7 @@ test_modify_vertex_layer (TestState *state)<br>
   cogl_framebuffer_draw_textured_rectangle (test_fb,<br>
                                             pipeline,<br>
                                             130, 0, 140, 10,<br>
-                                            0, 0, 0, 0);<br>
+                                            0, 1, 0, 1);<br>
   cogl_object_unref (pipeline);<br>
<br>
   test_utils_check_pixel (test_fb, 135, 5, 0xffff00ff);<br>
@@ -459,26 +454,21 @@ test_replace_vertex_layer (TestState *state)<br>
 {<br>
   CoglPipeline *pipeline;<br>
   CoglSnippet *snippet;<br>
-  CoglMatrix matrix;<br>
<br>
   /* Test replacing the vertex layer code */<br>
   pipeline = create_texture_pipeline (state);<br>
<br>
-  cogl_matrix_init_identity (&matrix);<br>
-  cogl_matrix_translate (&matrix, 0.0f, 1.0f, 0.0f);<br>
-  cogl_pipeline_set_layer_matrix (pipeline, 0, &matrix);<br>
-<br>
   snippet = cogl_snippet_new (COGL_SNIPPET_HOOK_TEXTURE_COORD_TRANSFORM,<br>
                               NULL,<br>
                               NULL);<br>
-  cogl_snippet_set_replace (snippet, "cogl_tex_coord.x = 1.0;\n");<br>
+  cogl_snippet_set_replace (snippet, "cogl_tex_coord.xy = vec2 (1.0, 0.0);\n");<br>
   cogl_pipeline_add_layer_snippet (pipeline, 0, snippet);<br>
   cogl_object_unref (snippet);<br>
<br>
   cogl_framebuffer_draw_textured_rectangle (test_fb,<br>
                                             pipeline,<br>
                                             140, 0, 150, 10,<br>
-                                            0, 0, 0, 0);<br>
+                                            1, 1, 1, 1);<br>
   cogl_object_unref (pipeline);<br>
<br>
   test_utils_check_pixel (test_fb, 145, 5, 0x00ff00ff);<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.11.3.g3c3efa5<br>
<br>
_______________________________________________<br>
Cogl mailing list<br>
<a href="mailto:Cogl@lists.freedesktop.org">Cogl@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/cogl" target="_blank">http://lists.freedesktop.org/mailman/listinfo/cogl</a><br>
</font></span></blockquote></div><br></div>