mesa: remove #if _HAVE_FULL_GL checks
This is basically more of the "remove FEATURE_x" clean-up. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -129,9 +129,7 @@
|
||||
#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.
|
||||
|
||||
@@ -42,27 +42,12 @@
|
||||
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);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -41,19 +41,10 @@
|
||||
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
/**********************************************************************/
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user