[cogl] Remove the point size cache on the context
- From: Neil Roberts <nroberts src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl] Remove the point size cache on the context
- Date: Wed, 7 Mar 2012 15:15:25 +0000 (UTC)
commit b8df3561f4602a99b33243f2db6ff24c9629d8b9
Author: Neil Roberts <neil linux intel com>
Date: Wed Mar 7 11:32:13 2012 +0000
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>
cogl/cogl-context-private.h | 2 --
cogl/cogl-context.c | 2 --
cogl/cogl-pipeline-vertend-fixed.c | 6 +-----
cogl/cogl-pipeline-vertend-glsl.c | 6 +-----
4 files changed, 2 insertions(+), 14 deletions(-)
---
diff --git a/cogl/cogl-context-private.h b/cogl/cogl-context-private.h
index 522f5d4..6d92faf 100644
--- a/cogl/cogl-context-private.h
+++ b/cogl/cogl-context-private.h
@@ -158,8 +158,6 @@ struct _CoglContext
gboolean legacy_depth_test_enabled;
- float point_size_cache;
-
CoglBuffer *current_buffer[COGL_BUFFER_BIND_TARGET_COUNT];
/* Framebuffers */
diff --git a/cogl/cogl-context.c b/cogl/cogl-context.c
index fb27160..b3c404e 100644
--- a/cogl/cogl-context.c
+++ b/cogl/cogl-context.c
@@ -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 ();
diff --git a/cogl/cogl-pipeline-vertend-fixed.c b/cogl/cogl-pipeline-vertend-fixed.c
index 37592dd..2df593b 100644
--- a/cogl/cogl-pipeline-vertend-fixed.c
+++ b/cogl/cogl-pipeline-vertend-fixed.c
@@ -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;
- }
+ GE( ctx, glPointSize (authority->big_state->point_size) );
}
return TRUE;
diff --git a/cogl/cogl-pipeline-vertend-glsl.c b/cogl/cogl-pipeline-vertend-glsl.c
index 7ad5fc7..6ecec90 100644
--- a/cogl/cogl-pipeline-vertend-glsl.c
+++ b/cogl/cogl-pipeline-vertend-glsl.c
@@ -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;
- }
+ GE( ctx, glPointSize (authority->big_state->point_size) );
}
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]