mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 12:02:04 +00:00
vertend-glsl: Fix flushing the point size with the GL driver
When using the GLSL vertend on GL, the point size was being flushed in _cogl_pipeline_vertend_glsl_start. However, this function bails out early if the pipeline already has a usable program so it would not hit the code to flush the point size in that case. This patch moves the code to _cogl_pipeline_vertend_glsl_end so that it will always be flushed if it is different. That is the same place that is flushed for the fixed vertend. Reviewed-by: Robert Bragg <robert@linux.intel.com>
This commit is contained in:
parent
1d59fccf10
commit
c0d7839c55
@ -280,18 +280,6 @@ _cogl_pipeline_vertend_glsl_start (CoglPipeline *pipeline,
|
|||||||
to copy it from the custom uniform in the vertex shader */
|
to copy it from the custom uniform in the vertex shader */
|
||||||
g_string_append (shader_state->source,
|
g_string_append (shader_state->source,
|
||||||
" cogl_point_size_out = cogl_point_size_in;\n");
|
" cogl_point_size_out = cogl_point_size_in;\n");
|
||||||
/* On regular OpenGL we'll just flush the point size builtin */
|
|
||||||
else if (pipelines_difference & COGL_PIPELINE_STATE_POINT_SIZE)
|
|
||||||
{
|
|
||||||
CoglPipeline *authority =
|
|
||||||
_cogl_pipeline_get_authority (pipeline, COGL_PIPELINE_STATE_POINT_SIZE);
|
|
||||||
|
|
||||||
if (ctx->point_size_cache != authority->big_state->point_size)
|
|
||||||
{
|
|
||||||
GE( ctx, glPointSize (authority->big_state->point_size) );
|
|
||||||
ctx->point_size_cache = authority->big_state->point_size;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -509,6 +497,19 @@ _cogl_pipeline_vertend_glsl_end (CoglPipeline *pipeline,
|
|||||||
shader_state->gl_shader = shader;
|
shader_state->gl_shader = shader;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ctx->driver == COGL_DRIVER_GL &&
|
||||||
|
(pipelines_difference & COGL_PIPELINE_STATE_POINT_SIZE))
|
||||||
|
{
|
||||||
|
CoglPipeline *authority =
|
||||||
|
_cogl_pipeline_get_authority (pipeline, COGL_PIPELINE_STATE_POINT_SIZE);
|
||||||
|
|
||||||
|
if (ctx->point_size_cache != authority->big_state->point_size)
|
||||||
|
{
|
||||||
|
GE( ctx, glPointSize (authority->big_state->point_size) );
|
||||||
|
ctx->point_size_cache = authority->big_state->point_size;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user