mesa: remove #if _HAVE_FULL_GL checks
authorBrian Paul <brianp@vmware.com>
Sun, 23 Sep 2012 00:45:33 +0000 (18:45 -0600)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 16 Oct 2012 21:57:20 +0000 (14:57 -0700)
This is basically more of the "remove FEATURE_x" clean-up.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
18 files changed:
src/mesa/main/blend.c
src/mesa/main/clear.c
src/mesa/main/context.c
src/mesa/main/debug.h
src/mesa/main/depth.h
src/mesa/main/drawpix.c
src/mesa/main/extensions.h
src/mesa/main/feedback.c
src/mesa/main/fog.h
src/mesa/main/hint.h
src/mesa/main/light.h
src/mesa/main/matrix.c
src/mesa/main/points.c
src/mesa/main/polygon.c
src/mesa/main/stencil.c
src/mesa/main/texcompress.h
src/mesa/main/teximage.c
src/mesa/main/varray.h

index 5d553118c1b8b4b4f5728a68917134a2b8793f08..5cd3ce24425ce3c0a125690069f7b9bdd21f3f72 100644 (file)
@@ -256,9 +256,6 @@ _mesa_BlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfactorRGB,
 }
 
 
-#if _HAVE_FULL_GL
-
-
 /**
  * Set blend source/dest factors for one color buffer/target.
  */
@@ -520,10 +517,6 @@ _mesa_BlendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeA)
 }
 
 
-
-#endif /* _HAVE_FULL_GL */
-
-
 /**
  * Set the blending color.
  *
@@ -666,7 +659,7 @@ _mesa_LogicOp( GLenum opcode )
       ctx->Driver.LogicOpcode( ctx, opcode );
 }
 
-#if _HAVE_FULL_GL
+
 void GLAPIENTRY
 _mesa_IndexMask( GLuint mask )
 {
@@ -679,7 +672,6 @@ _mesa_IndexMask( GLuint mask )
    FLUSH_VERTICES(ctx, _NEW_COLOR);
    ctx->Color.IndexMask = mask;
 }
-#endif
 
 
 /**
index f07d5333b65783e14bbd1943a9daafab8ecb699a..83ffdf66ba43b5ed342107c6cf1f2687560d1eb3 100644 (file)
@@ -41,7 +41,6 @@
 
 
 
-#if _HAVE_FULL_GL
 void GLAPIENTRY
 _mesa_ClearIndex( GLfloat c )
 {
@@ -54,7 +53,6 @@ _mesa_ClearIndex( GLfloat c )
    FLUSH_VERTICES(ctx, _NEW_COLOR);
    ctx->Color.ClearIndex = (GLuint) c;
 }
-#endif
 
 
 /**
index 1975ae0fe6e7df0b229c650cffc068c072654cda..b00c64233c2d864a18d89e6de2d29e6430e44a7e 100644 (file)
 #include "vtxfmt.h"
 #include "program/program.h"
 #include "program/prog_print.h"
-#if _HAVE_FULL_GL
 #include "math/m_matrix.h"
-#endif
 #include "main/dispatch.h" /* for _gloffset_COUNT */
 
 #ifdef USE_SPARC_ASM
@@ -1160,7 +1158,6 @@ _mesa_destroy_context( struct gl_context *ctx )
 }
 
 
-#if _HAVE_FULL_GL
 /**
  * Copy attribute groups from one context to another.
  * 
@@ -1281,7 +1278,6 @@ _mesa_copy_context( const struct gl_context *src, struct gl_context *dst,
    dst->NewState = _NEW_ALL;
    dst->NewDriverState = ~0;
 }
-#endif
 
 
 /**
@@ -1458,8 +1454,6 @@ _mesa_make_current( struct gl_context *newCtx,
 
 #if 1
          /* We want to get rid of these lines: */
-
-#if _HAVE_FULL_GL
          if (!drawBuffer->Initialized) {
             initialize_framebuffer_size(newCtx, drawBuffer);
          }
@@ -1468,8 +1462,6 @@ _mesa_make_current( struct gl_context *newCtx,
          }
 
         _mesa_resizebuffers(newCtx);
