pipeline-arbfp: Check for fog on the pipeline not the legacy state
The ARBfp backend can't handle fog so it tries to check for when it's enabled and bails out. However it was checking using the global legacy state value on the CoglContext but this doesn't necessarily reflect the state that will actually be used by the pipeline because Cogl may have internally pushed a different pipeline. This patch adds an internal _cogl_pipeline_get_fog_enabled which the ARBfp backend now uses. Reviewed-by: Robert Bragg <robert@linux.intel.com>
This commit is contained in:
parent
2059ae3ac8
commit
f6ec6e2d0e
@ -165,7 +165,7 @@ _cogl_pipeline_fragend_arbfp_start (CoglPipeline *pipeline,
|
||||
return FALSE;
|
||||
|
||||
/* TODO: support fog */
|
||||
if (ctx->legacy_fog_state.enabled)
|
||||
if (_cogl_pipeline_get_fog_enabled (pipeline))
|
||||
return FALSE;
|
||||
|
||||
user_program = cogl_pipeline_get_user_program (pipeline);
|
||||
|
@ -1184,6 +1184,9 @@ void
|
||||
_cogl_pipeline_set_blend_enabled (CoglPipeline *pipeline,
|
||||
CoglPipelineBlendEnable enable);
|
||||
|
||||
gboolean
|
||||
_cogl_pipeline_get_fog_enabled (CoglPipeline *pipeline);
|
||||
|
||||
void
|
||||
_cogl_pipeline_set_static_breadcrumb (CoglPipeline *pipeline,
|
||||
const char *breadcrumb);
|
||||
|
@ -2855,6 +2855,18 @@ _cogl_pipeline_update_authority (CoglPipeline *pipeline,
|
||||
}
|
||||
}
|
||||
|
||||
gboolean
|
||||
_cogl_pipeline_get_fog_enabled (CoglPipeline *pipeline)
|
||||
{
|
||||
CoglPipeline *authority;
|
||||
|
||||
g_return_val_if_fail (cogl_is_pipeline (pipeline), FALSE);
|
||||
|
||||
authority =
|
||||
_cogl_pipeline_get_authority (pipeline, COGL_PIPELINE_STATE_FOG);
|
||||
return authority->big_state->fog_state.enabled;
|
||||
}
|
||||
|
||||
unsigned long
|
||||
_cogl_pipeline_get_age (CoglPipeline *pipeline)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user