[cogl/wip/cogl-1.14: 42/50] pipeline: remove dubious optimization



commit fed5c6e04fe82aa4038c0cd941030b8807e384bf
Author: Robert Bragg <robert linux intel com>
Date:   Fri Sep 21 16:59:25 2012 +0100

    pipeline: remove dubious optimization
    
    This removes an optimization that I added at some point, which I'm
    pretty certain I only added on a hunch. Reading the description I'm not
    really convinced it makes sense to do this given that the fixed vertend
    and fragend are currently listed before the glsl vertend and fragend in
    the order that we look for a suitable backend. This means unless the
    pipeline depends on glsl (e.g. due to an associated snippet) we would
    reselect the fixed backend anyway, and if it really did depend on glsl
    then we'd notice when we come to flush and switch backends there any way.
    
    Reviewed-by: Neil Roberts <neil linux intel com>
    
    (cherry picked from commit 071698d2c017af33e41b838429d514f5df5e02a1)

 cogl/cogl-pipeline.c |   18 ------------------
 1 files changed, 0 insertions(+), 18 deletions(-)
---
diff --git a/cogl/cogl-pipeline.c b/cogl/cogl-pipeline.c
index f071261..1a8036f 100644
--- a/cogl/cogl-pipeline.c
+++ b/cogl/cogl-pipeline.c
@@ -1185,24 +1185,6 @@ _cogl_pipeline_pre_change_notify (CoglPipeline     *pipeline,
         }
     }
 
-  /* The fixed function backend has no private state and can't
-   * do anything special to handle small pipeline changes so we may as
-   * well try to find a better backend whenever the pipeline changes.
-   *
-   * The programmable backends may be able to cache a lot of the code
-   * they generate and only need to update a small section of that
-   * code in response to a pipeline change therefore we don't want to
-   * try searching for another backend when the pipeline changes.
-   */
-#ifdef COGL_PIPELINE_FRAGEND_FIXED
-  if (pipeline->fragend == COGL_PIPELINE_FRAGEND_FIXED)
-    _cogl_pipeline_set_fragend (pipeline, COGL_PIPELINE_FRAGEND_UNDEFINED);
-#endif
-#ifdef COGL_PIPELINE_VERTEND_FIXED
-  if (pipeline->vertend == COGL_PIPELINE_VERTEND_FIXED)
-    _cogl_pipeline_set_vertend (pipeline, COGL_PIPELINE_VERTEND_UNDEFINED);
-#endif
-
   /* XXX:
    * To simplify things for the vertex, fragment and program backends
    * we are careful about how we report STATE_LAYERS changes.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]