pipeline: Assume blend enabled when there are snippets

Whenever snippets are enabled we can't determine whether the final
color will be fully opaque so we just have to assume blending should
be enabled.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
This commit is contained in:
Neil Roberts
2011-11-25 17:59:52 +00:00
committed by Robert Bragg
parent df0f9a862f
commit 5be5a03343
4 changed files with 43 additions and 5 deletions

View File

@ -761,6 +761,18 @@ _cogl_pipeline_needs_blending_enabled (CoglPipeline *pipeline,
return TRUE;
}
if (changes & COGL_PIPELINE_STATE_FRAGMENT_SNIPPETS)
{
if (!_cogl_pipeline_has_non_layer_fragment_snippets (pipeline))
return TRUE;
}
if (changes & COGL_PIPELINE_STATE_VERTEX_SNIPPETS)
{
if (!_cogl_pipeline_has_non_layer_vertex_snippets (pipeline))
return TRUE;
}
/* XXX: we should only need to look at these if lighting is enabled
*/
if (changes & COGL_PIPELINE_STATE_LIGHTING)