-#endif
-
 #else
          /* We want the drawBuffer and readBuffer to be initialized by
           * the driver.
index bc64a83bbac9a0b84a9e9a2cf912576642de06e9..6bc536591ac1cea6877d9ec865f0d7bca7f14e90 100644 (file)
 struct gl_context;
 struct gl_texture_image;
 
-#if _HAVE_FULL_GL
-
 extern void _mesa_print_tri_caps( const char *name, GLuint flags );
 extern void _mesa_print_enable_flags( const char *msg, GLuint flags );
 extern void _mesa_print_state( const char *msg, GLuint state );
 extern void _mesa_print_info( void );
 extern void _mesa_init_debug( struct gl_context *ctx );
 
-#else
-
-/** No-op */
-#define _mesa_print_state( m, s ) ((void)0)
-
-/** No-op */
-#define _mesa_print_info() ((void)0)
-
-/** No-op */
-#define _mesa_init_debug( c ) ((void)0)
-
-#endif
-
 extern void
 _mesa_write_renderbuffer_image(const struct gl_renderbuffer *rb);
 
index 2f428629f9a0e8ebd43e8df94c26a4b58d4ff7ab..fe6b33f367ebe6e77cfc5343c9218cd2f36fbd28 100644 (file)
@@ -38,8 +38,6 @@
 struct gl_context;
 
 
-#if _HAVE_FULL_GL
-
 extern void GLAPIENTRY
 _mesa_ClearDepth( GLclampd depth );
 
@@ -58,11 +56,4 @@ _mesa_DepthBoundsEXT( GLclampd zmin, GLclampd zmax );
 extern void 
 _mesa_init_depth( struct gl_context * ctx );
 
-#else
-
-/** No-op */
-#define _mesa_init_depth( c ) ((void)0)
-
-#endif
-
 #endif
index b5ab2cbeb7af32e75d87c93673385f877cd6718b..8836e0a0e9957c252e3652f8cf86684eaccc33df 100644 (file)
@@ -344,7 +344,6 @@ _mesa_Bitmap( GLsizei width, GLsizei height,
          ctx->Driver.Bitmap( ctx, x, y, width, height, &ctx->Unpack, bitmap );
       }
    }
-#if _HAVE_FULL_GL
    else if (ctx->RenderMode == GL_FEEDBACK) {
       FLUSH_CURRENT(ctx, 0);
       _mesa_feedback_token( ctx, (GLfloat) (GLint) GL_BITMAP_TOKEN );
@@ -357,7 +356,6 @@ _mesa_Bitmap( GLsizei width, GLsizei height,
       ASSERT(ctx->RenderMode == GL_SELECT);
       /* Do nothing.  See OpenGL Spec, Appendix B, Corollary 6. */
    }
-#endif
 
    /* update raster position */
    ctx->Current.RasterPos[0] += xmove;
index 712c6e94da377c36c2e649f99aa00fa07b1bb331..8acbd4b6844ffd73c997a445f985d8effe03e7a7 100644 (file)
@@ -41,8 +41,6 @@
 
 struct gl_context;
 
-#if _HAVE_FULL_GL
-
 extern void _mesa_enable_sw_extensions(struct gl_context *ctx);
 
 extern void _mesa_enable_1_3_extensions(struct gl_context *ctx);
@@ -71,21 +69,4 @@ _mesa_get_extension_count(struct gl_context *ctx);
 extern const GLubyte *
 _mesa_get_enabled_extension(struct gl_context *ctx, GLuint index);
 
-
-#else
-
-/** No-op */
-#define _mesa_extensions_dtr( ctx ) ((void)0)
-
-/** No-op */
-#define _mesa_extensions_ctr( ctx ) ((void)0)
-
-/** No-op */
-#define _mesa_extensions_get_string( ctx ) "GL_EXT_texture_object"
-
-/** No-op */
-#define _mesa_enable_extension( c, n ) ((void)0)
-
-#endif
-
 #endif
index 8a63acdf1c632b98159e6a24b06bae38aa9e9d66..f45b823b187ad9f885968772a5bc9828e4590d1e 100644 (file)
@@ -449,7 +449,6 @@ _mesa_RenderMode( GLenum mode )
         ctx->Select.Hits = 0;
         ctx->Select.NameStackDepth = 0;
         break;
-#if _HAVE_FULL_GL
       case GL_FEEDBACK:
         if (ctx->Feedback.Count > ctx->Feedback.BufferSize) {
            /* overflow */
@@ -460,7 +459,6 @@ _mesa_RenderMode( GLenum mode )
         }
         ctx->Feedback.Count = 0;
         break;
-#endif
       default:
         _mesa_error( ctx, GL_INVALID_ENUM, "glRenderMode" );
         return 0;
@@ -475,14 +473,12 @@ _mesa_RenderMode( GLenum mode )
            _mesa_error( ctx, GL_INVALID_OPERATION, "glRenderMode" );
         }
         break;
