mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 18:11:05 -05:00
cogl-pipeline: Fix the enum names for the constant combine source
When determining whether to hash the combine constant Cogl checks the arguments to the combine funcs to determine whether the combine constant is used. However is was using the GLenums GL_CONSTANT_COLOR and GL_CONSTANT_ALPHA but these are not valid values for the CoglPipelineCombineSource enum so presumably the constant would never get hashed. This patch makes it use Cogl's enum of COGL_PIPELINE_COMBINE_SOURCE_CONSTANT instead. http://bugzilla.clutter-project.org/show_bug.cgi?id=2516
This commit is contained in:
parent
4f08e3cf6e
commit
d33f66303f
@ -5987,11 +5987,11 @@ _cogl_pipeline_layer_hash_combine_constant_state (CoglPipelineLayer *authority,
|
|||||||
n_args = _cogl_get_n_args_for_combine_func (b->texture_combine_rgb_func);
|
n_args = _cogl_get_n_args_for_combine_func (b->texture_combine_rgb_func);
|
||||||
for (i = 0; i < n_args; i++)
|
for (i = 0; i < n_args; i++)
|
||||||
{
|
{
|
||||||
if (b->texture_combine_rgb_src[i] == GL_CONSTANT_COLOR ||
|
if (b->texture_combine_rgb_src[i] ==
|
||||||
b->texture_combine_rgb_src[i] == GL_CONSTANT_ALPHA)
|
COGL_PIPELINE_COMBINE_SOURCE_CONSTANT)
|
||||||
{
|
{
|
||||||
/* XXX: should we be careful to only hash the alpha
|
/* XXX: should we be careful to only hash the alpha
|
||||||
* component in the GL_CONSTANT_ALPHA case? */
|
* component in the COGL_PIPELINE_COMBINE_OP_SRC_ALPHA case? */
|
||||||
need_hash = TRUE;
|
need_hash = TRUE;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
@ -6000,11 +6000,11 @@ _cogl_pipeline_layer_hash_combine_constant_state (CoglPipelineLayer *authority,
|
|||||||
n_args = _cogl_get_n_args_for_combine_func (b->texture_combine_alpha_func);
|
n_args = _cogl_get_n_args_for_combine_func (b->texture_combine_alpha_func);
|
||||||
for (i = 0; i < n_args; i++)
|
for (i = 0; i < n_args; i++)
|
||||||
{
|
{
|
||||||
if (b->texture_combine_alpha_src[i] == GL_CONSTANT_COLOR ||
|
if (b->texture_combine_alpha_src[i] ==
|
||||||
b->texture_combine_alpha_src[i] == GL_CONSTANT_ALPHA)
|
COGL_PIPELINE_COMBINE_SOURCE_CONSTANT)
|
||||||
{
|
{
|
||||||
/* XXX: should we be careful to only hash the alpha
|
/* XXX: should we be careful to only hash the alpha
|
||||||
* component in the GL_CONSTANT_ALPHA case? */
|
* component in the COGL_PIPELINE_COMBINE_OP_SRC_ALPHA case? */
|
||||||
need_hash = TRUE;
|
need_hash = TRUE;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user