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)
This commit is contained in:
Robert Bragg 2012-09-21 16:59:25 +01:00
parent b1ecfbf720
commit 6712aaef45

View File

@ -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.