-#if _HAVE_FULL_GL
       case GL_FEEDBACK:
         if (ctx->Feedback.BufferSize==0) {
            /* haven't called glFeedbackBuffer yet */
            _mesa_error( ctx, GL_INVALID_OPERATION, "glRenderMode" );
         }
         break;
-#endif
       default:
         _mesa_error( ctx, GL_INVALID_ENUM, "glRenderMode" );
         return 0;
index 9191a4a54ccaac65dd911b417b10b5260e23d544..20a75e96b6173527d1329371f00ee4f4377e42b6 100644 (file)
@@ -43,8 +43,6 @@
 struct gl_context;
 
 
-#if _HAVE_FULL_GL
-
 extern void GLAPIENTRY
 _mesa_Fogf(GLenum pname, GLfloat param);
 
@@ -59,11 +57,4 @@ _mesa_Fogiv(GLenum pname, const GLint *params );
 
 extern void _mesa_init_fog( struct gl_context * ctx );
 
-#else
-
-/** No-op */
-#define _mesa_init_fog( c ) ((void)0)
-
-#endif
-
 #endif
index 6c62068743ad23c3e3438ec7a1a3d2ea7d4db528..ca9659d588681db92e62e43cb60899f25a15c140 100644 (file)
 
 struct gl_context;
 
-#if _HAVE_FULL_GL
-
 extern void GLAPIENTRY
 _mesa_Hint( GLenum target, GLenum mode );
 
 extern void 
 _mesa_init_hint( struct gl_context * ctx );
 
-#else
-
-/** No-op */
-#define _mesa_init_hint( c ) ((void) 0)
-
-#endif
-
 #endif
index c751d6d6bd4862ce69a242f44183efa88f651229..2e6a5003ece4acb018c3132b26280086aa7f46e9 100644 (file)
@@ -42,7 +42,6 @@ extern void GLAPIENTRY
 _mesa_ProvokingVertexEXT(GLenum mode);
 
 
-#if _HAVE_FULL_GL
 extern void GLAPIENTRY
 _mesa_ColorMaterial( GLenum face, GLenum mode );
 
@@ -108,14 +107,4 @@ extern void _mesa_free_lighting_data( struct gl_context *ctx );
 
 extern void _mesa_allow_light_in_model( struct gl_context *ctx, GLboolean flag );
 
-#else
-#define _mesa_update_color_material( c, r ) ((void)0)
-#define _mesa_material_bitmask( c, f, p, l, s ) 0
-#define _mesa_init_lighting( c ) ((void)0)
-#define _mesa_free_lighting_data( c ) ((void)0)
-#define _mesa_update_lighting( c ) ((void)0)
-#define _mesa_update_tnl_spaces( c, n ) ((void)0)
-#define GET_SHINE_TAB_ENTRY( table, dp, result )  ((result)=0)
-#endif
-
 #endif
index 4a329c664da2bc429fc1d79260d2fb94cde707e2..28c4e2b498a9c11b2b99e3024eea5da62227fe8a 100644 (file)
@@ -444,7 +444,6 @@ _mesa_Translatef( GLfloat x, GLfloat y, GLfloat z )
 }
 
  
-#if _HAVE_FULL_GL
 void GLAPIENTRY
 _mesa_LoadMatrixd( const GLdouble *m )
 {
@@ -487,10 +486,8 @@ _mesa_Translated( GLdouble x, GLdouble y, GLdouble z )
 {
    _mesa_Translatef((GLfloat) x, (GLfloat) y, (GLfloat) z);
 }
-#endif
 
 
-#if _HAVE_FULL_GL
 void GLAPIENTRY
 _mesa_LoadTransposeMatrixfARB( const GLfloat *m )
 {
@@ -529,7 +526,6 @@ _mesa_MultTransposeMatrixdARB( const GLdouble *m )
    _math_transposefd(tm, m);
    _mesa_MultMatrixf(tm);
 }
-#endif
 
 
 
index 538f3cf44445d83973605c4d0719eebea53e7eea..7d6e5a5e17f50e33aa3ceb6bbebf0e2daecc8976 100644 (file)
@@ -62,9 +62,6 @@ _mesa_PointSize( GLfloat size )
 }
 
 
