mirror of
https://github.com/brl/mutter.git
synced 2024-11-13 01:36:10 -05:00
cogl-material: Consider the shader when deciding if materials equate
_cogl_material_equal was ignoring the user shader state so rectangles with different shaders would get batched together. http://bugzilla.clutter-project.org/show_bug.cgi?id=2220
This commit is contained in:
parent
f2d0f0ab5f
commit
0e80747a68
@ -3015,6 +3015,14 @@ _cogl_material_point_size_equal (CoglMaterial *authority0,
|
||||
return authority0->big_state->point_size == authority1->big_state->point_size;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
_cogl_material_user_shader_equal (CoglMaterial *authority0,
|
||||
CoglMaterial *authority1)
|
||||
{
|
||||
return (authority0->big_state->user_program ==
|
||||
authority1->big_state->user_program);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
_cogl_material_layers_equal (CoglMaterial *authority0,
|
||||
CoglMaterial *authority1)
|
||||
@ -3244,6 +3252,12 @@ _cogl_material_equal (CoglMaterial *material0,
|
||||
_cogl_material_point_size_equal))
|
||||
return FALSE;
|
||||
|
||||
if (!simple_property_equal (material0, material1,
|
||||
materials_difference,
|
||||
COGL_MATERIAL_STATE_USER_SHADER,
|
||||
_cogl_material_user_shader_equal))
|
||||
return FALSE;
|
||||
|
||||
if (!simple_property_equal (material0, material1,
|
||||
materials_difference,
|
||||
COGL_MATERIAL_STATE_LAYERS,
|
||||
|
Loading…
Reference in New Issue
Block a user