Remove the point size cache on the context
I don't think there's really any point in this cache because the pipeline code completely owns the point size state. Pipelines are already compared for whether their point size state is different before setting it so it shouldn't result in any extra calls to glPointSize apart from maybe when the first pipeline is initially flushed. Reviewed-by: Robert Bragg <robert@linux.intel.com>
This commit is contained in:
parent
c0d7839c55
commit
b8df3561f4
@ -158,8 +158,6 @@ struct _CoglContext
|
||||
|
||||
gboolean legacy_depth_test_enabled;
|
||||
|
||||
float point_size_cache;
|
||||
|
||||
CoglBuffer *current_buffer[COGL_BUFFER_BIND_TARGET_COUNT];
|
||||
|
||||
/* Framebuffers */
|
||||
|
@ -326,8 +326,6 @@ cogl_context_new (CoglDisplay *display,
|
||||
context->depth_range_near_cache = 0;
|
||||
context->depth_range_far_cache = 1;
|
||||
|
||||
context->point_size_cache = 1.0f;
|
||||
|
||||
context->legacy_depth_test_enabled = FALSE;
|
||||
|
||||
context->pipeline_cache = cogl_pipeline_cache_new ();
|
||||
|
@ -117,11 +117,7 @@ _cogl_pipeline_vertend_fixed_end (CoglPipeline *pipeline,
|
||||
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;
|
||||
|
@ -503,11 +503,7 @@ _cogl_pipeline_vertend_glsl_end (CoglPipeline *pipeline,
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user