-#if _HAVE_FULL_GL
-
-
 void GLAPIENTRY
 _mesa_PointParameteri( GLenum pname, GLint param )
 {
@@ -221,7 +218,6 @@ _mesa_PointParameterfv( GLenum pname, const GLfloat *params)
    if (ctx->Driver.PointParameterfv)
       (*ctx->Driver.PointParameterfv)(ctx, pname, params);
 }
-#endif
 
 
 
index d7d52daa89ef1cddd532323e732c66f100385174..eb53f8a4ac29951d82459943c0d6749b078db63a 100644 (file)
@@ -184,8 +184,6 @@ _mesa_PolygonMode( GLenum face, GLenum mode )
       ctx->Driver.PolygonMode(ctx, face, mode);
 }
 
-#if _HAVE_FULL_GL
-
 
 /**
  * This routine updates the ctx->Polygon.Stipple state.
@@ -298,7 +296,6 @@ _mesa_PolygonOffsetEXT( GLfloat factor, GLfloat bias )
    _mesa_PolygonOffset(factor, bias * ctx->DrawBuffer->_DepthMaxF );
 }
 
-#endif
 
 
 /**********************************************************************/
index f47b57b8df1f92294bc24a0c777000246ab54cff..8d2948b8e75791a64726d193bec558699d695e31 100644 (file)
@@ -382,7 +382,6 @@ _mesa_StencilOp(GLenum fail, GLenum zfail, GLenum zpass)
 
 
 
-#if _HAVE_FULL_GL
 /* GL_EXT_stencil_two_side */
 void GLAPIENTRY
 _mesa_ActiveStencilFaceEXT(GLenum face)
@@ -406,7 +405,6 @@ _mesa_ActiveStencilFaceEXT(GLenum face)
       _mesa_error(ctx, GL_INVALID_ENUM, "glActiveStencilFaceEXT(face)");
    }
 }
-#endif
 
 
 
index 34f4fae7a200352b8011ab3a865419e08ed8d3fd..359b9168a2cf91ba4f977858cbf20e2eabcb056b 100644 (file)
@@ -31,8 +31,6 @@
 
 struct gl_context;
 
-#if _HAVE_FULL_GL
-
 extern GLenum
 _mesa_gl_compressed_format_base_format(GLenum format);
 
@@ -55,13 +53,4 @@ _mesa_decompress_image(gl_format format, GLuint width, GLuint height,
                        const GLubyte *src, GLint srcRowStride,
                        GLfloat *dest);
 
-#else /* _HAVE_FULL_GL */
-
-/* no-op macros */
-#define _mesa_get_compressed_formats( c, f ) 0
-#define _mesa_compressed_image_address(c, r, i, f, w, i2 ) 0
-#define _mesa_compress_teximage( c, w, h, sF, s, sRS, dF, d, drs ) ((void)0)
-
-#endif /* _HAVE_FULL_GL */
-
 #endif /* TEXCOMPRESS_H */
index 6c8bb85b81b83467207e8edd1514efee6814350f..b88931743ab784905605f4ceebf1a27557235673 100644 (file)
@@ -1966,7 +1966,6 @@ compressed_texture_error_check(struct gl_context *ctx, GLint dimensions,
    }
 
    switch (internalFormat) {
-#if FEATURE_ES
    case GL_PALETTE4_RGB8_OES:
    case GL_PALETTE4_RGBA8_OES:
    case GL_PALETTE4_R5_G6_B5_OES:
@@ -2005,7 +2004,6 @@ compressed_texture_error_check(struct gl_context *ctx, GLint dimensions,
        */
       level = -level;
       break;
-#endif
 
    default:
       /* check level */
index 1a346b2ded22fff21e3527d49956df3b092a2f20..b54e2f7df82c1b865ea6be335a8e755e6d21500f 100644 (file)
@@ -65,8 +65,6 @@ _mesa_update_array_max_element(struct gl_client_array *array)
 }
 
 
-#if _HAVE_FULL_GL
-
 extern void GLAPIENTRY
 _mesa_VertexPointer(GLint size, GLenum type, GLsizei stride,
                     const GLvoid *ptr);
@@ -266,12 +264,4 @@ _mesa_init_varray( struct gl_context * ctx );
 extern void 
 _mesa_free_varray_data(struct gl_context *ctx);
 
-#else
-
-/** No-op */
-#define _mesa_init_varray( c )  ((void)0)
-#define _mesa_free_varray_data( c )  ((void)0)
-
-#endif
-
 #endif