mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 10:00:45 -05:00
cogl-primitives: Don't warn if using sliced textures without multi-tex
cogl_rectangle has some validation code to check whether the first layer has a sliced texture. If so it will abandon the rest of the layers and print a warning. However it was even doing this pruning and displaying the warning if there is only one layer. This patch just makes it check whether the pipeline actually has more than one layer before pruning or displaying the warning but it will still fallback to the multiple quads path. Reviewed-by: Robert Bragg <robert@linux.intel.com>
This commit is contained in:
parent
dbff3a357e
commit
1984fea4b1
@ -636,21 +636,25 @@ _cogl_rectangles_validate_layer_cb (CoglPipeline *pipeline,
|
||||
{
|
||||
if (state->i == 0)
|
||||
{
|
||||
static gboolean warning_seen = FALSE;
|
||||
if (cogl_pipeline_get_n_layers (pipeline) > 1)
|
||||
{
|
||||
static gboolean warning_seen = FALSE;
|
||||
|
||||
if (!state->override_source)
|
||||
state->override_source = cogl_pipeline_copy (pipeline);
|
||||
_cogl_pipeline_prune_to_n_layers (state->override_source, 1);
|
||||
|
||||
if (!warning_seen)
|
||||
g_warning ("Skipping layers 1..n of your pipeline since "
|
||||
"the first layer is sliced. We don't currently "
|
||||
"support any multi-texturing with sliced "
|
||||
"textures but assume layer 0 is the most "
|
||||
"important to keep");
|
||||
warning_seen = TRUE;
|
||||
}
|
||||
|
||||
if (!state->override_source)
|
||||
state->override_source = cogl_pipeline_copy (pipeline);
|
||||
_cogl_pipeline_prune_to_n_layers (state->override_source, 1);
|
||||
state->all_use_sliced_quad_fallback = TRUE;
|
||||
|
||||
if (!warning_seen)
|
||||
g_warning ("Skipping layers 1..n of your pipeline since "
|
||||
"the first layer is sliced. We don't currently "
|
||||
"support any multi-texturing with sliced "
|
||||
"textures but assume layer 0 is the most "
|
||||
"important to keep");
|
||||
warning_seen = TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user