[cogl/wip/msaa: 1/21] pipeline: Remove unsused get_max_texture_image_units()



commit 57a97958acf86d453022f5c5ac87eae2839d0b84
Author: Damien Lespiau <damien lespiau intel com>
Date:   Thu Aug 25 14:18:01 2011 +0100

    pipeline: Remove unsused get_max_texture_image_units()
    
    This function was not used in the opengl pipeline, probably because of
    the more precise get_max_activable_texture_units().
    
    Remove it then.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=657347
    
    Reviewed-by: Robert Bragg <robert linux intel com>

 cogl/cogl-context.c          |    1 -
 cogl/cogl-pipeline-opengl.c  |   20 --------------------
 cogl/cogl-pipeline-private.h |    5 -----
 3 files changed, 0 insertions(+), 26 deletions(-)
---
diff --git a/cogl/cogl-context.c b/cogl/cogl-context.c
index aa8bae8..71e912d 100644
--- a/cogl/cogl-context.c
+++ b/cogl/cogl-context.c
@@ -269,7 +269,6 @@ cogl_context_new (CoglDisplay *display,
   _cogl_bitmask_init (&context->arrays_to_change);
 
   context->max_texture_units = -1;
-  context->max_texture_image_units = -1;
   context->max_activateable_texture_units = -1;
 
   context->current_program = COGL_INVALID_HANDLE;
diff --git a/cogl/cogl-pipeline-opengl.c b/cogl/cogl-pipeline-opengl.c
index 874b82e..28693e6 100644
--- a/cogl/cogl-pipeline-opengl.c
+++ b/cogl/cogl-pipeline-opengl.c
@@ -387,26 +387,6 @@ _cogl_use_vertex_program (GLuint gl_program, CoglPipelineProgramType type)
   ctx->current_vertex_program_type = type;
 }
 
-#if defined (COGL_PIPELINE_FRAGEND_GLSL) || \
-    defined (COGL_PIPELINE_FRAGEND_ARBFP)
-int
-_cogl_get_max_texture_image_units (void)
-{
-  _COGL_GET_CONTEXT (ctx, 0);
-
-  /* This function is called quite often so we cache the value to
-     avoid too many GL calls */
-  if (G_UNLIKELY (ctx->max_texture_image_units == -1))
-    {
-      ctx->max_texture_image_units = 1;
-      GE (ctx, glGetIntegerv (GL_MAX_TEXTURE_IMAGE_UNITS,
-                              &ctx->max_texture_image_units));
-    }
-
-  return ctx->max_texture_image_units;
-}
-#endif
-
 #if defined(HAVE_COGL_GLES2) || defined(HAVE_COGL_GL)
 
 static gboolean
diff --git a/cogl/cogl-pipeline-private.h b/cogl/cogl-pipeline-private.h
index 41f73ab..6e8fc35 100644
--- a/cogl/cogl-pipeline-private.h
+++ b/cogl/cogl-pipeline-private.h
@@ -916,11 +916,6 @@ typedef struct _CoglPipelineFlushOptions
   CoglHandle                    layer0_override_texture;
 } CoglPipelineFlushOptions;
 
-
-int
-_cogl_get_max_texture_image_units (void);
-
-
 void
 _cogl_use_fragment_program (GLuint gl_program, CoglPipelineProgramType type);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]