diff options
Diffstat (limited to 'mesalib/src/mesa/main')
75 files changed, 41 insertions, 1176 deletions
diff --git a/mesalib/src/mesa/main/accum.c b/mesalib/src/mesa/main/accum.c index 16c26168a..8b71640df 100644 --- a/mesalib/src/mesa/main/accum.c +++ b/mesalib/src/mesa/main/accum.c @@ -36,9 +36,6 @@ #include "main/dispatch.h" -#if FEATURE_accum - - void GLAPIENTRY _mesa_ClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ) { @@ -496,9 +493,6 @@ _mesa_accum(struct gl_context *ctx, GLenum op, GLfloat value) } -#endif /* FEATURE_accum */ - - void _mesa_init_accum( struct gl_context *ctx ) { diff --git a/mesalib/src/mesa/main/accum.h b/mesalib/src/mesa/main/accum.h index 5b3f06aa9..594a7687d 100644 --- a/mesalib/src/mesa/main/accum.h +++ b/mesalib/src/mesa/main/accum.h @@ -44,8 +44,6 @@ struct _glapi_table; struct gl_context; struct gl_renderbuffer; -#if FEATURE_accum - extern void GLAPIENTRY _mesa_ClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ); @@ -58,35 +56,6 @@ _mesa_accum(struct gl_context *ctx, GLenum op, GLfloat value); extern void _mesa_clear_accum_buffer(struct gl_context *ctx); -#else /* FEATURE_accum */ - -#include "main/compiler.h" - -static inline void -_mesa_ClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ) -{ - /* this is used in _mesa_PopAttrib */ - ASSERT_NO_FEATURE(); -} - -static inline void -_mesa_init_accum_dispatch(struct _glapi_table *disp) -{ -} - -static inline void -_mesa_accum(struct gl_context *ctx, GLenum op, GLfloat value) -{ -} - -static inline void -_mesa_clear_accum_buffer(struct gl_context *ctx) -{ -} - - -#endif /* FEATURE_accum */ - extern void _mesa_init_accum( struct gl_context *ctx ); diff --git a/mesalib/src/mesa/main/api_arrayelt.c b/mesalib/src/mesa/main/api_arrayelt.c index 152340b5f..d530001bc 100644 --- a/mesalib/src/mesa/main/api_arrayelt.c +++ b/mesalib/src/mesa/main/api_arrayelt.c @@ -83,9 +83,6 @@ typedef struct { #define NUM_TYPES 8 -#if FEATURE_arrayelt - - static const int ColorFuncs[2][NUM_TYPES] = { { _gloffset_Color3bv, @@ -1711,6 +1708,3 @@ void _mesa_install_arrayelt_vtxfmt(struct _glapi_table *disp, { SET_ArrayElement(disp, vfmt->ArrayElement); } - - -#endif /* FEATURE_arrayelt */ diff --git a/mesalib/src/mesa/main/api_arrayelt.h b/mesalib/src/mesa/main/api_arrayelt.h index 03810c69b..988703259 100644 --- a/mesalib/src/mesa/main/api_arrayelt.h +++ b/mesalib/src/mesa/main/api_arrayelt.h @@ -31,8 +31,6 @@ #include "main/mfeatures.h" #include "main/mtypes.h" -#if FEATURE_arrayelt - #define _MESA_INIT_ARRAYELT_VTXFMT(vfmt, impl) \ do { \ (vfmt)->ArrayElement = impl ## ArrayElement; \ @@ -52,33 +50,5 @@ extern void _mesa_install_arrayelt_vtxfmt(struct _glapi_table *disp, const GLvertexformat *vfmt); -#else /* FEATURE_arrayelt */ - -#define _MESA_INIT_ARRAYELT_VTXFMT(vfmt, impl) do { } while (0) - -static inline GLboolean -_ae_create_context( struct gl_context *ctx ) -{ - return GL_TRUE; -} - -static inline void -_ae_destroy_context( struct gl_context *ctx ) -{ -} - -static inline void -_ae_invalidate_state( struct gl_context *ctx, GLuint new_state ) -{ -} - -static inline void -_mesa_install_arrayelt_vtxfmt(struct _glapi_table *disp, - const GLvertexformat *vfmt) -{ -} - -#endif /* FEATURE_arrayelt */ - #endif /* API_ARRAYELT_H */ diff --git a/mesalib/src/mesa/main/api_exec.c b/mesalib/src/mesa/main/api_exec.c index c44818945..1da041545 100644 --- a/mesalib/src/mesa/main/api_exec.c +++ b/mesalib/src/mesa/main/api_exec.c @@ -33,17 +33,13 @@ #include "accum.h" #include "api_loopback.h" #include "api_exec.h" -#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program #include "arbprogram.h" -#endif #include "atifragshader.h" #include "attrib.h" #include "blend.h" #include "bufferobj.h" #include "arrayobj.h" -#if FEATURE_draw_read_buffer #include "buffers.h" -#endif #include "clear.h" #include "clip.h" #include "colortab.h" @@ -60,9 +56,7 @@ #include "get.h" #include "feedback.h" #include "fog.h" -#if FEATURE_EXT_framebuffer_object #include "fbobject.h" -#endif #include "framebuffer.h" #include "hint.h" #include "histogram.h" @@ -77,9 +71,7 @@ #include "polygon.h" #include "queryobj.h" #include "readpix.h" -#if FEATURE_ARB_sampler_objects #include "samplerobj.h" -#endif #include "scissor.h" #include "stencil.h" #include "texenv.h" @@ -95,20 +87,13 @@ #include "mtypes.h" #include "varray.h" #include "viewport.h" -#if FEATURE_NV_vertex_program || FEATURE_NV_fragment_program #include "nvprogram.h" -#endif -#if FEATURE_ARB_shader_objects #include "shaderapi.h" #include "uniforms.h" -#endif #include "syncobj.h" #include "main/dispatch.h" -#if FEATURE_GL || FEATURE_ES2 - - /** * Initialize a dispatch table with pointers to Mesa's immediate-mode * commands. @@ -144,12 +129,9 @@ _mesa_create_exec_table(struct gl_context *ctx) SET_ColorMask(exec, _mesa_ColorMask); SET_CullFace(exec, _mesa_CullFace); SET_Disable(exec, _mesa_Disable); -#if FEATURE_draw_read_buffer if (ctx->API == API_OPENGL || ctx->API == API_OPENGL_CORE) SET_DrawBuffer(exec, _mesa_DrawBuffer); - SET_ReadBuffer(exec, _mesa_ReadBuffer); -#endif SET_Enable(exec, _mesa_Enable); SET_Finish(exec, _mesa_Finish); SET_Flush(exec, _mesa_Flush); @@ -376,10 +358,8 @@ _mesa_create_exec_table(struct gl_context *ctx) SET_StencilMaskSeparate(exec, _mesa_StencilMaskSeparate); SET_StencilOpSeparate(exec, _mesa_StencilOpSeparate); -#if FEATURE_ARB_shader_objects _mesa_init_shader_dispatch(exec); _mesa_init_shader_uniform_dispatch(exec); -#endif /* 2. GL_EXT_blend_color */ #if 0 @@ -485,7 +465,6 @@ _mesa_create_exec_table(struct gl_context *ctx) #endif /* 233. GL_NV_vertex_program */ -#if FEATURE_NV_vertex_program if (ctx->API == API_OPENGL) { SET_BindProgramNV(exec, _mesa_BindProgram); SET_DeleteProgramsNV(exec, _mesa_DeletePrograms); @@ -513,7 +492,6 @@ _mesa_create_exec_table(struct gl_context *ctx) SET_VertexAttribPointerNV(exec, _mesa_VertexAttribPointerNV); /* glVertexAttrib*NV functions handled in api_loopback.c */ } -#endif SET_GetVertexAttribPointervNV(exec, _mesa_GetVertexAttribPointervNV); /* 273. GL_APPLE_vertex_array_object */ @@ -526,7 +504,6 @@ _mesa_create_exec_table(struct gl_context *ctx) SET_IsVertexArrayAPPLE(exec, _mesa_IsVertexArrayAPPLE); /* 282. GL_NV_fragment_program */ -#if FEATURE_NV_fragment_program if (ctx->API == API_OPENGL) { SET_ProgramNamedParameter4fNV(exec, _mesa_ProgramNamedParameter4fNV); SET_ProgramNamedParameter4dNV(exec, _mesa_ProgramNamedParameter4dNV); @@ -541,7 +518,6 @@ _mesa_create_exec_table(struct gl_context *ctx) SET_GetProgramLocalParameterdvARB(exec, _mesa_GetProgramLocalParameterdvARB); SET_GetProgramLocalParameterfvARB(exec, _mesa_GetProgramLocalParameterfvARB); } -#endif /* 262. GL_NV_point_sprite */ #if _HAVE_FULL_GL @@ -624,7 +600,6 @@ _mesa_create_exec_table(struct gl_context *ctx) /* ARB 26. GL_ARB_vertex_program */ /* ARB 27. GL_ARB_fragment_program */ -#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program /* glVertexAttrib1sARB aliases glVertexAttrib1sNV */ /* glVertexAttrib1fARB aliases glVertexAttrib1fNV */ /* glVertexAttrib1dARB aliases glVertexAttrib1dNV */ @@ -692,7 +667,6 @@ _mesa_create_exec_table(struct gl_context *ctx) SET_GetProgramStringARB(exec, _mesa_GetProgramStringARB); } SET_GetProgramivARB(exec, _mesa_GetProgramivARB); -#endif /* ARB 28. GL_ARB_vertex_buffer_object */ _mesa_init_bufferobj_dispatch(ctx, exec); @@ -703,9 +677,7 @@ _mesa_create_exec_table(struct gl_context *ctx) } /* ARB 37. GL_ARB_draw_buffers */ -#if FEATURE_draw_read_buffer SET_DrawBuffersARB(exec, _mesa_DrawBuffersARB); -#endif /* ARB 66. GL_ARB_sync */ if (ctx->API != API_OPENGLES2) { @@ -738,7 +710,6 @@ _mesa_create_exec_table(struct gl_context *ctx) SET_TexBumpParameterfvATI(exec, _mesa_TexBumpParameterfvATI); } -#if FEATURE_EXT_framebuffer_object SET_IsRenderbufferEXT(exec, _mesa_IsRenderbufferEXT); SET_BindRenderbufferEXT(exec, _mesa_BindRenderbufferEXT); SET_DeleteRenderbuffersEXT(exec, _mesa_DeleteRenderbuffersEXT); @@ -758,49 +729,38 @@ _mesa_create_exec_table(struct gl_context *ctx) SET_FramebufferRenderbufferEXT(exec, _mesa_FramebufferRenderbufferEXT); SET_GetFramebufferAttachmentParameterivEXT(exec, _mesa_GetFramebufferAttachmentParameterivEXT); SET_GenerateMipmapEXT(exec, _mesa_GenerateMipmapEXT); -#endif -#if FEATURE_EXT_framebuffer_blit if (ctx->API != API_OPENGLES2) { SET_BlitFramebufferEXT(exec, _mesa_BlitFramebufferEXT); } -#endif /* GL_EXT_gpu_program_parameters */ -#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program if (ctx->API == API_OPENGL) { SET_ProgramEnvParameters4fvEXT(exec, _mesa_ProgramEnvParameters4fvEXT); SET_ProgramLocalParameters4fvEXT(exec, _mesa_ProgramLocalParameters4fvEXT); } -#endif /* GL_MESA_texture_array / GL_EXT_texture_array */ -#if FEATURE_EXT_framebuffer_object if (ctx->API != API_OPENGLES2) { SET_FramebufferTextureLayerEXT(exec, _mesa_FramebufferTextureLayerEXT); } -#endif /* GL_ATI_separate_stencil */ if (ctx->API == API_OPENGL) { SET_StencilFuncSeparateATI(exec, _mesa_StencilFuncSeparateATI); } -#if FEATURE_ARB_framebuffer_object /* The ARB_fbo functions are the union of * GL_EXT_fbo, GL_EXT_framebuffer_blit, GL_EXT_texture_array */ if (ctx->API != API_OPENGLES2) { SET_RenderbufferStorageMultisample(exec, _mesa_RenderbufferStorageMultisample); } -#endif -#if FEATURE_ARB_map_buffer_range if (ctx->API != API_OPENGLES2) { SET_MapBufferRange(exec, _mesa_MapBufferRange); SET_FlushMappedBufferRange(exec, _mesa_FlushMappedBufferRange); } -#endif /* GL_ARB_copy_buffer */ if (ctx->API != API_OPENGLES2) { @@ -827,25 +787,19 @@ _mesa_create_exec_table(struct gl_context *ctx) SET_EndConditionalRenderNV(exec, _mesa_EndConditionalRender); } -#if FEATURE_OES_EGL_image SET_EGLImageTargetTexture2DOES(exec, _mesa_EGLImageTargetTexture2DOES); SET_EGLImageTargetRenderbufferStorageOES(exec, _mesa_EGLImageTargetRenderbufferStorageOES); -#endif -#if FEATURE_APPLE_object_purgeable if (ctx->API != API_OPENGLES2) { SET_ObjectPurgeableAPPLE(exec, _mesa_ObjectPurgeableAPPLE); SET_ObjectUnpurgeableAPPLE(exec, _mesa_ObjectUnpurgeableAPPLE); SET_GetObjectParameterivAPPLE(exec, _mesa_GetObjectParameterivAPPLE); } -#endif -#if FEATURE_ARB_geometry_shader4 if (ctx->API != API_OPENGLES2) { SET_FramebufferTextureARB(exec, _mesa_FramebufferTextureARB); SET_FramebufferTextureFaceARB(exec, _mesa_FramebufferTextureFaceARB); } -#endif if (ctx->API != API_OPENGLES2) { SET_ClampColorARB(exec, _mesa_ClampColorARB); @@ -913,11 +867,9 @@ _mesa_create_exec_table(struct gl_context *ctx) SET_TextureStorage2DEXT(exec, _mesa_TextureStorage2DEXT); SET_TextureStorage3DEXT(exec, _mesa_TextureStorage3DEXT); -#if FEATURE_ARB_sampler_objects if (ctx->API != API_OPENGLES2) { _mesa_init_sampler_object_dispatch(exec); } -#endif if (_mesa_is_desktop_gl(ctx)) { SET_InvalidateTexSubImage(exec, _mesa_InvalidateTexSubImage); @@ -931,5 +883,3 @@ _mesa_create_exec_table(struct gl_context *ctx) return exec; } - -#endif /* FEATURE_GL || FEATURE_ES2 */ diff --git a/mesalib/src/mesa/main/api_loopback.c b/mesalib/src/mesa/main/api_loopback.c index c438307d8..a5fbe8ebf 100644 --- a/mesalib/src/mesa/main/api_loopback.c +++ b/mesalib/src/mesa/main/api_loopback.c @@ -86,9 +86,6 @@ #define ATTRIBI_4UI(index,x,y,z,w) CALL_VertexAttribI4uiEXT(GET_DISPATCH(), (index,x,y,z,w)) -#if FEATURE_beginend - - static void GLAPIENTRY loopback_Color3b_f( GLbyte red, GLbyte green, GLbyte blue ) { @@ -1720,6 +1717,3 @@ _mesa_loopback_init_api_table( struct _glapi_table *dest ) SET_VertexAttribI4ubvEXT(dest, loopback_VertexAttribI4ubv); SET_VertexAttribI4usvEXT(dest, loopback_VertexAttribI4usv); } - - -#endif /* FEATURE_beginend */ diff --git a/mesalib/src/mesa/main/api_loopback.h b/mesalib/src/mesa/main/api_loopback.h index f53b90280..a99c30962 100644 --- a/mesalib/src/mesa/main/api_loopback.h +++ b/mesalib/src/mesa/main/api_loopback.h @@ -32,17 +32,6 @@ struct _glapi_table; -#if FEATURE_beginend - extern void _mesa_loopback_init_api_table( struct _glapi_table *dest ); -#else /* FEATURE_beginend */ - -static inline void -_mesa_loopback_init_api_table( struct _glapi_table *dest ) -{ -} - -#endif /* FEATURE_beginend */ - #endif /* API_LOOPBACK_H */ diff --git a/mesalib/src/mesa/main/api_validate.c b/mesalib/src/mesa/main/api_validate.c index d0d2ca4d4..db9d14a4c 100644 --- a/mesalib/src/mesa/main/api_validate.c +++ b/mesalib/src/mesa/main/api_validate.c @@ -110,25 +110,20 @@ check_valid_to_render(struct gl_context *ctx, const char *function) } switch (ctx->API) { -#if FEATURE_es2_glsl case API_OPENGLES2: /* For ES2, we can draw if any vertex array is enabled (and we * should always have a vertex program/shader). */ if (ctx->Array.ArrayObj->_Enabled == 0x0 || !ctx->VertexProgram._Current) return GL_FALSE; break; -#endif -#if FEATURE_ES1 case API_OPENGLES: /* For OpenGL ES, only draw if we have vertex positions */ if (!ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POS].Enabled) return GL_FALSE; break; -#endif -#if FEATURE_GL case API_OPENGL: case API_OPENGL_CORE: { @@ -151,7 +146,6 @@ check_valid_to_render(struct gl_context *ctx, const char *function) } } break; -#endif default: ASSERT_NO_FEATURE(); @@ -616,8 +610,6 @@ _mesa_validate_DrawElementsInstanced(struct gl_context *ctx, } -#if FEATURE_EXT_transform_feedback - GLboolean _mesa_validate_DrawTransformFeedback(struct gl_context *ctx, GLenum mode, @@ -662,5 +654,3 @@ _mesa_validate_DrawTransformFeedback(struct gl_context *ctx, return GL_TRUE; } - -#endif diff --git a/mesalib/src/mesa/main/api_validate.h b/mesalib/src/mesa/main/api_validate.h index 8dc8df4b2..0ca9c90d9 100644 --- a/mesalib/src/mesa/main/api_validate.h +++ b/mesalib/src/mesa/main/api_validate.h @@ -78,8 +78,6 @@ _mesa_validate_DrawElementsInstanced(struct gl_context *ctx, const GLvoid *indices, GLsizei primcount, GLint basevertex); -#if FEATURE_EXT_transform_feedback - extern GLboolean _mesa_validate_DrawTransformFeedback(struct gl_context *ctx, GLenum mode, @@ -87,6 +85,5 @@ _mesa_validate_DrawTransformFeedback(struct gl_context *ctx, GLuint stream, GLsizei numInstances); -#endif #endif diff --git a/mesalib/src/mesa/main/arrayobj.c b/mesalib/src/mesa/main/arrayobj.c index 9337fe725..9255559d5 100644 --- a/mesalib/src/mesa/main/arrayobj.c +++ b/mesalib/src/mesa/main/arrayobj.c @@ -236,11 +236,9 @@ _mesa_initialize_array_object( struct gl_context *ctx, case VERT_ATTRIB_EDGEFLAG: init_array(ctx, &obj->VertexAttrib[VERT_ATTRIB_EDGEFLAG], 1, GL_BOOL); break; -#if FEATURE_point_size_array case VERT_ATTRIB_POINT_SIZE: init_array(ctx, &obj->VertexAttrib[VERT_ATTRIB_POINT_SIZE], 1, GL_FLOAT); break; -#endif default: init_array(ctx, &obj->VertexAttrib[i], 4, GL_FLOAT); break; diff --git a/mesalib/src/mesa/main/atifragshader.c b/mesalib/src/mesa/main/atifragshader.c index 63608a33f..32ddfb8bb 100644 --- a/mesalib/src/mesa/main/atifragshader.c +++ b/mesalib/src/mesa/main/atifragshader.c @@ -32,8 +32,6 @@ #include "main/dispatch.h" #include "main/atifragshader.h" -#if FEATURE_ATI_fragment_shader - #define MESA_DEBUG_ATI_FS 0 static struct ati_fragment_shader DummyShader; @@ -786,5 +784,3 @@ _mesa_SetFragmentShaderConstantATI(GLuint dst, const GLfloat * value) COPY_4V(ctx->ATIFragmentShader.GlobalConstants[dstindex], value); } } - -#endif /* FEATURE_ATI_fragment_shader */ diff --git a/mesalib/src/mesa/main/atifragshader.h b/mesalib/src/mesa/main/atifragshader.h index 90ada212a..f5af5f15f 100644 --- a/mesalib/src/mesa/main/atifragshader.h +++ b/mesalib/src/mesa/main/atifragshader.h @@ -25,8 +25,6 @@ struct ati_fs_opcode_st GLint num_src_args; }; -extern struct ati_fs_opcode_st ati_fs_opcodes[]; - struct atifragshader_src_register { GLuint Index; @@ -65,8 +63,6 @@ struct atifs_setupinst }; -#if FEATURE_ATI_fragment_shader - extern void _mesa_init_ati_fragment_shader_dispatch(struct _glapi_table *disp); @@ -130,25 +126,5 @@ _mesa_AlphaFragmentOp3ATI(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, extern void GLAPIENTRY _mesa_SetFragmentShaderConstantATI(GLuint dst, const GLfloat * value); -#else /* FEATURE_ATI_fragment_shader */ - -static inline void -_mesa_init_ati_fragment_shader_dispatch(struct _glapi_table *disp) -{ -} - -static inline struct ati_fragment_shader * -_mesa_new_ati_fragment_shader(struct gl_context *ctx, GLuint id) -{ - return NULL; -} - -static inline void -_mesa_delete_ati_fragment_shader(struct gl_context *ctx, - struct ati_fragment_shader *s) -{ -} - -#endif /* FEATURE_ATI_fragment_shader */ #endif /* ATIFRAGSHADER_H */ diff --git a/mesalib/src/mesa/main/attrib.c b/mesalib/src/mesa/main/attrib.c index 806cf09d8..b92c4652e 100644 --- a/mesalib/src/mesa/main/attrib.c +++ b/mesalib/src/mesa/main/attrib.c @@ -178,9 +178,6 @@ struct texture_state }; -#if FEATURE_attrib_stack - - /** * Allocate new attribute node of given type/kind. Attach payload data. * Insert it into the linked list named by 'head'. @@ -1609,9 +1606,6 @@ _mesa_init_attrib_dispatch(struct _glapi_table *disp) } -#endif /* FEATURE_attrib_stack */ - - /** * Free any attribute state data that might be attached to the context. */ diff --git a/mesalib/src/mesa/main/attrib.h b/mesalib/src/mesa/main/attrib.h index 6809311cf..f75c3c5ce 100644 --- a/mesalib/src/mesa/main/attrib.h +++ b/mesalib/src/mesa/main/attrib.h @@ -33,8 +33,6 @@ struct _glapi_table; struct gl_context; -#if FEATURE_attrib_stack - extern void GLAPIENTRY _mesa_PushAttrib( GLbitfield mask ); @@ -50,27 +48,6 @@ _mesa_PopClientAttrib( void ); extern void _mesa_init_attrib_dispatch(struct _glapi_table *disp); -#else /* FEATURE_attrib_stack */ - -static inline void -_mesa_PushClientAttrib( GLbitfield mask ) -{ - ASSERT_NO_FEATURE(); -} - -static inline void -_mesa_PopClientAttrib( void ) -{ - ASSERT_NO_FEATURE(); -} - -static inline void -_mesa_init_attrib_dispatch(struct _glapi_table *disp) -{ -} - -#endif /* FEATURE_attrib_stack */ - extern void _mesa_init_attrib( struct gl_context *ctx ); diff --git a/mesalib/src/mesa/main/bufferobj.c b/mesalib/src/mesa/main/bufferobj.c index f8fd32922..9c1e0bf52 100644 --- a/mesalib/src/mesa/main/bufferobj.c +++ b/mesalib/src/mesa/main/bufferobj.c @@ -87,13 +87,11 @@ get_buffer_target(struct gl_context *ctx, GLenum target) return &ctx->CopyReadBuffer; case GL_COPY_WRITE_BUFFER: return &ctx->CopyWriteBuffer; -#if FEATURE_EXT_transform_feedback case GL_TRANSFORM_FEEDBACK_BUFFER: if (ctx->Extensions.EXT_transform_feedback) { return &ctx->TransformFeedback.CurrentBuffer; } break; -#endif case GL_TEXTURE_BUFFER: if (_mesa_is_desktop_gl(ctx) && ctx->Extensions.ARB_texture_buffer_object) { @@ -1670,7 +1668,6 @@ _mesa_FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length) } -#if FEATURE_APPLE_object_purgeable static GLenum buffer_object_purgeable(struct gl_context *ctx, GLuint name, GLenum option) { @@ -2045,8 +2042,6 @@ _mesa_GetObjectParameterivAPPLE(GLenum objectType, GLuint name, GLenum pname, } } -#endif /* FEATURE_APPLE_object_purgeable */ - static void set_ubo_binding(struct gl_context *ctx, int index, diff --git a/mesalib/src/mesa/main/bufferobj.h b/mesalib/src/mesa/main/bufferobj.h index 15fdb9c30..4f1e61b63 100644 --- a/mesalib/src/mesa/main/bufferobj.h +++ b/mesalib/src/mesa/main/bufferobj.h @@ -148,7 +148,6 @@ _mesa_MapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, extern void GLAPIENTRY _mesa_FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length); -#if FEATURE_APPLE_object_purgeable extern GLenum GLAPIENTRY _mesa_ObjectPurgeableAPPLE(GLenum objectType, GLuint name, GLenum option); @@ -157,7 +156,6 @@ _mesa_ObjectUnpurgeableAPPLE(GLenum objectType, GLuint name, GLenum option); extern void GLAPIENTRY _mesa_GetObjectParameterivAPPLE(GLenum objectType, GLuint name, GLenum pname, GLint* params); -#endif void GLAPIENTRY _mesa_BindBufferBase(GLenum target, GLuint index, GLuint buffer); diff --git a/mesalib/src/mesa/main/colortab.c b/mesalib/src/mesa/main/colortab.c index f20dee677..5799c01f6 100644 --- a/mesalib/src/mesa/main/colortab.c +++ b/mesalib/src/mesa/main/colortab.c @@ -39,8 +39,6 @@ #include "main/dispatch.h" -#if FEATURE_colortable - void GLAPIENTRY _mesa_ColorTable( GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, @@ -164,6 +162,3 @@ _mesa_init_colortable_dispatch(struct _glapi_table *disp) /* GL_ARB_robustness */ SET_GetnColorTableARB(disp, _mesa_GetnColorTableARB); } - - -#endif /* FEATURE_colortable */ diff --git a/mesalib/src/mesa/main/colortab.h b/mesalib/src/mesa/main/colortab.h index 4e225ffc9..7b8df38a1 100644 --- a/mesalib/src/mesa/main/colortab.h +++ b/mesalib/src/mesa/main/colortab.h @@ -33,8 +33,6 @@ struct _glapi_table; -#if FEATURE_colortable - extern void GLAPIENTRY _mesa_ColorTable( GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, @@ -48,29 +46,5 @@ _mesa_ColorSubTable( GLenum target, GLsizei start, extern void _mesa_init_colortable_dispatch(struct _glapi_table *disp); -#else /* FEATURE_colortable */ - -static inline void GLAPIENTRY -_mesa_ColorTable( GLenum target, GLenum internalformat, - GLsizei width, GLenum format, GLenum type, - const GLvoid *table ) -{ - ASSERT_NO_FEATURE(); -} - -static inline void GLAPIENTRY -_mesa_ColorSubTable( GLenum target, GLsizei start, - GLsizei count, GLenum format, GLenum type, - const GLvoid *table ) -{ - ASSERT_NO_FEATURE(); -} - -static inline void -_mesa_init_colortable_dispatch(struct _glapi_table *disp) -{ -} - -#endif /* FEATURE_colortable */ #endif /* COLORTAB_H */ diff --git a/mesalib/src/mesa/main/context.c b/mesalib/src/mesa/main/context.c index 6b28690ec..abce52e58 100644 --- a/mesalib/src/mesa/main/context.c +++ b/mesalib/src/mesa/main/context.c @@ -599,15 +599,10 @@ _mesa_init_constants(struct gl_context *ctx) ctx->Const.MaxUniformBlockSize = 16384; ctx->Const.UniformBufferOffsetAlignment = 1; -#if FEATURE_ARB_vertex_program init_program_limits(ctx, GL_VERTEX_PROGRAM_ARB, &ctx->Const.VertexProgram); -#endif -#if FEATURE_ARB_fragment_program init_program_limits(ctx, GL_FRAGMENT_PROGRAM_ARB, &ctx->Const.FragmentProgram); -#endif -#if FEATURE_ARB_geometry_shader4 init_program_limits(ctx, MESA_GEOMETRY_PROGRAM, &ctx->Const.GeometryProgram); -#endif + ctx->Const.MaxProgramMatrices = MAX_PROGRAM_MATRICES; ctx->Const.MaxProgramMatrixStackDepth = MAX_PROGRAM_MATRIX_STACK_DEPTH; @@ -617,23 +612,17 @@ _mesa_init_constants(struct gl_context *ctx) /* GL_ARB_draw_buffers */ ctx->Const.MaxDrawBuffers = MAX_DRAW_BUFFERS; -#if FEATURE_EXT_framebuffer_object ctx->Const.MaxColorAttachments = MAX_COLOR_ATTACHMENTS; ctx->Const.MaxRenderbufferSize = MAX_RENDERBUFFER_SIZE; -#endif -#if FEATURE_ARB_vertex_shader ctx->Const.MaxVertexTextureImageUnits = MAX_VERTEX_TEXTURE_IMAGE_UNITS; ctx->Const.MaxCombinedTextureImageUnits = MAX_COMBINED_TEXTURE_IMAGE_UNITS; ctx->Const.MaxVarying = MAX_VARYING; -#endif -#if FEATURE_ARB_geometry_shader4 ctx->Const.MaxGeometryTextureImageUnits = MAX_GEOMETRY_TEXTURE_IMAGE_UNITS; ctx->Const.MaxVertexVaryingComponents = MAX_VERTEX_VARYING_COMPONENTS; ctx->Const.MaxGeometryVaryingComponents = MAX_GEOMETRY_VARYING_COMPONENTS; ctx->Const.MaxGeometryOutputVertices = MAX_GEOMETRY_OUTPUT_VERTICES; ctx->Const.MaxGeometryTotalOutputComponents = MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS; -#endif /* Shading language version */ if (_mesa_is_desktop_gl(ctx)) { @@ -961,7 +950,6 @@ _mesa_initialize_context(struct gl_context *ctx, return GL_FALSE; } -#if FEATURE_dispatch /* setup the API dispatch tables */ switch (ctx->API) { #if FEATURE_GL || FEATURE_ES2 @@ -985,7 +973,6 @@ _mesa_initialize_context(struct gl_context *ctx, _mesa_reference_shared_state(ctx, &ctx->Shared, NULL); return GL_FALSE; } -#endif ctx->CurrentDispatch = ctx->Exec; ctx->FragmentProgram._MaintainTexEnvProgram @@ -1008,7 +995,6 @@ _mesa_initialize_context(struct gl_context *ctx, switch (ctx->API) { case API_OPENGL: -#if FEATURE_dlist ctx->Save = _mesa_create_save_table(); if (!ctx->Save) { _mesa_reference_shared_state(ctx, &ctx->Shared, NULL); @@ -1017,7 +1003,6 @@ _mesa_initialize_context(struct gl_context *ctx, } _mesa_install_save_vtxfmt( ctx, &ctx->ListState.ListVtxfmt ); -#endif case API_OPENGL_CORE: break; case API_OPENGLES: @@ -1138,12 +1123,9 @@ _mesa_free_context_data( struct gl_context *ctx ) _mesa_free_varray_data(ctx); _mesa_free_transform_feedback(ctx); -#if FEATURE_ARB_pixel_buffer_object _mesa_reference_buffer_object(ctx, &ctx->Pack.BufferObj, NULL); _mesa_reference_buffer_object(ctx, &ctx->Unpack.BufferObj, NULL); _mesa_reference_buffer_object(ctx, &ctx->DefaultPacking.BufferObj, NULL); -#endif - _mesa_reference_buffer_object(ctx, &ctx->Array.ArrayBufferObj, NULL); /* free dispatch tables */ diff --git a/mesalib/src/mesa/main/convolve.c b/mesalib/src/mesa/main/convolve.c index 74f28da87..cac8a9979 100644 --- a/mesalib/src/mesa/main/convolve.c +++ b/mesalib/src/mesa/main/convolve.c @@ -41,8 +41,6 @@ #include "main/dispatch.h" -#if FEATURE_convolve - static void GLAPIENTRY _mesa_ConvolutionFilter1D(GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *image) { @@ -200,6 +198,3 @@ _mesa_init_convolve_dispatch(struct _glapi_table *disp) SET_GetnConvolutionFilterARB(disp, _mesa_GetnConvolutionFilterARB); SET_GetnSeparableFilterARB(disp, _mesa_GetnSeparableFilterARB); } - - -#endif /* FEATURE_convolve */ diff --git a/mesalib/src/mesa/main/convolve.h b/mesalib/src/mesa/main/convolve.h index 952285643..2fbe3c7f5 100644 --- a/mesalib/src/mesa/main/convolve.h +++ b/mesalib/src/mesa/main/convolve.h @@ -33,19 +33,7 @@ struct _glapi_table; - -#if FEATURE_convolve - extern void _mesa_init_convolve_dispatch(struct _glapi_table *disp); -#else /* FEATURE_convolve */ - -static inline void -_mesa_init_convolve_dispatch(struct _glapi_table *disp) -{ -} - -#endif /* FEATURE_convolve */ - #endif /* CONVOLVE_H */ diff --git a/mesalib/src/mesa/main/dlist.c b/mesalib/src/mesa/main/dlist.c index 40e693364..b663e364c 100644 --- a/mesalib/src/mesa/main/dlist.c +++ b/mesalib/src/mesa/main/dlist.c @@ -35,9 +35,7 @@ #include "api_exec.h" #include "api_loopback.h" #include "api_validate.h" -#if FEATURE_ATI_fragment_shader #include "atifragshader.h" -#endif #include "config.h" #include "mfeatures.h" #include "bufferobj.h" @@ -46,9 +44,7 @@ #include "dlist.h" #include "enums.h" #include "eval.h" -#if FEATURE_EXT_framebuffer_object #include "fbobject.h" -#endif #include "framebuffer.h" #include "glapi/glapi.h" #include "glformats.h" @@ -66,15 +62,9 @@ #include "texstorage.h" #include "mtypes.h" #include "varray.h" -#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program #include "arbprogram.h" -#endif -#if FEATURE_NV_vertex_program || FEATURE_NV_fragment_program #include "nvprogram.h" -#endif -#if FEATURE_EXT_transform_feedback #include "transformfeedback.h" -#endif #include "math/m_matrix.h" @@ -553,9 +543,6 @@ union uint64_pair static GLuint InstSize[OPCODE_END_OF_LIST + 1]; -#if FEATURE_dlist - - void mesa_print_display_list(GLuint list); @@ -741,7 +728,6 @@ _mesa_delete_list(struct gl_context *ctx, struct gl_display_list *dlist) free(n[11].data); n += InstSize[n[0].opcode]; break; -#if FEATURE_NV_vertex_program case OPCODE_LOAD_PROGRAM_NV: free(n[4].data); /* program string */ n += InstSize[n[0].opcode]; @@ -750,19 +736,14 @@ _mesa_delete_list(struct gl_context *ctx, struct gl_display_list *dlist) free(n[2].data); /* array of program ids */ n += InstSize[n[0].opcode]; break; -#endif -#if FEATURE_NV_fragment_program case OPCODE_PROGRAM_NAMED_PARAMETER_NV: free(n[3].data); /* parameter name */ n += InstSize[n[0].opcode]; break; -#endif -#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program case OPCODE_PROGRAM_STRING_ARB: free(n[4].data); /* program string */ n += InstSize[n[0].opcode]; break; -#endif case OPCODE_UNIFORM_1FV: case OPCODE_UNIFORM_2FV: case OPCODE_UNIFORM_3FV: @@ -4861,7 +4842,6 @@ save_SampleCoverageARB(GLclampf value, GLboolean invert) /* * GL_NV_vertex_program */ -#if FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program static void GLAPIENTRY save_BindProgramNV(GLenum target, GLuint id) { @@ -4961,9 +4941,7 @@ save_ProgramEnvParameter4dvARB(GLenum target, GLuint index, (GLfloat) params[2], (GLfloat) params[3]); } -#endif /* FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program || FEATURE_NV_vertex_program */ -#if FEATURE_NV_vertex_program static void GLAPIENTRY save_ExecuteProgramNV(GLenum target, GLuint id, const GLfloat *params) { @@ -5078,13 +5056,11 @@ save_TrackMatrixNV(GLenum target, GLuint address, CALL_TrackMatrixNV(ctx->Exec, (target, address, matrix, transform)); } } -#endif /* FEATURE_NV_vertex_program */ /* * GL_NV_fragment_program */ -#if FEATURE_NV_fragment_program static void GLAPIENTRY save_ProgramLocalParameter4fARB(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) @@ -5262,9 +5238,6 @@ save_ProgramNamedParameter4dvNV(GLuint id, GLsizei len, const GLubyte * name, (GLfloat) v[3]); } -#endif /* FEATURE_NV_fragment_program */ - - /* GL_EXT_stencil_two_side */ static void GLAPIENTRY @@ -5302,8 +5275,6 @@ save_DepthBoundsEXT(GLclampd zmin, GLclampd zmax) -#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program - static void GLAPIENTRY save_ProgramStringARB(GLenum target, GLenum format, GLsizei len, const GLvoid * string) @@ -5331,10 +5302,6 @@ save_ProgramStringARB(GLenum target, GLenum format, GLsizei len, } } -#endif /* FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program */ - - -#if FEATURE_queryobj static void GLAPIENTRY save_BeginQueryARB(GLenum target, GLuint id) @@ -5416,8 +5383,6 @@ save_EndQueryIndexed(GLenum target, GLuint index) } } -#endif /* FEATURE_queryobj */ - static void GLAPIENTRY save_DrawBuffersARB(GLsizei count, const GLenum * buffers) @@ -5470,7 +5435,6 @@ save_TexBumpParameterivATI(GLenum pname, const GLint *param) save_TexBumpParameterfvATI(pname, p); } -#if FEATURE_ATI_fragment_shader static void GLAPIENTRY save_BindFragmentShaderATI(GLuint id) { @@ -5504,7 +5468,6 @@ save_SetFragmentShaderConstantATI(GLuint dst, const GLfloat *value) CALL_SetFragmentShaderConstantATI(ctx->Exec, (dst, value)); } } -#endif static void GLAPIENTRY save_Attr1fNV(GLenum attr, GLfloat x) @@ -6354,7 +6317,6 @@ exec_GetUniformLocationARB(GLuint program, const GLchar *name) /* XXX more shader functions needed here */ -#if FEATURE_EXT_framebuffer_blit static void GLAPIENTRY save_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, @@ -6382,7 +6344,6 @@ save_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, mask, filter)); } } -#endif /** GL_EXT_provoking_vertex */ @@ -8412,12 +8373,9 @@ execute_list(struct gl_context *ctx, GLuint list) case OPCODE_WINDOW_POS_ARB: /* GL_ARB_window_pos */ CALL_WindowPos3fMESA(ctx->Exec, (n[1].f, n[2].f, n[3].f)); break; -#if FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program case OPCODE_BIND_PROGRAM_NV: /* GL_NV_vertex_program */ CALL_BindProgramNV(ctx->Exec, (n[1].e, n[2].ui)); break; -#endif -#if FEATURE_NV_vertex_program case OPCODE_EXECUTE_PROGRAM_NV: { GLfloat v[4]; @@ -8439,9 +8397,6 @@ execute_list(struct gl_context *ctx, GLuint list) case OPCODE_TRACK_MATRIX_NV: CALL_TrackMatrixNV(ctx->Exec, (n[1].e, n[2].ui, n[3].e, n[4].e)); break; -#endif - -#if FEATURE_NV_fragment_program case OPCODE_PROGRAM_LOCAL_PARAMETER_ARB: CALL_ProgramLocalParameter4fARB(ctx->Exec, (n[1].e, n[2].ui, n[3].f, n[4].f, @@ -8453,28 +8408,21 @@ execute_list(struct gl_context *ctx, GLuint list) data, n[4].f, n[5].f, n[6].f, n[7].f)); break; -#endif - case OPCODE_ACTIVE_STENCIL_FACE_EXT: CALL_ActiveStencilFaceEXT(ctx->Exec, (n[1].e)); break; case OPCODE_DEPTH_BOUNDS_EXT: CALL_DepthBoundsEXT(ctx->Exec, (n[1].f, n[2].f)); break; -#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program case OPCODE_PROGRAM_STRING_ARB: CALL_ProgramStringARB(ctx->Exec, (n[1].e, n[2].e, n[3].i, n[4].data)); break; -#endif -#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program || FEATURE_NV_vertex_program case OPCODE_PROGRAM_ENV_PARAMETER_ARB: CALL_ProgramEnvParameter4fARB(ctx->Exec, (n[1].e, n[2].ui, n[3].f, n[4].f, n[5].f, n[6].f)); break; -#endif -#if FEATURE_queryobj case OPCODE_BEGIN_QUERY_ARB: CALL_BeginQueryARB(ctx->Exec, (n[1].e, n[2].ui)); break; @@ -8490,7 +8438,6 @@ execute_list(struct gl_context *ctx, GLuint list) case OPCODE_END_QUERY_INDEXED: CALL_EndQueryIndexed(ctx->Exec, (n[1].e, n[2].ui)); break; -#endif case OPCODE_DRAW_BUFFERS_ARB: { GLenum buffers[MAX_DRAW_BUFFERS]; @@ -8500,14 +8447,11 @@ execute_list(struct gl_context *ctx, GLuint list) CALL_DrawBuffersARB(ctx->Exec, (n[1].i, buffers)); } break; -#if FEATURE_EXT_framebuffer_blit case OPCODE_BLIT_FRAMEBUFFER: CALL_BlitFramebufferEXT(ctx->Exec, (n[1].i, n[2].i, n[3].i, n[4].i, n[5].i, n[6].i, n[7].i, n[8].i, n[9].i, n[10].e)); break; -#endif - case OPCODE_USE_PROGRAM: CALL_UseProgramObjectARB(ctx->Exec, (n[1].ui)); break; @@ -8644,7 +8588,6 @@ execute_list(struct gl_context *ctx, GLuint list) CALL_TexBumpParameterfvATI(ctx->Exec, (pname, values)); } break; -#if FEATURE_ATI_fragment_shader case OPCODE_BIND_FRAGMENT_SHADER_ATI: CALL_BindFragmentShaderATI(ctx->Exec, (n[1].i)); break; @@ -8658,7 +8601,6 @@ execute_list(struct gl_context *ctx, GLuint list) CALL_SetFragmentShaderConstantATI(ctx->Exec, (dst, values)); } break; -#endif case OPCODE_ATTR_1F_NV: CALL_VertexAttrib1fNV(ctx->Exec, (n[1].e, n[2].f)); break; @@ -10289,7 +10231,6 @@ _mesa_create_save_table(void) SET_MultiModeDrawArraysIBM(table, exec_MultiModeDrawArraysIBM); SET_MultiModeDrawElementsIBM(table, exec_MultiModeDrawElementsIBM); -#if FEATURE_NV_vertex_program /* 233. GL_NV_vertex_program */ /* The following commands DO NOT go into display lists: * AreProgramsResidentNV, IsProgramNV, GenProgramsNV, DeleteProgramsNV, @@ -10320,20 +10261,16 @@ _mesa_create_save_table(void) SET_ProgramParameters4fvNV(table, save_ProgramParameters4fvNV); SET_TrackMatrixNV(table, save_TrackMatrixNV); SET_VertexAttribPointerNV(table, _mesa_VertexAttribPointerNV); -#endif /* 244. GL_ATI_envmap_bumpmap */ SET_TexBumpParameterivATI(table, save_TexBumpParameterivATI); SET_TexBumpParameterfvATI(table, save_TexBumpParameterfvATI); /* 245. GL_ATI_fragment_shader */ -#if FEATURE_ATI_fragment_shader SET_BindFragmentShaderATI(table, save_BindFragmentShaderATI); SET_SetFragmentShaderConstantATI(table, save_SetFragmentShaderConstantATI); -#endif /* 282. GL_NV_fragment_program */ -#if FEATURE_NV_fragment_program SET_ProgramNamedParameter4fNV(table, save_ProgramNamedParameter4fNV); SET_ProgramNamedParameter4dNV(table, save_ProgramNamedParameter4dNV); SET_ProgramNamedParameter4fvNV(table, save_ProgramNamedParameter4fvNV); @@ -10350,7 +10287,6 @@ _mesa_create_save_table(void) _mesa_GetProgramLocalParameterdvARB); SET_GetProgramLocalParameterfvARB(table, _mesa_GetProgramLocalParameterfvARB); -#endif /* 262. GL_NV_point_sprite */ SET_PointParameteriNV(table, save_PointParameteriNV); @@ -10420,7 +10356,6 @@ _mesa_create_save_table(void) /* ARB 26. GL_ARB_vertex_program */ /* ARB 27. GL_ARB_fragment_program */ -#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program /* glVertexAttrib* functions alias the NV ones, handled elsewhere */ SET_VertexAttribPointerARB(table, _mesa_VertexAttribPointerARB); SET_EnableVertexAttribArrayARB(table, _mesa_EnableVertexAttribArrayARB); @@ -10450,7 +10385,6 @@ _mesa_create_save_table(void) _mesa_GetProgramLocalParameterfvARB); SET_GetProgramivARB(table, _mesa_GetProgramivARB); SET_GetProgramStringARB(table, _mesa_GetProgramStringARB); -#endif /* ARB 28. GL_ARB_vertex_buffer_object */ /* None of the extension's functions get compiled */ @@ -10466,18 +10400,14 @@ _mesa_create_save_table(void) SET_MapBufferARB(table, _mesa_MapBufferARB); SET_UnmapBufferARB(table, _mesa_UnmapBufferARB); -#if FEATURE_queryobj _mesa_init_queryobj_dispatch(table); /* glGetQuery, etc */ SET_BeginQueryARB(table, save_BeginQueryARB); SET_EndQueryARB(table, save_EndQueryARB); SET_QueryCounter(table, save_QueryCounter); -#endif SET_DrawBuffersARB(table, save_DrawBuffersARB); -#if FEATURE_EXT_framebuffer_blit SET_BlitFramebufferEXT(table, save_BlitFramebufferEXT); -#endif /* GL_ARB_shader_objects */ _mesa_init_shader_dispatch(table); /* Plug in glCreate/Delete/Get, etc */ @@ -10518,16 +10448,12 @@ _mesa_create_save_table(void) SET_BlendEquationSeparateEXT(table, save_BlendEquationSeparateEXT); /* GL_EXT_gpu_program_parameters */ -#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program SET_ProgramEnvParameters4fvEXT(table, save_ProgramEnvParameters4fvEXT); SET_ProgramLocalParameters4fvEXT(table, save_ProgramLocalParameters4fvEXT); -#endif /* ARB 50. GL_ARB_map_buffer_range */ -#if FEATURE_ARB_map_buffer_range SET_MapBufferRange(table, _mesa_MapBufferRange); /* no dlist save */ SET_FlushMappedBufferRange(table, _mesa_FlushMappedBufferRange); /* no dl */ -#endif /* ARB 51. GL_ARB_texture_buffer_object */ SET_TexBufferARB(table, _mesa_TexBuffer); /* no dlist save */ @@ -10539,11 +10465,9 @@ _mesa_create_save_table(void) SET_ProvokingVertexEXT(table, save_ProvokingVertexEXT); /* 371. GL_APPLE_object_purgeable */ -#if FEATURE_APPLE_object_purgeable SET_ObjectPurgeableAPPLE(table, _mesa_ObjectPurgeableAPPLE); SET_ObjectUnpurgeableAPPLE(table, _mesa_ObjectUnpurgeableAPPLE); SET_GetObjectParameterivAPPLE(table, _mesa_GetObjectParameterivAPPLE); -#endif /* GL_EXT_texture_integer */ SET_ClearColorIiEXT(table, save_ClearColorIi); @@ -10586,7 +10510,6 @@ _mesa_create_save_table(void) (void) save_Uniform4uiv; #endif -#if FEATURE_EXT_transform_feedback /* These are not compiled into display lists: */ SET_BindBufferBaseEXT(table, _mesa_BindBufferBase); SET_BindBufferOffsetEXT(table, _mesa_BindBufferOffsetEXT); @@ -10604,11 +10527,8 @@ _mesa_create_save_table(void) save_DrawTransformFeedbackInstanced); SET_DrawTransformFeedbackStreamInstanced(table, save_DrawTransformFeedbackStreamInstanced); -#if FEATURE_queryobj SET_BeginQueryIndexed(table, save_BeginQueryIndexed); SET_EndQueryIndexed(table, save_EndQueryIndexed); -#endif -#endif /* GL_ARB_instanced_arrays */ SET_VertexAttribDivisorARB(table, save_VertexAttribDivisor); @@ -11076,9 +10996,6 @@ void _mesa_init_dlist_dispatch(struct _glapi_table *disp) } -#endif /* FEATURE_dlist */ - - /** * Initialize display list state for given context. */ @@ -11106,9 +11023,7 @@ _mesa_init_display_list(struct gl_context *ctx) /* Display List group */ ctx->List.ListBase = 0; -#if FEATURE_dlist _mesa_save_vtxfmt_init(&ctx->ListState.ListVtxfmt); -#endif } diff --git a/mesalib/src/mesa/main/dlist.h b/mesalib/src/mesa/main/dlist.h index 89008431a..992a089f1 100644 --- a/mesalib/src/mesa/main/dlist.h +++ b/mesalib/src/mesa/main/dlist.h @@ -37,8 +37,6 @@ #include "main/mtypes.h" -#if FEATURE_dlist - #define _MESA_INIT_DLIST_VTXFMT(vfmt, impl) \ do { \ (vfmt)->CallList = impl ## CallList; \ @@ -70,32 +68,6 @@ extern void _mesa_install_dlist_vtxfmt(struct _glapi_table *disp, extern void _mesa_init_dlist_dispatch(struct _glapi_table *disp); -#else /* FEATURE_dlist */ - -#include "main/compiler.h" - -#define _MESA_INIT_DLIST_VTXFMT(vfmt, impl) do { } while (0) - -static inline void -_mesa_delete_list(struct gl_context *ctx, struct gl_display_list *dlist) -{ - /* there should be no list to delete */ - ASSERT_NO_FEATURE(); -} - -static inline void -_mesa_install_dlist_vtxfmt(struct _glapi_table *disp, - const GLvertexformat *vfmt) -{ -} - -static inline void -_mesa_init_dlist_dispatch(struct _glapi_table *disp) -{ -} - -#endif /* FEATURE_dlist */ - extern void _mesa_init_display_list( struct gl_context * ctx ); extern void _mesa_free_display_list_data(struct gl_context *ctx); diff --git a/mesalib/src/mesa/main/drawpix.c b/mesalib/src/mesa/main/drawpix.c index bd9837fdd..b5ab2cbeb 100644 --- a/mesalib/src/mesa/main/drawpix.c +++ b/mesalib/src/mesa/main/drawpix.c @@ -39,9 +39,6 @@ #include "fbobject.h" -#if FEATURE_drawpix - - /* * Execute glDrawPixels */ @@ -379,6 +376,3 @@ _mesa_init_drawpix_dispatch(struct _glapi_table *disp) SET_CopyPixels(disp, _mesa_CopyPixels); SET_DrawPixels(disp, _mesa_DrawPixels); } - - -#endif /* FEATURE_drawpix */ diff --git a/mesalib/src/mesa/main/drawpix.h b/mesalib/src/mesa/main/drawpix.h index 13efba5f8..971d258f1 100644 --- a/mesalib/src/mesa/main/drawpix.h +++ b/mesalib/src/mesa/main/drawpix.h @@ -32,19 +32,8 @@ struct _glapi_table; -#if FEATURE_drawpix - extern void _mesa_init_drawpix_dispatch(struct _glapi_table *disp); -#else /* FEATURE_drawpix */ - -static inline void -_mesa_init_drawpix_dispatch(struct _glapi_table *disp) -{ -} - -#endif /* FEATURE_drawpix */ - #endif /* DRAWPIX_H */ diff --git a/mesalib/src/mesa/main/drawtex.c b/mesalib/src/mesa/main/drawtex.c index 83485a928..d5cac22bd 100644 --- a/mesalib/src/mesa/main/drawtex.c +++ b/mesalib/src/mesa/main/drawtex.c @@ -28,9 +28,6 @@ #include "main/mtypes.h" -#if FEATURE_OES_draw_texture - - static void draw_texture(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height) @@ -133,5 +130,3 @@ _mesa_DrawTexxv(const GLfixed *coords) (GLfloat) coords[3] / 65536.0f, (GLfloat) coords[4] / 65536.0f); } - -#endif /* FEATURE_OES_draw_texture */ diff --git a/mesalib/src/mesa/main/drawtex.h b/mesalib/src/mesa/main/drawtex.h index 13ff6f97e..938b65fb2 100644 --- a/mesalib/src/mesa/main/drawtex.h +++ b/mesalib/src/mesa/main/drawtex.h @@ -29,8 +29,6 @@ #include "mfeatures.h" -#if FEATURE_OES_draw_texture - extern void GLAPIENTRY _mesa_DrawTexf(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height); @@ -55,7 +53,5 @@ _mesa_DrawTexx(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height); extern void GLAPIENTRY _mesa_DrawTexxv(const GLfixed *coords); -#endif /* FEATURE_OES_draw_texture */ - #endif /* DRAWTEX_H */ diff --git a/mesalib/src/mesa/main/enable.c b/mesalib/src/mesa/main/enable.c index 14eea53fe..3643cfb52 100644 --- a/mesalib/src/mesa/main/enable.c +++ b/mesalib/src/mesa/main/enable.c @@ -92,14 +92,11 @@ client_state(struct gl_context *ctx, GLenum cap, GLboolean state) flag = VERT_BIT_COLOR1; break; -#if FEATURE_point_size_array case GL_POINT_SIZE_ARRAY_OES: var = &arrayObj->VertexAttrib[VERT_ATTRIB_POINT_SIZE].Enabled; flag = VERT_BIT_POINT_SIZE; break; -#endif -#if FEATURE_NV_vertex_program case GL_VERTEX_ATTRIB_ARRAY0_NV: case GL_VERTEX_ATTRIB_ARRAY1_NV: case GL_VERTEX_ATTRIB_ARRAY2_NV: @@ -124,7 +121,6 @@ client_state(struct gl_context *ctx, GLenum cap, GLboolean state) flag = VERT_BIT_GENERIC(n); } break; -#endif /* FEATURE_NV_vertex_program */ /* GL_NV_primitive_restart */ case GL_PRIMITIVE_RESTART_NV: @@ -251,6 +247,23 @@ enable_texture(struct gl_context *ctx, GLboolean state, GLbitfield texBit) /** + * Helper function to enable or disable GL_MULTISAMPLE, skipping the check for + * whether the API supports it (GLES doesn't). + */ +void +_mesa_set_multisample(struct gl_context *ctx, GLboolean state) +{ + if (ctx->Multisample.Enabled == state) + return; + FLUSH_VERTICES(ctx, _NEW_MULTISAMPLE); + ctx->Multisample.Enabled = state; + + if (ctx->Driver.Enable) { + ctx->Driver.Enable(ctx, GL_MULTISAMPLE, state); + } +} + +/** * Helper function to enable or disable state. * * \param ctx GL context. @@ -298,7 +311,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) } } break; -#if FEATURE_userclip case GL_CLIP_DISTANCE0: case GL_CLIP_DISTANCE1: case GL_CLIP_DISTANCE2: @@ -328,7 +340,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) } } break; -#endif case GL_COLOR_MATERIAL: if (ctx->API != API_OPENGL && ctx->API != API_OPENGLES) goto invalid_enum_error; @@ -767,11 +778,8 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) case GL_MULTISAMPLE_ARB: if (!_mesa_is_desktop_gl(ctx) && ctx->API != API_OPENGLES) goto invalid_enum_error; - if (ctx->Multisample.Enabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_MULTISAMPLE); - ctx->Multisample.Enabled = state; - break; + _mesa_set_multisample(ctx, state); + return; case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB: if (ctx->Multisample.SampleAlphaToCoverage == state) return; @@ -823,7 +831,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) ctx->Point.PointSprite = state; break; -#if FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program case GL_VERTEX_PROGRAM_ARB: if (ctx->API != API_OPENGL) goto invalid_enum_error; @@ -854,8 +861,7 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) FLUSH_VERTICES(ctx, _NEW_PROGRAM); ctx->VertexProgram.TwoSideEnabled = state; break; -#endif -#if FEATURE_NV_vertex_program + case GL_MAP1_VERTEX_ATTRIB0_4_NV: case GL_MAP1_VERTEX_ATTRIB1_4_NV: case GL_MAP1_VERTEX_ATTRIB2_4_NV: @@ -906,9 +912,7 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) ctx->Eval.Map2Attrib[map] = state; } break; -#endif /* FEATURE_NV_vertex_program */ -#if FEATURE_NV_fragment_program case GL_FRAGMENT_PROGRAM_NV: if (ctx->API != API_OPENGL) goto invalid_enum_error; @@ -918,7 +922,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) FLUSH_VERTICES(ctx, _NEW_PROGRAM); ctx->FragmentProgram.Enabled = state; break; -#endif /* FEATURE_NV_fragment_program */ /* GL_NV_texture_rectangle */ case GL_TEXTURE_RECTANGLE_NV: @@ -946,7 +949,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) } break; -#if FEATURE_ARB_fragment_program case GL_FRAGMENT_PROGRAM_ARB: if (ctx->API != API_OPENGL) goto invalid_enum_error; @@ -956,7 +958,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) FLUSH_VERTICES(ctx, _NEW_PROGRAM); ctx->FragmentProgram.Enabled = state; break; -#endif /* FEATURE_ARB_fragment_program */ /* GL_EXT_depth_bounds_test */ case GL_DEPTH_BOUNDS_TEST_EXT: @@ -979,7 +980,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) ctx->Transform.DepthClamp = state; break; -#if FEATURE_ATI_fragment_shader case GL_FRAGMENT_SHADER_ATI: if (ctx->API != API_OPENGL) goto invalid_enum_error; @@ -989,7 +989,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) FLUSH_VERTICES(ctx, _NEW_PROGRAM); ctx->ATIFragmentShader.Enabled = state; break; -#endif /* GL_MESA_texture_array */ case GL_TEXTURE_1D_ARRAY_EXT: @@ -1020,7 +1019,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) } break; -#if FEATURE_EXT_transform_feedback case GL_RASTERIZER_DISCARD: if (!_mesa_is_desktop_gl(ctx) && !_mesa_is_gles3(ctx)) goto invalid_enum_error; @@ -1030,7 +1028,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) ctx->RasterDiscard = state; } break; -#endif /* GL 3.1 primitive restart. Note: this enum is different from * GL_PRIMITIVE_RESTART_NV (which is client state). @@ -1488,7 +1485,7 @@ _mesa_IsEnabled( GLenum cap ) goto invalid_enum_error; CHECK_EXTENSION(EXT_secondary_color); return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_COLOR1].Enabled != 0); -#if FEATURE_point_size_array +#if FEATURE_ES case GL_POINT_SIZE_ARRAY_OES: if (ctx->API != API_OPENGLES) goto invalid_enum_error; @@ -1539,7 +1536,6 @@ _mesa_IsEnabled( GLenum cap ) CHECK_EXTENSION2(NV_point_sprite, ARB_point_sprite) return ctx->Point.PointSprite; -#if FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program case GL_VERTEX_PROGRAM_ARB: if (ctx->API != API_OPENGL) goto invalid_enum_error; @@ -1558,8 +1554,7 @@ _mesa_IsEnabled( GLenum cap ) goto invalid_enum_error; CHECK_EXTENSION2(ARB_vertex_program, NV_vertex_program); return ctx->VertexProgram.TwoSideEnabled; -#endif -#if FEATURE_NV_vertex_program + case GL_VERTEX_ATTRIB_ARRAY0_NV: case GL_VERTEX_ATTRIB_ARRAY1_NV: case GL_VERTEX_ATTRIB_ARRAY2_NV: @@ -1630,15 +1625,12 @@ _mesa_IsEnabled( GLenum cap ) const GLuint map = (GLuint) (cap - GL_MAP2_VERTEX_ATTRIB0_4_NV); return ctx->Eval.Map2Attrib[map]; } -#endif /* FEATURE_NV_vertex_program */ -#if FEATURE_NV_fragment_program case GL_FRAGMENT_PROGRAM_NV: if (ctx->API != API_OPENGL) goto invalid_enum_error; CHECK_EXTENSION(NV_fragment_program); return ctx->FragmentProgram.Enabled; -#endif /* FEATURE_NV_fragment_program */ /* GL_NV_texture_rectangle */ case GL_TEXTURE_RECTANGLE_NV: @@ -1654,12 +1646,10 @@ _mesa_IsEnabled( GLenum cap ) CHECK_EXTENSION(EXT_stencil_two_side); return ctx->Stencil.TestTwoSide; -#if FEATURE_ARB_fragment_program case GL_FRAGMENT_PROGRAM_ARB: if (ctx->API != API_OPENGL) goto invalid_enum_error; return ctx->FragmentProgram.Enabled; -#endif /* FEATURE_ARB_fragment_program */ /* GL_EXT_depth_bounds_test */ case GL_DEPTH_BOUNDS_TEST_EXT: @@ -1675,13 +1665,11 @@ _mesa_IsEnabled( GLenum cap ) CHECK_EXTENSION(ARB_depth_clamp); return ctx->Transform.DepthClamp; -#if FEATURE_ATI_fragment_shader case GL_FRAGMENT_SHADER_ATI: if (ctx->API != API_OPENGL) goto invalid_enum_error; CHECK_EXTENSION(ATI_fragment_shader); return ctx->ATIFragmentShader.Enabled; -#endif /* FEATURE_ATI_fragment_shader */ case GL_TEXTURE_CUBE_MAP_SEAMLESS: if (!_mesa_is_desktop_gl(ctx)) @@ -1689,13 +1677,11 @@ _mesa_IsEnabled( GLenum cap ) CHECK_EXTENSION(ARB_seamless_cube_map); return ctx->Texture.CubeMapSeamless; -#if FEATURE_EXT_transform_feedback case GL_RASTERIZER_DISCARD: if (!_mesa_is_desktop_gl(ctx) && !_mesa_is_gles3(ctx)) goto invalid_enum_error; CHECK_EXTENSION(EXT_transform_feedback); return ctx->RasterDiscard; -#endif /* GL_NV_primitive_restart */ case GL_PRIMITIVE_RESTART_NV: diff --git a/mesalib/src/mesa/main/enable.h b/mesalib/src/mesa/main/enable.h index 6d90c170c..c49b4948d 100644 --- a/mesalib/src/mesa/main/enable.h +++ b/mesalib/src/mesa/main/enable.h @@ -67,5 +67,9 @@ _mesa_EnableClientState( GLenum cap ); extern void GLAPIENTRY _mesa_DisableClientState( GLenum cap ); +extern void +_mesa_set_multisample(struct gl_context *ctx, GLboolean state); + + #endif diff --git a/mesalib/src/mesa/main/eval.c b/mesalib/src/mesa/main/eval.c index ca1b33bd2..b0458a1e8 100644 --- a/mesalib/src/mesa/main/eval.c +++ b/mesalib/src/mesa/main/eval.c @@ -48,9 +48,6 @@ #include "main/dispatch.h" -#if FEATURE_evaluators - - /* * Return the number of components per control point for any type of * evaluator. Return 0 if bad target. @@ -924,9 +921,6 @@ _mesa_init_eval_dispatch(struct _glapi_table *disp) } -#endif /* FEATURE_evaluators */ - - /**********************************************************************/ /***** Initialization *****/ /**********************************************************************/ diff --git a/mesalib/src/mesa/main/eval.h b/mesalib/src/mesa/main/eval.h index c07d4d532..0649de052 100644 --- a/mesalib/src/mesa/main/eval.h +++ b/mesalib/src/mesa/main/eval.h @@ -41,8 +41,6 @@ #include "main/mtypes.h" -#if FEATURE_evaluators - #define _MESA_INIT_EVAL_VTXFMT(vfmt, impl) \ do { \ (vfmt)->EvalCoord1f = impl ## EvalCoord1f; \ @@ -83,23 +81,6 @@ _mesa_install_eval_vtxfmt(struct _glapi_table *disp, extern void _mesa_init_eval_dispatch(struct _glapi_table *disp); -#else /* FEATURE_evaluators */ - -#define _MESA_INIT_EVAL_VTXFMT(vfmt, impl) do { } while (0) - -static inline void -_mesa_install_eval_vtxfmt(struct _glapi_table *disp, - const GLvertexformat *vfmt) -{ -} - -static inline void -_mesa_init_eval_dispatch(struct _glapi_table *disp) -{ -} - -#endif /* FEATURE_evaluators */ - extern void _mesa_init_eval( struct gl_context *ctx ); extern void _mesa_free_eval_data( struct gl_context *ctx ); diff --git a/mesalib/src/mesa/main/extensions.c b/mesalib/src/mesa/main/extensions.c index e6f4541f0..bd7c7baf9 100644 --- a/mesalib/src/mesa/main/extensions.c +++ b/mesalib/src/mesa/main/extensions.c @@ -235,14 +235,10 @@ static const struct extension extension_table[] = { { "GL_OES_depth24", o(EXT_framebuffer_object), ES1 | ES2, 2005 }, { "GL_OES_depth32", o(dummy_false), DISABLE, 2005 }, { "GL_OES_depth_texture", o(ARB_depth_texture), ES2, 2006 }, -#if FEATURE_OES_draw_texture { "GL_OES_draw_texture", o(OES_draw_texture), ES1, 2004 }, -#endif -#if FEATURE_OES_EGL_image /* FIXME: Mesa expects GL_OES_EGL_image to be available in OpenGL contexts. */ { "GL_OES_EGL_image", o(OES_EGL_image), GL | ES1 | ES2, 2006 }, { "GL_OES_EGL_image_external", o(OES_EGL_image_external), ES1 | ES2, 2010 }, -#endif { "GL_OES_element_index_uint", o(dummy_true), ES1 | ES2, 2005 }, { "GL_OES_fbo_render_mipmap", o(EXT_framebuffer_object), ES1 | ES2, 2005 }, { "GL_OES_fixed_point", o(dummy_true), ES1, 2002 }, @@ -399,35 +395,23 @@ _mesa_enable_sw_extensions(struct gl_context *ctx) ctx->Extensions.ARB_draw_instanced = GL_TRUE; ctx->Extensions.ARB_explicit_attrib_location = GL_TRUE; ctx->Extensions.ARB_fragment_coord_conventions = GL_TRUE; -#if FEATURE_ARB_fragment_program ctx->Extensions.ARB_fragment_program = GL_TRUE; ctx->Extensions.ARB_fragment_program_shadow = GL_TRUE; -#endif -#if FEATURE_ARB_fragment_shader ctx->Extensions.ARB_fragment_shader = GL_TRUE; -#endif -#if FEATURE_ARB_framebuffer_object ctx->Extensions.ARB_framebuffer_object = GL_TRUE; -#endif -#if FEATURE_ARB_geometry_shader4 && 0 /* XXX re-enable when GLSL compiler again supports geometry shaders */ +#if 0 ctx->Extensions.ARB_geometry_shader4 = GL_TRUE; #endif ctx->Extensions.ARB_half_float_pixel = GL_TRUE; ctx->Extensions.ARB_half_float_vertex = GL_TRUE; ctx->Extensions.ARB_map_buffer_range = GL_TRUE; -#if FEATURE_queryobj ctx->Extensions.ARB_occlusion_query = GL_TRUE; ctx->Extensions.ARB_occlusion_query2 = GL_TRUE; -#endif ctx->Extensions.ARB_point_sprite = GL_TRUE; -#if FEATURE_ARB_shader_objects ctx->Extensions.ARB_shader_objects = GL_TRUE; ctx->Extensions.EXT_separate_shader_objects = GL_TRUE; -#endif -#if FEATURE_ARB_shading_language_100 ctx->Extensions.ARB_shading_language_100 = GL_TRUE; -#endif ctx->Extensions.ARB_shadow = GL_TRUE; ctx->Extensions.ARB_texture_border_clamp = GL_TRUE; ctx->Extensions.ARB_texture_cube_map = GL_TRUE; @@ -439,22 +423,12 @@ _mesa_enable_sw_extensions(struct gl_context *ctx) ctx->Extensions.ARB_texture_rg = GL_TRUE; ctx->Extensions.ARB_texture_compression_rgtc = GL_TRUE; ctx->Extensions.ARB_texture_storage = GL_TRUE; -#if FEATURE_ARB_vertex_program ctx->Extensions.ARB_vertex_program = GL_TRUE; -#endif -#if FEATURE_ARB_vertex_shader ctx->Extensions.ARB_vertex_shader = GL_TRUE; -#endif -#if FEATURE_ARB_sync ctx->Extensions.ARB_sync = GL_TRUE; -#endif -#if FEATURE_APPLE_object_purgeable ctx->Extensions.APPLE_object_purgeable = GL_TRUE; -#endif ctx->Extensions.ATI_envmap_bumpmap = GL_TRUE; -#if FEATURE_ATI_fragment_shader ctx->Extensions.ATI_fragment_shader = GL_TRUE; -#endif ctx->Extensions.ATI_texture_compression_3dc = GL_TRUE; ctx->Extensions.ATI_texture_env_combine3 = GL_TRUE; ctx->Extensions.ATI_texture_mirror_once = GL_TRUE; @@ -466,19 +440,11 @@ _mesa_enable_sw_extensions(struct gl_context *ctx) ctx->Extensions.EXT_depth_bounds_test = GL_TRUE; ctx->Extensions.EXT_draw_buffers2 = GL_TRUE; ctx->Extensions.EXT_fog_coord = GL_TRUE; -#if FEATURE_EXT_framebuffer_object ctx->Extensions.EXT_framebuffer_object = GL_TRUE; -#endif -#if FEATURE_EXT_framebuffer_blit ctx->Extensions.EXT_framebuffer_blit = GL_TRUE; -#endif -#if FEATURE_ARB_framebuffer_object ctx->Extensions.EXT_framebuffer_multisample = GL_TRUE; -#endif ctx->Extensions.EXT_packed_depth_stencil = GL_TRUE; -#if FEATURE_EXT_pixel_buffer_object ctx->Extensions.EXT_pixel_buffer_object = GL_TRUE; -#endif ctx->Extensions.EXT_point_parameters = GL_TRUE; ctx->Extensions.EXT_provoking_vertex = GL_TRUE; ctx->Extensions.EXT_shadow_funcs = GL_TRUE; @@ -490,14 +456,10 @@ _mesa_enable_sw_extensions(struct gl_context *ctx) ctx->Extensions.EXT_texture_filter_anisotropic = GL_TRUE; ctx->Extensions.EXT_texture_mirror_clamp = GL_TRUE; ctx->Extensions.EXT_texture_shared_exponent = GL_TRUE; -#if FEATURE_EXT_texture_sRGB ctx->Extensions.EXT_texture_sRGB = GL_TRUE; ctx->Extensions.EXT_texture_sRGB_decode = GL_TRUE; -#endif ctx->Extensions.EXT_texture_swizzle = GL_TRUE; -#if FEATURE_EXT_transform_feedback /*ctx->Extensions.EXT_transform_feedback = GL_TRUE;*/ -#endif ctx->Extensions.EXT_vertex_array_bgra = GL_TRUE; /*ctx->Extensions.IBM_multimode_draw_arrays = GL_TRUE;*/ ctx->Extensions.MESA_pack_invert = GL_TRUE; @@ -511,28 +473,16 @@ _mesa_enable_sw_extensions(struct gl_context *ctx) ctx->Extensions.NV_texture_env_combine4 = GL_TRUE; ctx->Extensions.NV_texture_rectangle = GL_TRUE; /*ctx->Extensions.NV_texgen_reflection = GL_TRUE;*/ -#if FEATURE_NV_vertex_program ctx->Extensions.NV_vertex_program = GL_TRUE; ctx->Extensions.NV_vertex_program1_1 = GL_TRUE; -#endif -#if FEATURE_NV_fragment_program ctx->Extensions.NV_fragment_program = GL_TRUE; -#endif -#if FEATURE_NV_fragment_program && FEATURE_ARB_fragment_program ctx->Extensions.NV_fragment_program_option = GL_TRUE; -#endif -#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program ctx->Extensions.EXT_gpu_program_parameters = GL_TRUE; -#endif -#if FEATURE_texture_fxt1 _mesa_enable_extension(ctx, "GL_3DFX_texture_compression_FXT1"); -#endif -#if FEATURE_texture_s3tc if (ctx->Mesa_DXTn) { _mesa_enable_extension(ctx, "GL_EXT_texture_compression_s3tc"); _mesa_enable_extension(ctx, "GL_S3_s3tc"); } -#endif } @@ -591,22 +541,14 @@ _mesa_enable_1_5_extensions(struct gl_context *ctx) void _mesa_enable_2_0_extensions(struct gl_context *ctx) { -#if FEATURE_ARB_fragment_shader ctx->Extensions.ARB_fragment_shader = GL_TRUE; -#endif ctx->Extensions.ARB_point_sprite = GL_TRUE; ctx->Extensions.EXT_blend_equation_separate = GL_TRUE; ctx->Extensions.ARB_texture_non_power_of_two = GL_TRUE; -#if FEATURE_ARB_shader_objects ctx->Extensions.ARB_shader_objects = GL_TRUE; -#endif -#if FEATURE_ARB_shading_language_100 ctx->Extensions.ARB_shading_language_100 = GL_TRUE; -#endif ctx->Extensions.EXT_stencil_two_side = GL_TRUE; -#if FEATURE_ARB_vertex_shader ctx->Extensions.ARB_vertex_shader = GL_TRUE; -#endif } @@ -617,12 +559,8 @@ _mesa_enable_2_0_extensions(struct gl_context *ctx) void _mesa_enable_2_1_extensions(struct gl_context *ctx) { -#if FEATURE_EXT_pixel_buffer_object ctx->Extensions.EXT_pixel_buffer_object = GL_TRUE; -#endif -#if FEATURE_EXT_texture_sRGB ctx->Extensions.EXT_texture_sRGB = GL_TRUE; -#endif } @@ -947,7 +885,7 @@ _mesa_get_enabled_extension(struct gl_context *ctx, GLuint index) base = (GLboolean*) &ctx->Extensions; n = 0; for (i = extension_table; i->name != 0; ++i) { - if (base[i->offset] & (i->api_set & (1 << ctx->API))) { + if (base[i->offset] && (i->api_set & (1 << ctx->API))) { if (n == index) return (const GLubyte*) i->name; else diff --git a/mesalib/src/mesa/main/fbobject.c b/mesalib/src/mesa/main/fbobject.c index abc9d83a6..1736899cb 100644 --- a/mesalib/src/mesa/main/fbobject.c +++ b/mesalib/src/mesa/main/fbobject.c @@ -819,7 +819,6 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, } } -#if FEATURE_GL if (_mesa_is_desktop_gl(ctx) && !ctx->Extensions.ARB_ES2_compatibility) { /* Check that all DrawBuffers are present */ for (j = 0; j < ctx->Const.MaxDrawBuffers; j++) { @@ -847,9 +846,6 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, } } } -#else - (void) j; -#endif if (numImages == 0) { fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT; @@ -1497,7 +1493,6 @@ renderbuffer_storage(GLenum target, GLenum internalFormat, } -#if FEATURE_OES_EGL_image void GLAPIENTRY _mesa_EGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image) { @@ -1528,7 +1523,6 @@ _mesa_EGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image) ctx->Driver.EGLImageTargetRenderbufferStorage(ctx, rb, image); } -#endif /** @@ -1734,7 +1728,6 @@ _mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer) } switch (target) { -#if FEATURE_EXT_framebuffer_blit case GL_DRAW_FRAMEBUFFER_EXT: if (!ctx->Extensions.EXT_framebuffer_blit) { _mesa_error(ctx, GL_INVALID_ENUM, "glBindFramebufferEXT(target)"); @@ -1751,7 +1744,6 @@ _mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer) bindDrawBuf = GL_FALSE; bindReadBuf = GL_TRUE; break; -#endif case GL_FRAMEBUFFER_EXT: bindDrawBuf = GL_TRUE; bindReadBuf = GL_TRUE; @@ -2659,8 +2651,6 @@ _mesa_GenerateMipmapEXT(GLenum target) } -#if FEATURE_EXT_framebuffer_blit - static const struct gl_renderbuffer_attachment * find_attachment(const struct gl_framebuffer *fb, const struct gl_renderbuffer *rb) @@ -3062,10 +3052,8 @@ _mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); } -#endif /* FEATURE_EXT_framebuffer_blit */ -#if FEATURE_ARB_geometry_shader4 void GLAPIENTRY _mesa_FramebufferTextureARB(GLenum target, GLenum attachment, GLuint texture, GLint level) @@ -3086,7 +3074,6 @@ _mesa_FramebufferTextureFaceARB(GLenum target, GLenum attachment, "glFramebufferTextureFaceARB " "not implemented!"); } -#endif /* FEATURE_ARB_geometry_shader4 */ static void invalidate_framebuffer_storage(GLenum target, GLsizei numAttachments, diff --git a/mesalib/src/mesa/main/feedback.c b/mesalib/src/mesa/main/feedback.c index f95e3b5d4..8a63acdf1 100644 --- a/mesalib/src/mesa/main/feedback.c +++ b/mesalib/src/mesa/main/feedback.c @@ -40,9 +40,6 @@ #include "main/dispatch.h" -#if FEATURE_feedback - - #define FB_3D 0x01 #define FB_4D 0x02 #define FB_COLOR 0x04 @@ -515,9 +512,6 @@ _mesa_init_feedback_dispatch(struct _glapi_table *disp) } -#endif /* FEATURE_feedback */ - - /**********************************************************************/ /** \name Initialization */ /*@{*/ diff --git a/mesalib/src/mesa/main/feedback.h b/mesalib/src/mesa/main/feedback.h index c64db3134..cc4cf15a8 100644 --- a/mesalib/src/mesa/main/feedback.h +++ b/mesalib/src/mesa/main/feedback.h @@ -31,8 +31,6 @@ #include "main/mtypes.h" -#if FEATURE_feedback - extern GLint GLAPIENTRY _mesa_RenderMode( GLenum mode ); @@ -60,41 +58,6 @@ _mesa_update_hitflag( struct gl_context *ctx, GLfloat z ); extern void _mesa_init_feedback_dispatch(struct _glapi_table *disp); -#else /* FEATURE_feedback */ - -#include "main/compiler.h" - -static inline void -_mesa_feedback_vertex( struct gl_context *ctx, - const GLfloat win[4], - const GLfloat color[4], - const GLfloat texcoord[4] ) -{ - /* render mode is always GL_RENDER */ - ASSERT_NO_FEATURE(); -} - - -static inline void -_mesa_feedback_token( struct gl_context *ctx, GLfloat token ) -{ - /* render mode is always GL_RENDER */ - ASSERT_NO_FEATURE(); -} - -static inline void -_mesa_update_hitflag( struct gl_context *ctx, GLfloat z ) -{ - /* render mode is always GL_RENDER */ - ASSERT_NO_FEATURE(); -} - -static inline void -_mesa_init_feedback_dispatch(struct _glapi_table *disp) -{ -} - -#endif /* FEATURE_feedback */ extern void _mesa_init_feedback( struct gl_context *ctx ); diff --git a/mesalib/src/mesa/main/ffvertex_prog.c b/mesalib/src/mesa/main/ffvertex_prog.c index e5ab20145..0a98c4acf 100644 --- a/mesalib/src/mesa/main/ffvertex_prog.c +++ b/mesalib/src/mesa/main/ffvertex_prog.c @@ -229,10 +229,8 @@ static void make_state_key( struct gl_context *ctx, struct state_key *key ) if (ctx->Point._Attenuated) key->point_attenuated = 1; -#if FEATURE_point_size_array if (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POINT_SIZE].Enabled) key->point_array = 1; -#endif if (ctx->Texture._TexGenEnabled || ctx->Texture._TexMatEnabled || diff --git a/mesalib/src/mesa/main/formats.c b/mesalib/src/mesa/main/formats.c index 1fa641c92..df23af1dd 100644 --- a/mesalib/src/mesa/main/formats.c +++ b/mesalib/src/mesa/main/formats.c @@ -2245,7 +2245,6 @@ _mesa_format_to_type_and_comps(gl_format format, *comps = 4; return; -#if FEATURE_EXT_texture_sRGB case MESA_FORMAT_SRGB8: *datatype = GL_UNSIGNED_BYTE; *comps = 3; @@ -2263,24 +2262,17 @@ _mesa_format_to_type_and_comps(gl_format format, *datatype = GL_UNSIGNED_BYTE; *comps = 2; return; -#endif -#if FEATURE_texture_fxt1 case MESA_FORMAT_RGB_FXT1: case MESA_FORMAT_RGBA_FXT1: -#endif -#if FEATURE_texture_s3tc case MESA_FORMAT_RGB_DXT1: case MESA_FORMAT_RGBA_DXT1: case MESA_FORMAT_RGBA_DXT3: case MESA_FORMAT_RGBA_DXT5: -#if FEATURE_EXT_texture_sRGB case MESA_FORMAT_SRGB_DXT1: case MESA_FORMAT_SRGBA_DXT1: case MESA_FORMAT_SRGBA_DXT3: case MESA_FORMAT_SRGBA_DXT5: -#endif -#endif case MESA_FORMAT_RED_RGTC1: case MESA_FORMAT_SIGNED_RED_RGTC1: case MESA_FORMAT_RG_RGTC2: diff --git a/mesalib/src/mesa/main/get.c b/mesalib/src/mesa/main/get.c index 6800cc353..14208504b 100644 --- a/mesalib/src/mesa/main/get.c +++ b/mesalib/src/mesa/main/get.c @@ -536,6 +536,11 @@ static const struct value_desc values[] = { /* GL_{APPLE,ARB,OES}_vertex_array_object */ { GL_VERTEX_ARRAY_BINDING_APPLE, ARRAY_INT(Name), NO_EXTRA }, + /* GL_EXT_texture_filter_anisotropic */ + { GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, + CONTEXT_FLOAT(Const.MaxTextureMaxAnisotropy), + extra_EXT_texture_filter_anisotropic }, + #if FEATURE_GL || FEATURE_ES1 /* Enums in OpenGL and GLES1 */ { 0, 0, TYPE_API_MASK, API_OPENGL_BIT | API_OPENGLES_BIT | API_OPENGL_CORE_BIT, NO_EXTRA }, @@ -685,11 +690,6 @@ static const struct value_desc values[] = { /* GL_EXT_texture_lod_bias */ { GL_MAX_TEXTURE_LOD_BIAS_EXT, CONTEXT_FLOAT(Const.MaxTextureLodBias), NO_EXTRA }, - - /* GL_EXT_texture_filter_anisotropic */ - { GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, - CONTEXT_FLOAT(Const.MaxTextureMaxAnisotropy), - extra_EXT_texture_filter_anisotropic }, #endif /* FEATURE_GL || FEATURE_ES1 */ #if FEATURE_ES1 @@ -2316,7 +2316,6 @@ _mesa_GetIntegerv(GLenum pname, GLint *params) } } -#if FEATURE_ARB_sync void GLAPIENTRY _mesa_GetInteger64v(GLenum pname, GLint64 *params) { @@ -2411,7 +2410,6 @@ _mesa_GetInteger64v(GLenum pname, GLint64 *params) break; } } -#endif /* FEATURE_ARB_sync */ void GLAPIENTRY _mesa_GetDoublev(GLenum pname, GLdouble *params) @@ -2684,7 +2682,6 @@ _mesa_GetIntegerIndexedv( GLenum pname, GLuint index, GLint *params ) } } -#if FEATURE_ARB_sync void GLAPIENTRY _mesa_GetInteger64Indexedv( GLenum pname, GLuint index, GLint64 *params ) { @@ -2709,7 +2706,6 @@ _mesa_GetInteger64Indexedv( GLenum pname, GLuint index, GLint64 *params ) ; /* nothing - GL error was recorded */ } } -#endif /* FEATURE_ARB_sync */ #if FEATURE_ES1 void GLAPIENTRY diff --git a/mesalib/src/mesa/main/getstring.c b/mesalib/src/mesa/main/getstring.c index 9c9ade359..54e518d2b 100644 --- a/mesalib/src/mesa/main/getstring.c +++ b/mesalib/src/mesa/main/getstring.c @@ -131,14 +131,10 @@ _mesa_GetString( GLenum name ) return (const GLubyte *) 0; } return (const GLubyte *) ctx->Extensions.String; -#if FEATURE_ARB_shading_language_100 || FEATURE_ES2 case GL_SHADING_LANGUAGE_VERSION: if (ctx->API == API_OPENGLES) break; return shading_language_version(ctx); -#endif -#if FEATURE_NV_fragment_program || FEATURE_ARB_fragment_program || \ - FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program case GL_PROGRAM_ERROR_STRING_NV: if (ctx->API == API_OPENGL && (ctx->Extensions.NV_fragment_program || @@ -148,7 +144,6 @@ _mesa_GetString( GLenum name ) return (const GLubyte *) ctx->Program.ErrorString; } break; -#endif default: break; } @@ -261,13 +256,11 @@ _mesa_GetPointerv( GLenum pname, GLvoid **params ) goto invalid_pname; *params = ctx->Select.Buffer; break; -#if FEATURE_point_size_array case GL_POINT_SIZE_ARRAY_POINTER_OES: if (ctx->API != API_OPENGLES) goto invalid_pname; *params = (GLvoid *) ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POINT_SIZE].Ptr; break; -#endif case GL_DEBUG_CALLBACK_FUNCTION_ARB: if (!_mesa_is_desktop_gl(ctx)) goto invalid_pname; diff --git a/mesalib/src/mesa/main/glformats.c b/mesalib/src/mesa/main/glformats.c index 2d06cb715..047a613a1 100644 --- a/mesalib/src/mesa/main/glformats.c +++ b/mesalib/src/mesa/main/glformats.c @@ -544,7 +544,6 @@ _mesa_is_color_format(GLenum format) case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: case GL_COMPRESSED_RGB_FXT1_3DFX: case GL_COMPRESSED_RGBA_FXT1_3DFX: -#if FEATURE_EXT_texture_sRGB case GL_SRGB_EXT: case GL_SRGB8_EXT: case GL_SRGB_ALPHA_EXT: @@ -561,7 +560,6 @@ _mesa_is_color_format(GLenum format) case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: case GL_COMPRESSED_SLUMINANCE_EXT: case GL_COMPRESSED_SLUMINANCE_ALPHA_EXT: -#endif /* FEATURE_EXT_texture_sRGB */ case GL_COMPRESSED_RED_RGTC1: case GL_COMPRESSED_SIGNED_RED_RGTC1: case GL_COMPRESSED_RG_RGTC2: diff --git a/mesalib/src/mesa/main/histogram.c b/mesalib/src/mesa/main/histogram.c index 44fc1325c..d3dc7ddc4 100644 --- a/mesalib/src/mesa/main/histogram.c +++ b/mesalib/src/mesa/main/histogram.c @@ -32,8 +32,6 @@ #include "main/dispatch.h" -#if FEATURE_histogram - /********************************************************************** * API functions */ @@ -169,5 +167,3 @@ _mesa_init_histogram_dispatch(struct _glapi_table *disp) SET_GetnHistogramARB(disp, _mesa_GetnHistogramARB); SET_GetnMinmaxARB(disp, _mesa_GetnMinmaxARB); } - -#endif /* FEATURE_histogram */ diff --git a/mesalib/src/mesa/main/histogram.h b/mesalib/src/mesa/main/histogram.h index d97e74abb..a9c312152 100644 --- a/mesalib/src/mesa/main/histogram.h +++ b/mesalib/src/mesa/main/histogram.h @@ -41,18 +41,7 @@ struct _glapi_table; -#if FEATURE_histogram - extern void _mesa_init_histogram_dispatch(struct _glapi_table *disp); -#else /* FEATURE_histogram */ - -static inline void -_mesa_init_histogram_dispatch(struct _glapi_table *disp) -{ -} - -#endif /* FEATURE_histogram */ - #endif /* HISTOGRAM_H */ diff --git a/mesalib/src/mesa/main/matrix.c b/mesalib/src/mesa/main/matrix.c index 5c3569c16..76f5ea7cd 100644 --- a/mesalib/src/mesa/main/matrix.c +++ b/mesalib/src/mesa/main/matrix.c @@ -572,7 +572,6 @@ update_projection( struct gl_context *ctx ) { _math_matrix_analyse( ctx->ProjectionMatrixStack.Top ); -#if FEATURE_userclip /* Recompute clip plane positions in clipspace. This is also done * in _mesa_ClipPlane(). */ @@ -586,7 +585,6 @@ update_projection( struct gl_context *ctx ) } } } -#endif } diff --git a/mesalib/src/mesa/main/mfeatures.h b/mesalib/src/mesa/main/mfeatures.h index b67f046ca..3162a0bbf 100644 --- a/mesalib/src/mesa/main/mfeatures.h +++ b/mesalib/src/mesa/main/mfeatures.h @@ -31,7 +31,6 @@ #ifndef FEATURES_H #define FEATURES_H - #ifndef _HAVE_FULL_GL #define _HAVE_FULL_GL 1 #endif @@ -39,32 +38,6 @@ /* assert that a feature is disabled and should never be used */ #define ASSERT_NO_FEATURE() ASSERT(0) -/** - * A feature can be anything. But most of them share certain characteristics. - * - * When a feature defines vtxfmt entries, they can be initialized and - * installed by - * _MESA_INIT_<FEATURE>_VTXFMT - * _mesa_install_<feature>_vtxfmt - * - * When a feature defines dispatch entries, they are initialized by - * _mesa_init_<feature>_dispatch - * - * When a feature has states, they are initialized and freed by - * _mesa_init_<feature> - * _mesa_free_<feature>_data - * - * Except for states, the others compile to no-op when a feature is disabled. - * - * The GLAPIENTRYs and helper functions defined by a feature should also - * compile to no-op when it is disabled. But to save typings and to catch - * bugs, some of them may be unavailable, or compile to ASSERT_NO_FEATURE() - * when the feature is disabled. - * - * A feature following the conventions may be used without knowing if it is - * enabled or not. - */ - #ifndef FEATURE_ES1 #define FEATURE_ES1 0 #endif @@ -84,62 +57,4 @@ #define FEATURE_remap_table 0 #endif -#define FEATURE_dispatch 1 -#define FEATURE_texgen 1 -#define FEATURE_userclip 1 - -#define FEATURE_accum FEATURE_GL -#define FEATURE_arrayelt FEATURE_GL -#define FEATURE_attrib_stack FEATURE_GL -/* this disables vtxfmt, api_loopback, and api_noop completely */ -#define FEATURE_beginend FEATURE_GL -#define FEATURE_colortable FEATURE_GL -#define FEATURE_convolve FEATURE_GL -#define FEATURE_dlist (FEATURE_GL && FEATURE_arrayelt && FEATURE_beginend) -#define FEATURE_draw_read_buffer FEATURE_GL -#define FEATURE_drawpix FEATURE_GL -#define FEATURE_evaluators FEATURE_GL -#define FEATURE_feedback FEATURE_GL -#define FEATURE_pixel_transfer FEATURE_GL -#define FEATURE_queryobj FEATURE_GL -#define FEATURE_rastpos FEATURE_GL -#define FEATURE_texture_fxt1 FEATURE_GL -#define FEATURE_texture_s3tc FEATURE_GL - -#define FEATURE_extra_context_init FEATURE_ES -#define FEATURE_point_size_array FEATURE_ES - -#define FEATURE_es2_glsl FEATURE_ES2 - -#define FEATURE_ARB_fragment_program 1 -#define FEATURE_ARB_vertex_program 1 -#define FEATURE_ARB_vertex_shader 1 -#define FEATURE_ARB_fragment_shader 1 -#define FEATURE_ARB_shader_objects (FEATURE_ARB_vertex_shader || FEATURE_ARB_fragment_shader) -#define FEATURE_ARB_shading_language_100 FEATURE_ARB_shader_objects -#define FEATURE_ARB_geometry_shader4 FEATURE_ARB_shader_objects - -#define FEATURE_ARB_framebuffer_object (FEATURE_GL && FEATURE_EXT_framebuffer_object) -#define FEATURE_ARB_map_buffer_range FEATURE_GL -#define FEATURE_ARB_pixel_buffer_object (FEATURE_GL && FEATURE_EXT_pixel_buffer_object) -#define FEATURE_ARB_sampler_objects FEATURE_GL -#define FEATURE_ARB_sync FEATURE_GL - -#define FEATURE_EXT_framebuffer_blit FEATURE_GL -#define FEATURE_EXT_framebuffer_object 1 -#define FEATURE_EXT_pixel_buffer_object 1 -#define FEATURE_EXT_texture_sRGB FEATURE_GL -#define FEATURE_EXT_transform_feedback FEATURE_GL - -#define FEATURE_APPLE_object_purgeable FEATURE_GL -#define FEATURE_ATI_fragment_shader FEATURE_GL -#define FEATURE_NV_fence FEATURE_GL -#define FEATURE_NV_fragment_program FEATURE_GL -#define FEATURE_NV_vertex_program FEATURE_GL - -#define FEATURE_OES_EGL_image 1 -#define FEATURE_OES_draw_texture FEATURE_ES1 -#define FEATURE_OES_framebuffer_object FEATURE_ES -#define FEATURE_OES_mapbuffer FEATURE_ES - #endif /* FEATURES_H */ diff --git a/mesalib/src/mesa/main/pixel.c b/mesalib/src/mesa/main/pixel.c index 450c936b7..f926c56a4 100644 --- a/mesalib/src/mesa/main/pixel.c +++ b/mesalib/src/mesa/main/pixel.c @@ -40,9 +40,6 @@ #include "main/dispatch.h" -#if FEATURE_pixel_transfer - - /**********************************************************************/ /***** glPixelZoom *****/ /**********************************************************************/ @@ -670,9 +667,6 @@ _mesa_init_pixel_dispatch(struct _glapi_table *disp) } -#endif /* FEATURE_pixel_transfer */ - - /**********************************************************************/ /***** Initialization *****/ /**********************************************************************/ diff --git a/mesalib/src/mesa/main/pixel.h b/mesalib/src/mesa/main/pixel.h index 797b0d9d6..bfd76d934 100644 --- a/mesalib/src/mesa/main/pixel.h +++ b/mesalib/src/mesa/main/pixel.h @@ -41,8 +41,6 @@ struct _glapi_table; struct gl_context; -#if FEATURE_pixel_transfer - extern void GLAPIENTRY _mesa_PixelTransferf(GLenum pname, GLfloat param); @@ -52,27 +50,6 @@ _mesa_update_pixel( struct gl_context *ctx, GLuint newstate ); extern void _mesa_init_pixel_dispatch( struct _glapi_table * disp ); -#else /* FEATURE_pixel_transfer */ - -static inline void GLAPIENTRY -_mesa_PixelTransferf(GLenum pname, GLfloat param) -{ -} - - -static inline void -_mesa_update_pixel(struct gl_context *ctx, GLuint newstate) -{ -} - -static inline void -_mesa_init_pixel_dispatch(struct _glapi_table *disp) -{ -} - -#endif /* FEATURE_pixel_transfer */ - - extern void _mesa_init_pixel( struct gl_context * ctx ); diff --git a/mesalib/src/mesa/main/pixelstore.c b/mesalib/src/mesa/main/pixelstore.c index d1e96aa8f..e56d5049f 100644 --- a/mesalib/src/mesa/main/pixelstore.c +++ b/mesalib/src/mesa/main/pixelstore.c @@ -270,10 +270,8 @@ _mesa_init_pixelstore( struct gl_context *ctx ) ctx->Pack.SwapBytes = GL_FALSE; ctx->Pack.LsbFirst = GL_FALSE; ctx->Pack.Invert = GL_FALSE; -#if FEATURE_EXT_pixel_buffer_object _mesa_reference_buffer_object(ctx, &ctx->Pack.BufferObj, ctx->Shared->NullBufferObj); -#endif ctx->Unpack.Alignment = 4; ctx->Unpack.RowLength = 0; ctx->Unpack.ImageHeight = 0; @@ -283,10 +281,8 @@ _mesa_init_pixelstore( struct gl_context *ctx ) ctx->Unpack.SwapBytes = GL_FALSE; ctx->Unpack.LsbFirst = GL_FALSE; ctx->Unpack.Invert = GL_FALSE; -#if FEATURE_EXT_pixel_buffer_object _mesa_reference_buffer_object(ctx, &ctx->Unpack.BufferObj, ctx->Shared->NullBufferObj); -#endif /* * _mesa_unpack_image() returns image data in this format. When we @@ -303,8 +299,6 @@ _mesa_init_pixelstore( struct gl_context *ctx ) ctx->DefaultPacking.SwapBytes = GL_FALSE; ctx->DefaultPacking.LsbFirst = GL_FALSE; ctx->DefaultPacking.Invert = GL_FALSE; -#if FEATURE_EXT_pixel_buffer_object _mesa_reference_buffer_object(ctx, &ctx->DefaultPacking.BufferObj, ctx->Shared->NullBufferObj); -#endif } diff --git a/mesalib/src/mesa/main/queryobj.c b/mesalib/src/mesa/main/queryobj.c index d5e2453e6..42c77bdb8 100644 --- a/mesalib/src/mesa/main/queryobj.c +++ b/mesalib/src/mesa/main/queryobj.c @@ -34,9 +34,6 @@ #include "main/dispatch.h" -#if FEATURE_queryobj - - /** * Allocate a new query object. This is a fallback routine called via * ctx->Driver.NewQueryObject(). @@ -155,7 +152,6 @@ get_query_binding_point(struct gl_context *ctx, GLenum target) return &ctx->Query.CurrentTimerObject; else return NULL; -#if FEATURE_EXT_transform_feedback case GL_PRIMITIVES_GENERATED: if (ctx->Extensions.EXT_transform_feedback) return &ctx->Query.PrimitivesGenerated; @@ -166,7 +162,6 @@ get_query_binding_point(struct gl_context *ctx, GLenum target) return &ctx->Query.PrimitivesWritten; else return NULL; -#endif default: return NULL; } @@ -734,9 +729,6 @@ _mesa_init_queryobj_dispatch(struct _glapi_table *disp) } -#endif /* FEATURE_queryobj */ - - /** * Allocate/init the context state related to query objects. */ diff --git a/mesalib/src/mesa/main/queryobj.h b/mesalib/src/mesa/main/queryobj.h index e7a133b59..0f662fb57 100644 --- a/mesalib/src/mesa/main/queryobj.h +++ b/mesalib/src/mesa/main/queryobj.h @@ -32,8 +32,6 @@ #include "main/hash.h" -#if FEATURE_queryobj - static inline struct gl_query_object * _mesa_lookup_query_object(struct gl_context *ctx, GLuint id) { @@ -48,26 +46,6 @@ _mesa_init_query_object_functions(struct dd_function_table *driver); extern void _mesa_init_queryobj_dispatch(struct _glapi_table *disp); -#else /* FEATURE_queryobj */ - -static inline struct gl_query_object * -_mesa_lookup_query_object(struct gl_context *ctx, GLuint id) -{ - return NULL; -} - -static inline void -_mesa_init_query_object_functions(struct dd_function_table *driver) -{ -} - -static inline void -_mesa_init_queryobj_dispatch(struct _glapi_table *disp) -{ -} - -#endif /* FEATURE_queryobj */ - extern void _mesa_init_queryobj(struct gl_context *ctx); diff --git a/mesalib/src/mesa/main/rastpos.c b/mesalib/src/mesa/main/rastpos.c index a1f6f4234..ab8e2c1a3 100644 --- a/mesalib/src/mesa/main/rastpos.c +++ b/mesalib/src/mesa/main/rastpos.c @@ -39,9 +39,6 @@ #include "main/dispatch.h" -#if FEATURE_rastpos - - /** * Helper function for all the RasterPos functions. */ @@ -533,9 +530,6 @@ _mesa_init_rastpos_dispatch(struct _glapi_table *disp) } -#endif /* FEATURE_rastpos */ - - /**********************************************************************/ /** \name Initialization */ /**********************************************************************/ diff --git a/mesalib/src/mesa/main/rastpos.h b/mesalib/src/mesa/main/rastpos.h index cdd94a66c..9bb04cc9c 100644 --- a/mesalib/src/mesa/main/rastpos.h +++ b/mesalib/src/mesa/main/rastpos.h @@ -38,20 +38,9 @@ struct _glapi_table; struct gl_context; -#if FEATURE_rastpos - extern void _mesa_init_rastpos_dispatch(struct _glapi_table *disp); -#else /* FEATURE_rastpos */ - -static inline void -_mesa_init_rastpos_dispatch(struct _glapi_table *disp) -{ -} - -#endif /* FEATURE_rastpos */ - extern void _mesa_init_rastpos(struct gl_context *ctx); diff --git a/mesalib/src/mesa/main/shaderapi.c b/mesalib/src/mesa/main/shaderapi.c index 643ef516f..c2ec1fa42 100644 --- a/mesalib/src/mesa/main/shaderapi.c +++ b/mesalib/src/mesa/main/shaderapi.c @@ -167,18 +167,12 @@ static bool validate_shader_target(const struct gl_context *ctx, GLenum type) { switch (type) { -#if FEATURE_ARB_fragment_shader case GL_FRAGMENT_SHADER: return ctx->Extensions.ARB_fragment_shader; -#endif -#if FEATURE_ARB_vertex_shader case GL_VERTEX_SHADER: return ctx->Extensions.ARB_vertex_shader; -#endif -#if FEATURE_ARB_geometry_shader4 case GL_GEOMETRY_SHADER_ARB: return _mesa_is_desktop_gl(ctx) && ctx->Extensions.ARB_geometry_shader4; -#endif default: return false; } @@ -473,21 +467,17 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, GLint *param struct gl_shader_program *shProg = _mesa_lookup_shader_program(ctx, program); -#if FEATURE_EXT_transform_feedback /* Is transform feedback available in this context? */ const bool has_xfb = (ctx->API == API_OPENGL && ctx->Extensions.EXT_transform_feedback) || ctx->API == API_OPENGL_CORE || _mesa_is_gles3(ctx); -#endif -#if FEATURE_ARB_geometry_shader4 /* Are geometry shaders available in this context? */ const bool has_gs = _mesa_is_desktop_gl(ctx) && ctx->Extensions.ARB_geometry_shader4; -#endif /* Are uniform buffer objects available in this context? */ @@ -542,7 +532,6 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, GLint *param *params = max_len; return; } -#if FEATURE_EXT_transform_feedback case GL_TRANSFORM_FEEDBACK_VARYINGS: if (!has_xfb) break; @@ -558,8 +547,6 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, GLint *param break; *params = shProg->TransformFeedback.BufferMode; return; -#endif -#if FEATURE_ARB_geometry_shader4 case GL_GEOMETRY_VERTICES_OUT_ARB: if (!has_gs) break; @@ -575,7 +562,6 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, GLint *param break; *params = shProg->Geom.OutputType; return; -#endif case GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH: { unsigned i; GLint max_len = 0; @@ -860,7 +846,6 @@ use_shader_program(struct gl_context *ctx, GLenum type, struct gl_shader_program **target; switch (type) { -#if FEATURE_ARB_vertex_shader case GL_VERTEX_SHADER: target = &ctx->Shader.CurrentVertexProgram; if ((shProg == NULL) @@ -868,8 +853,6 @@ use_shader_program(struct gl_context *ctx, GLenum type, shProg = NULL; } break; -#endif -#if FEATURE_ARB_geometry_shader4 case GL_GEOMETRY_SHADER_ARB: target = &ctx->Shader.CurrentGeometryProgram; if ((shProg == NULL) @@ -877,8 +860,6 @@ use_shader_program(struct gl_context *ctx, GLenum type, shProg = NULL; } break; -#endif -#if FEATURE_ARB_fragment_shader case GL_FRAGMENT_SHADER: target = &ctx->Shader.CurrentFragmentProgram; if ((shProg == NULL) @@ -886,7 +867,6 @@ use_shader_program(struct gl_context *ctx, GLenum type, shProg = NULL; } break; -#endif default: return false; } @@ -899,17 +879,12 @@ use_shader_program(struct gl_context *ctx, GLenum type, * semantics of glDeleteProgram are maintained. */ switch (type) { -#if FEATURE_ARB_vertex_shader case GL_VERTEX_SHADER: /* Empty for now. */ break; -#endif -#if FEATURE_ARB_geometry_shader4 case GL_GEOMETRY_SHADER_ARB: /* Empty for now. */ break; -#endif -#if FEATURE_ARB_fragment_shader case GL_FRAGMENT_SHADER: if (*target == ctx->Shader._CurrentFragmentProgram) { _mesa_reference_shader_program(ctx, @@ -917,7 +892,6 @@ use_shader_program(struct gl_context *ctx, GLenum type, NULL); } break; -#endif } _mesa_reference_shader_program(ctx, target, shProg); @@ -1533,8 +1507,6 @@ _mesa_ShaderBinary(GLint n, const GLuint* shaders, GLenum binaryformat, #endif /* FEATURE_ES2 */ -#if FEATURE_ARB_geometry_shader4 - void GLAPIENTRY _mesa_ProgramParameteriARB(GLuint program, GLenum pname, GLint value) { @@ -1596,8 +1568,6 @@ _mesa_ProgramParameteriARB(GLuint program, GLenum pname, GLint value) } } -#endif - void _mesa_use_shader_program(struct gl_context *ctx, GLenum type, struct gl_shader_program *shProg) @@ -1752,15 +1722,12 @@ _mesa_init_shader_dispatch(struct _glapi_table *exec) SET_IsProgram(exec, _mesa_IsProgram); SET_IsShader(exec, _mesa_IsShader); -#if FEATURE_ARB_vertex_shader + /* GL_ARB_vertex_shader */ SET_BindAttribLocationARB(exec, _mesa_BindAttribLocationARB); SET_GetActiveAttribARB(exec, _mesa_GetActiveAttribARB); SET_GetAttribLocationARB(exec, _mesa_GetAttribLocationARB); -#endif -#if FEATURE_ARB_geometry_shader4 SET_ProgramParameteriARB(exec, _mesa_ProgramParameteriARB); -#endif SET_UseShaderProgramEXT(exec, _mesa_UseShaderProgramEXT); SET_ActiveProgramEXT(exec, _mesa_ActiveProgramEXT); diff --git a/mesalib/src/mesa/main/shaderobj.c b/mesalib/src/mesa/main/shaderobj.c index c7f45c88e..1706cac55 100644 --- a/mesalib/src/mesa/main/shaderobj.c +++ b/mesalib/src/mesa/main/shaderobj.c @@ -243,11 +243,9 @@ _mesa_init_shader_program(struct gl_context *ctx, struct gl_shader_program *prog prog->FragDataBindings = string_to_uint_map_ctor(); prog->FragDataIndexBindings = string_to_uint_map_ctor(); -#if FEATURE_ARB_geometry_shader4 prog->Geom.VerticesOut = 0; prog->Geom.InputType = GL_TRIANGLES; prog->Geom.OutputType = GL_TRIANGLE_STRIP; -#endif prog->InfoLog = ralloc_strdup(prog, ""); } diff --git a/mesalib/src/mesa/main/shared.c b/mesalib/src/mesa/main/shared.c index 58cbc5250..fab2995a4 100644 --- a/mesalib/src/mesa/main/shared.c +++ b/mesalib/src/mesa/main/shared.c @@ -31,16 +31,12 @@ #include "mfeatures.h" #include "mtypes.h" #include "hash.h" -#if FEATURE_ATI_fragment_shader #include "atifragshader.h" -#endif #include "bufferobj.h" #include "shared.h" #include "program/program.h" #include "dlist.h" -#if FEATURE_ARB_sampler_objects #include "samplerobj.h" -#endif #include "shaderobj.h" #include "syncobj.h" @@ -70,33 +66,22 @@ _mesa_alloc_shared_state(struct gl_context *ctx) shared->TexObjects = _mesa_NewHashTable(); shared->Programs = _mesa_NewHashTable(); -#if FEATURE_ARB_vertex_program shared->DefaultVertexProgram = gl_vertex_program(ctx->Driver.NewProgram(ctx, GL_VERTEX_PROGRAM_ARB, 0)); -#endif - -#if FEATURE_ARB_fragment_program shared->DefaultFragmentProgram = gl_fragment_program(ctx->Driver.NewProgram(ctx, GL_FRAGMENT_PROGRAM_ARB, 0)); -#endif -#if FEATURE_ATI_fragment_shader shared->ATIShaders = _mesa_NewHashTable(); shared->DefaultFragmentShader = _mesa_new_ati_fragment_shader(ctx, 0); -#endif -#if FEATURE_ARB_shader_objects shared->ShaderObjects = _mesa_NewHashTable(); -#endif shared->BufferObjects = _mesa_NewHashTable(); -#if FEATURE_ARB_sampler_objects /* GL_ARB_sampler_objects */ shared->SamplerObjects = _mesa_NewHashTable(); -#endif /* Allocate the default buffer object */ shared->NullBufferObj = ctx->Driver.NewBufferObject(ctx, 0, 0); @@ -126,10 +111,8 @@ _mesa_alloc_shared_state(struct gl_context *ctx) _glthread_INIT_MUTEX(shared->TexMutex); shared->TextureStateStamp = 0; -#if FEATURE_EXT_framebuffer_object shared->FrameBuffers = _mesa_NewHashTable(); shared->RenderBuffers = _mesa_NewHashTable(); -#endif make_empty_list(& shared->SyncObjects); @@ -177,7 +160,6 @@ delete_program_cb(GLuint id, void *data, void *userData) } -#if FEATURE_ATI_fragment_shader /** * Callback for deleting an ATI fragment shader object. * Called by _mesa_HashDeleteAll(). @@ -189,7 +171,6 @@ delete_fragshader_cb(GLuint id, void *data, void *userData) struct gl_context *ctx = (struct gl_context *) userData; _mesa_delete_ati_fragment_shader(ctx, shader); } -#endif /** @@ -278,7 +259,6 @@ delete_renderbuffer_cb(GLuint id, void *data, void *userData) } -#if FEATURE_ARB_sampler_objects /** * Callback for deleting a sampler object. Called by _mesa_HashDeleteAll() */ @@ -289,7 +269,6 @@ delete_sampler_object_cb(GLuint id, void *data, void *userData) struct gl_sampler_object *sampObj = (struct gl_sampler_object *) data; _mesa_reference_sampler_object(ctx, &sampObj, NULL); } -#endif /** @@ -321,38 +300,27 @@ free_shared_state(struct gl_context *ctx, struct gl_shared_state *shared) _mesa_HashDeleteAll(shared->DisplayList, delete_displaylist_cb, ctx); _mesa_DeleteHashTable(shared->DisplayList); -#if FEATURE_ARB_shader_objects _mesa_HashWalk(shared->ShaderObjects, free_shader_program_data_cb, ctx); _mesa_HashDeleteAll(shared->ShaderObjects, delete_shader_cb, ctx); _mesa_DeleteHashTable(shared->ShaderObjects); -#endif _mesa_HashDeleteAll(shared->Programs, delete_program_cb, ctx); _mesa_DeleteHashTable(shared->Programs); -#if FEATURE_ARB_vertex_program _mesa_reference_vertprog(ctx, &shared->DefaultVertexProgram, NULL); -#endif - -#if FEATURE_ARB_fragment_program _mesa_reference_fragprog(ctx, &shared->DefaultFragmentProgram, NULL); -#endif -#if FEATURE_ATI_fragment_shader _mesa_HashDeleteAll(shared->ATIShaders, delete_fragshader_cb, ctx); _mesa_DeleteHashTable(shared->ATIShaders); _mesa_delete_ati_fragment_shader(ctx, shared->DefaultFragmentShader); -#endif _mesa_HashDeleteAll(shared->BufferObjects, delete_bufferobj_cb, ctx); _mesa_DeleteHashTable(shared->BufferObjects); -#if FEATURE_EXT_framebuffer_object _mesa_HashDeleteAll(shared->FrameBuffers, delete_framebuffer_cb, ctx); _mesa_DeleteHashTable(shared->FrameBuffers); _mesa_HashDeleteAll(shared->RenderBuffers, delete_renderbuffer_cb, ctx); _mesa_DeleteHashTable(shared->RenderBuffers); -#endif _mesa_reference_buffer_object(ctx, &shared->NullBufferObj, NULL); @@ -365,10 +333,8 @@ free_shared_state(struct gl_context *ctx, struct gl_shared_state *shared) } } -#if FEATURE_ARB_sampler_objects _mesa_HashDeleteAll(shared->SamplerObjects, delete_sampler_object_cb, ctx); _mesa_DeleteHashTable(shared->SamplerObjects); -#endif /* * Free texture objects (after FBOs since some textures might have diff --git a/mesalib/src/mesa/main/syncobj.c b/mesalib/src/mesa/main/syncobj.c index 1c09e421c..8927f46b0 100644 --- a/mesalib/src/mesa/main/syncobj.c +++ b/mesalib/src/mesa/main/syncobj.c @@ -64,7 +64,6 @@ #include "dispatch.h" #include "mtypes.h" -#if FEATURE_ARB_sync #include "syncobj.h" static struct gl_sync_object * @@ -426,5 +425,3 @@ _mesa_GetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, *length = size; } } - -#endif /* FEATURE_ARB_sync */ diff --git a/mesalib/src/mesa/main/syncobj.h b/mesalib/src/mesa/main/syncobj.h index e2e92b0ac..b0e09a605 100644 --- a/mesalib/src/mesa/main/syncobj.h +++ b/mesalib/src/mesa/main/syncobj.h @@ -39,8 +39,6 @@ struct dd_function_table; struct gl_context; struct gl_sync_object; -#if FEATURE_ARB_sync - extern void GLAPIENTRY _mesa_init_sync_object_functions(struct dd_function_table *driver); @@ -78,42 +76,4 @@ extern void GLAPIENTRY _mesa_GetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -#else /* FEATURE_ARB_sync */ - -#include "main/compiler.h" - -static inline void -_mesa_init_sync_object_functions(struct dd_function_table *driver) -{ -} - -static inline void -_mesa_init_sync_dispatch(struct _glapi_table *disp) -{ -} - -static inline void -_mesa_init_sync(struct gl_context *ctx) -{ -} - -static inline void -_mesa_free_sync_data(struct gl_context *ctx) -{ -} - -static inline void -_mesa_ref_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj) -{ - ASSERT_NO_FEATURE(); -} - -static inline void -_mesa_unref_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj) -{ - ASSERT_NO_FEATURE(); -} - -#endif /* FEATURE_ARB_sync */ - #endif /* SYNCOBJ_H */ diff --git a/mesalib/src/mesa/main/texcompress.c b/mesalib/src/mesa/main/texcompress.c index 846d4bb63..bb61e6eda 100644 --- a/mesalib/src/mesa/main/texcompress.c +++ b/mesalib/src/mesa/main/texcompress.c @@ -375,13 +375,10 @@ GLenum _mesa_compressed_format_to_glenum(struct gl_context *ctx, gl_format mesaFormat) { switch (mesaFormat) { -#if FEATURE_texture_fxt1 case MESA_FORMAT_RGB_FXT1: return GL_COMPRESSED_RGB_FXT1_3DFX; case MESA_FORMAT_RGBA_FXT1: return GL_COMPRESSED_RGBA_FXT1_3DFX; -#endif -#if FEATURE_texture_s3tc case MESA_FORMAT_RGB_DXT1: return GL_COMPRESSED_RGB_S3TC_DXT1_EXT; case MESA_FORMAT_RGBA_DXT1: @@ -390,7 +387,6 @@ _mesa_compressed_format_to_glenum(struct gl_context *ctx, gl_format mesaFormat) return GL_COMPRESSED_RGBA_S3TC_DXT3_EXT; case MESA_FORMAT_RGBA_DXT5: return GL_COMPRESSED_RGBA_S3TC_DXT5_EXT; -#if FEATURE_EXT_texture_sRGB case MESA_FORMAT_SRGB_DXT1: return GL_COMPRESSED_SRGB_S3TC_DXT1_EXT; case MESA_FORMAT_SRGBA_DXT1: @@ -399,9 +395,6 @@ _mesa_compressed_format_to_glenum(struct gl_context *ctx, gl_format mesaFormat) return GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT; case MESA_FORMAT_SRGBA_DXT5: return GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT; -#endif -#endif - case MESA_FORMAT_RED_RGTC1: return GL_COMPRESSED_RED_RGTC1; case MESA_FORMAT_SIGNED_RED_RGTC1: diff --git a/mesalib/src/mesa/main/texcompress_cpal.c b/mesalib/src/mesa/main/texcompress_cpal.c index ceeec9403..4aa1f610e 100644 --- a/mesalib/src/mesa/main/texcompress_cpal.c +++ b/mesalib/src/mesa/main/texcompress_cpal.c @@ -40,8 +40,6 @@ #include "texcompress_cpal.h" #include "teximage.h" -#if FEATURE_ES - static const struct cpal_format_info { GLenum cpal_format; @@ -226,5 +224,3 @@ _mesa_cpal_compressed_teximage2d(GLenum target, GLint level, if (saved_align != align) _mesa_PixelStorei(GL_UNPACK_ALIGNMENT, saved_align); } - -#endif diff --git a/mesalib/src/mesa/main/texcompress_fxt1.c b/mesalib/src/mesa/main/texcompress_fxt1.c index 92af29ad4..eeed78891 100644 --- a/mesalib/src/mesa/main/texcompress_fxt1.c +++ b/mesalib/src/mesa/main/texcompress_fxt1.c @@ -42,15 +42,12 @@ #include "swrast/s_context.h" -#if FEATURE_texture_fxt1 - - static void fxt1_encode (GLuint width, GLuint height, GLint comps, const void *source, GLint srcRowStride, void *dest, GLint destRowStride); -void +static void fxt1_decode_1 (const void *texture, GLint stride, GLint i, GLint j, GLubyte *rgba); @@ -1619,7 +1616,7 @@ fxt1_decode_1ALPHA (const GLubyte *code, GLint t, GLubyte *rgba) } -void +static void fxt1_decode_1 (const void *texture, GLint stride, /* in pixels */ GLint i, GLint j, GLubyte *rgba) { @@ -1646,6 +1643,3 @@ fxt1_decode_1 (const void *texture, GLint stride, /* in pixels */ decode_1[mode](code, t, rgba); } - - -#endif /* FEATURE_texture_fxt1 */ diff --git a/mesalib/src/mesa/main/texcompress_fxt1.h b/mesalib/src/mesa/main/texcompress_fxt1.h index bd84082e9..2a8b8d653 100644 --- a/mesalib/src/mesa/main/texcompress_fxt1.h +++ b/mesalib/src/mesa/main/texcompress_fxt1.h @@ -31,8 +31,6 @@ struct swrast_texture_image; -#if FEATURE_texture_fxt1 - extern GLboolean _mesa_texstore_rgb_fxt1(TEXSTORE_PARAMS); @@ -47,16 +45,4 @@ extern void _mesa_fetch_texel_2d_f_rgb_fxt1(const struct swrast_texture_image *texImage, GLint i, GLint j, GLint k, GLfloat *texel); -#else /* FEATURE_texture_fxt1 */ - -/* these are used only in texstore_funcs[] */ -#define _mesa_texstore_rgb_fxt1 NULL -#define _mesa_texstore_rgba_fxt1 NULL - -/* these are used only in texfetch_funcs[] */ -#define _mesa_fetch_texel_2d_f_rgba_fxt1 NULL -#define _mesa_fetch_texel_2d_f_rgb_fxt1 NULL - -#endif /* FEATURE_texture_fxt1 */ - #endif /* TEXCOMPRESS_FXT1_H */ diff --git a/mesalib/src/mesa/main/texcompress_s3tc.c b/mesalib/src/mesa/main/texcompress_s3tc.c index 215d7a385..d4288a6f8 100644 --- a/mesalib/src/mesa/main/texcompress_s3tc.c +++ b/mesalib/src/mesa/main/texcompress_s3tc.c @@ -47,9 +47,6 @@ #include "swrast/s_context.h" -#if FEATURE_texture_s3tc - - #if defined(_WIN32) || defined(WIN32) #ifdef _DEBUG #define DXTN_LIBNAME "dxtn_dbg.dll" @@ -64,7 +61,6 @@ #define DXTN_LIBNAME "libtxc_dxtn.so" #endif -#if FEATURE_EXT_texture_sRGB /** * Convert an 8-bit sRGB value from non-linear space to a * linear RGB value in [0, 1]. @@ -91,14 +87,13 @@ nonlinear_to_linear(GLubyte cs8) } return table[cs8]; } -#endif /* FEATURE_EXT_texture_sRGB */ typedef void (*dxtFetchTexelFuncExt)( GLint srcRowstride, GLubyte *pixdata, GLint col, GLint row, GLvoid *texelOut ); -dxtFetchTexelFuncExt fetch_ext_rgb_dxt1 = NULL; -dxtFetchTexelFuncExt fetch_ext_rgba_dxt1 = NULL; -dxtFetchTexelFuncExt fetch_ext_rgba_dxt3 = NULL; -dxtFetchTexelFuncExt fetch_ext_rgba_dxt5 = NULL; +static dxtFetchTexelFuncExt fetch_ext_rgb_dxt1 = NULL; +static dxtFetchTexelFuncExt fetch_ext_rgba_dxt1 = NULL; +static dxtFetchTexelFuncExt fetch_ext_rgba_dxt3 = NULL; +static dxtFetchTexelFuncExt fetch_ext_rgba_dxt5 = NULL; typedef void (*dxtCompressTexFuncExt)(GLint srccomps, GLint width, GLint height, const GLubyte *srcPixData, @@ -482,7 +477,6 @@ _mesa_fetch_texel_rgba_dxt5(const struct swrast_texture_image *texImage, texel[ACOMP] = UBYTE_TO_FLOAT(rgba[ACOMP]); } -#if FEATURE_EXT_texture_sRGB void _mesa_fetch_texel_srgb_dxt1(const struct swrast_texture_image *texImage, GLint i, GLint j, GLint k, GLfloat *texel) @@ -534,7 +528,3 @@ _mesa_fetch_texel_srgba_dxt5(const struct swrast_texture_image *texImage, texel[BCOMP] = nonlinear_to_linear(rgba[BCOMP]); texel[ACOMP] = UBYTE_TO_FLOAT(rgba[ACOMP]); } -#endif /* FEATURE_EXT_texture_sRGB */ - - -#endif /* FEATURE_texture_s3tc */ diff --git a/mesalib/src/mesa/main/texcompress_s3tc.h b/mesalib/src/mesa/main/texcompress_s3tc.h index 2c06e50ce..524ac0c13 100644 --- a/mesalib/src/mesa/main/texcompress_s3tc.h +++ b/mesalib/src/mesa/main/texcompress_s3tc.h @@ -33,8 +33,6 @@ struct gl_context; struct swrast_texture_image; -#if FEATURE_texture_s3tc - extern GLboolean _mesa_texstore_rgb_dxt1(TEXSTORE_PARAMS); @@ -82,29 +80,4 @@ _mesa_fetch_texel_srgba_dxt5(const struct swrast_texture_image *texImage, extern void _mesa_init_texture_s3tc(struct gl_context *ctx); -#else /* FEATURE_texture_s3tc */ - -/* these are used only in texstore_funcs[] */ -#define _mesa_texstore_rgb_dxt1 NULL -#define _mesa_texstore_rgba_dxt1 NULL -#define _mesa_texstore_rgba_dxt3 NULL -#define _mesa_texstore_rgba_dxt5 NULL - -/* these are used only in texfetch_funcs[] */ -#define _mesa_fetch_texel_2d_f_rgb_dxt1 NULL -#define _mesa_fetch_texel_2d_f_rgba_dxt1 NULL -#define _mesa_fetch_texel_2d_f_rgba_dxt3 NULL -#define _mesa_fetch_texel_2d_f_rgba_dxt5 NULL -#define _mesa_fetch_texel_2d_f_srgb_dxt1 NULL -#define _mesa_fetch_texel_2d_f_srgba_dxt1 NULL -#define _mesa_fetch_texel_2d_f_srgba_dxt3 NULL -#define _mesa_fetch_texel_2d_f_srgba_dxt5 NULL - -static inline void -_mesa_init_texture_s3tc(struct gl_context *ctx) -{ -} - -#endif /* FEATURE_texture_s3tc */ - #endif /* TEXCOMPRESS_S3TC_H */ diff --git a/mesalib/src/mesa/main/texformat.c b/mesalib/src/mesa/main/texformat.c index 1a318abe4..17270ba92 100644 --- a/mesalib/src/mesa/main/texformat.c +++ b/mesalib/src/mesa/main/texformat.c @@ -289,7 +289,6 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, } } -#if FEATURE_texture_fxt1 if (ctx->Extensions.TDFX_texture_compression_FXT1) { switch (internalFormat) { case GL_COMPRESSED_RGB_FXT1_3DFX: @@ -302,9 +301,7 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, ; /* fallthrough */ } } -#endif -#if FEATURE_texture_s3tc if (ctx->Extensions.EXT_texture_compression_s3tc) { switch (internalFormat) { case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: @@ -338,7 +335,6 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, ; /* fallthrough */ } } -#endif if (ctx->Extensions.ARB_texture_float) { switch (internalFormat) { @@ -555,7 +551,6 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, } } -#if FEATURE_EXT_texture_sRGB if (ctx->Extensions.EXT_texture_sRGB) { switch (internalFormat) { case GL_SRGB_EXT: @@ -587,22 +582,17 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8); break; case GL_COMPRESSED_SRGB_EXT: -#if FEATURE_texture_s3tc if (ctx->Extensions.EXT_texture_compression_s3tc) RETURN_IF_SUPPORTED(MESA_FORMAT_SRGB_DXT1); -#endif RETURN_IF_SUPPORTED(MESA_FORMAT_SRGB8); RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8); break; case GL_COMPRESSED_SRGB_ALPHA_EXT: -#if FEATURE_texture_s3tc if (ctx->Extensions.EXT_texture_compression_s3tc) RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA_DXT3); /* Not srgba_dxt1, see spec */ -#endif RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA8); RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8); break; -#if FEATURE_texture_s3tc case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT: if (ctx->Extensions.EXT_texture_compression_s3tc) RETURN_IF_SUPPORTED(MESA_FORMAT_SRGB_DXT1); @@ -623,12 +613,10 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA_DXT5); RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8); break; -#endif default: ; /* fallthrough */ } } -#endif /* FEATURE_EXT_texture_sRGB */ if (ctx->Extensions.EXT_texture_integer) { switch (internalFormat) { diff --git a/mesalib/src/mesa/main/texgen.c b/mesalib/src/mesa/main/texgen.c index 3788669d4..0b0f67335 100644 --- a/mesalib/src/mesa/main/texgen.c +++ b/mesalib/src/mesa/main/texgen.c @@ -41,9 +41,6 @@ #include "main/dispatch.h" -#if FEATURE_texgen - - /** * Return texgen state for given coordinate */ @@ -441,6 +438,3 @@ _mesa_init_texgen_dispatch(struct _glapi_table *disp) SET_TexGeni(disp, _mesa_TexGeni); SET_TexGeniv(disp, _mesa_TexGeniv); } - - -#endif /* FEATURE_texgen */ diff --git a/mesalib/src/mesa/main/texgen.h b/mesalib/src/mesa/main/texgen.h index 1d13422b2..35a799587 100644 --- a/mesalib/src/mesa/main/texgen.h +++ b/mesalib/src/mesa/main/texgen.h @@ -34,8 +34,6 @@ struct _glapi_table; -#if FEATURE_texgen - extern void GLAPIENTRY _mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params ); @@ -65,24 +63,4 @@ extern void GLAPIENTRY _es_TexGenfv(GLenum coord, GLenum pname, const GLfloat *params); -#else /* FEATURE_texgen */ - -static void -_mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params ) -{ -} - -static void inline -_mesa_TexGeni( GLenum coord, GLenum pname, GLint param ) -{ -} - -static inline void -_mesa_init_texgen_dispatch(struct _glapi_table *disp) -{ -} - -#endif /* FEATURE_texgen */ - - #endif /* TEXGEN_H */ diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c index 02bd87ac6..da8fbcd32 100644 --- a/mesalib/src/mesa/main/teximage.c +++ b/mesalib/src/mesa/main/teximage.c @@ -311,7 +311,6 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat ) } } -#if FEATURE_EXT_texture_sRGB if (ctx->Extensions.EXT_texture_sRGB) { switch (internalFormat) { case GL_SRGB_EXT: @@ -338,7 +337,6 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat ) ; /* fallthrough */ } } -#endif /* FEATURE_EXT_texture_sRGB */ if (ctx->Version >= 30 || ctx->Extensions.EXT_texture_integer) { @@ -3134,7 +3132,6 @@ _mesa_TexImage3DEXT( GLenum target, GLint level, GLenum internalFormat, } -#if FEATURE_OES_EGL_image void GLAPIENTRY _mesa_EGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image) { @@ -3189,7 +3186,6 @@ _mesa_EGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image) _mesa_unlock_texture(ctx, texObj); } -#endif diff --git a/mesalib/src/mesa/main/texparam.c b/mesalib/src/mesa/main/texparam.c index e6140eb65..63a63b732 100644 --- a/mesalib/src/mesa/main/texparam.c +++ b/mesalib/src/mesa/main/texparam.c @@ -428,7 +428,6 @@ set_tex_parameteri(struct gl_context *ctx, } goto invalid_pname; -#if FEATURE_OES_draw_texture case GL_TEXTURE_CROP_RECT_OES: if (ctx->API != API_OPENGLES || !ctx->Extensions.OES_draw_texture) goto invalid_pname; @@ -438,7 +437,6 @@ set_tex_parameteri(struct gl_context *ctx, texObj->CropRect[2] = params[2]; texObj->CropRect[3] = params[3]; return GL_TRUE; -#endif case GL_TEXTURE_SWIZZLE_R_EXT: case GL_TEXTURE_SWIZZLE_G_EXT: @@ -728,8 +726,6 @@ _mesa_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params) need_update = set_tex_parameteri(ctx, texObj, pname, p); } break; - -#if FEATURE_OES_draw_texture case GL_TEXTURE_CROP_RECT_OES: { /* convert float params to int */ @@ -741,8 +737,6 @@ _mesa_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params) need_update = set_tex_parameteri(ctx, texObj, pname, iparams); } break; -#endif - case GL_TEXTURE_SWIZZLE_R_EXT: case GL_TEXTURE_SWIZZLE_G_EXT: case GL_TEXTURE_SWIZZLE_B_EXT: @@ -1398,7 +1392,6 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params ) *params = obj->Sampler.LodBias; break; -#if FEATURE_OES_draw_texture case GL_TEXTURE_CROP_RECT_OES: if (ctx->API != API_OPENGLES || !ctx->Extensions.OES_draw_texture) goto invalid_pname; @@ -1408,7 +1401,6 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params ) params[2] = obj->CropRect[2]; params[3] = obj->CropRect[3]; break; -#endif case GL_TEXTURE_SWIZZLE_R_EXT: case GL_TEXTURE_SWIZZLE_G_EXT: @@ -1573,7 +1565,6 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params ) *params = (GLint) obj->Sampler.LodBias; break; -#if FEATURE_OES_draw_texture case GL_TEXTURE_CROP_RECT_OES: if (ctx->API != API_OPENGLES || !ctx->Extensions.OES_draw_texture) goto invalid_pname; @@ -1583,7 +1574,6 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params ) params[2] = obj->CropRect[2]; params[3] = obj->CropRect[3]; break; -#endif case GL_TEXTURE_SWIZZLE_R_EXT: case GL_TEXTURE_SWIZZLE_G_EXT: case GL_TEXTURE_SWIZZLE_B_EXT: diff --git a/mesalib/src/mesa/main/texstate.c b/mesalib/src/mesa/main/texstate.c index fa1fef27e..1fd09e985 100644 --- a/mesalib/src/mesa/main/texstate.c +++ b/mesalib/src/mesa/main/texstate.c @@ -841,11 +841,9 @@ _mesa_free_texture_data(struct gl_context *ctx) /* GL_ARB_texture_buffer_object */ _mesa_reference_buffer_object(ctx, &ctx->Texture.BufferObject, NULL); -#if FEATURE_sampler_objects for (u = 0; u < Elements(ctx->Texture.Unit); u++) { _mesa_reference_sampler_object(ctx, &ctx->Texture.Unit[u].Sampler, NULL); } -#endif } diff --git a/mesalib/src/mesa/main/texstore.c b/mesalib/src/mesa/main/texstore.c index 2d055808e..e2598a1dc 100644 --- a/mesalib/src/mesa/main/texstore.c +++ b/mesalib/src/mesa/main/texstore.c @@ -3604,9 +3604,6 @@ _mesa_texstore_rgba_uint32(TEXSTORE_PARAMS) } - - -#if FEATURE_EXT_texture_sRGB static GLboolean _mesa_texstore_srgb8(TEXSTORE_PARAMS) { @@ -3710,17 +3707,6 @@ _mesa_texstore_sla8(TEXSTORE_PARAMS) return k; } -#else - -/* these are used only in texstore_funcs[] below */ -#define _mesa_texstore_srgb8 NULL -#define _mesa_texstore_srgba8 NULL -#define _mesa_texstore_sargb8 NULL -#define _mesa_texstore_sl8 NULL -#define _mesa_texstore_sla8 NULL - -#endif /* FEATURE_EXT_texture_sRGB */ - static GLboolean _mesa_texstore_rgb9_e5(TEXSTORE_PARAMS) { diff --git a/mesalib/src/mesa/main/transformfeedback.c b/mesalib/src/mesa/main/transformfeedback.c index 26345b100..ea6cfdf8c 100644 --- a/mesalib/src/mesa/main/transformfeedback.c +++ b/mesalib/src/mesa/main/transformfeedback.c @@ -44,9 +44,6 @@ #include "program/prog_parameter.h" -#if FEATURE_EXT_transform_feedback - - /** * Do reference counting of transform feedback buffers. */ @@ -171,40 +168,6 @@ _mesa_free_transform_feedback(struct gl_context *ctx) } -#else /* FEATURE_EXT_transform_feedback */ - -/* forward declarations */ -static struct gl_transform_feedback_object * -new_transform_feedback(struct gl_context *ctx, GLuint name); - -static void -delete_transform_feedback(struct gl_context *ctx, - struct gl_transform_feedback_object *obj); - -/* dummy per-context init/clean-up for transform feedback */ -void -_mesa_init_transform_feedback(struct gl_context *ctx) -{ - ctx->TransformFeedback.DefaultObject = new_transform_feedback(ctx, 0); - ctx->TransformFeedback.CurrentObject = ctx->TransformFeedback.DefaultObject; - _mesa_reference_buffer_object(ctx, - &ctx->TransformFeedback.CurrentBuffer, - ctx->Shared->NullBufferObj); -} - -void -_mesa_free_transform_feedback(struct gl_context *ctx) -{ - _mesa_reference_buffer_object(ctx, - &ctx->TransformFeedback.CurrentBuffer, - NULL); - ctx->TransformFeedback.CurrentObject = NULL; - delete_transform_feedback(ctx, ctx->TransformFeedback.DefaultObject); -} - -#endif /* FEATURE_EXT_transform_feedback */ - - /** Default fallback for ctx->Driver.NewTransformFeedback() */ static struct gl_transform_feedback_object * new_transform_feedback(struct gl_context *ctx, GLuint name) @@ -233,9 +196,6 @@ delete_transform_feedback(struct gl_context *ctx, } -#if FEATURE_EXT_transform_feedback - - /** Default fallback for ctx->Driver.BeginTransformFeedback() */ static void begin_transform_feedback(struct gl_context *ctx, GLenum mode, @@ -901,5 +861,3 @@ _mesa_ResumeTransformFeedback(void) assert(ctx->Driver.ResumeTransformFeedback); ctx->Driver.ResumeTransformFeedback(ctx, obj); } - -#endif /* FEATURE_EXT_transform_feedback */ diff --git a/mesalib/src/mesa/main/transformfeedback.h b/mesalib/src/mesa/main/transformfeedback.h index 85f4cbc77..7d4a945c5 100644 --- a/mesalib/src/mesa/main/transformfeedback.h +++ b/mesalib/src/mesa/main/transformfeedback.h @@ -39,8 +39,6 @@ _mesa_init_transform_feedback(struct gl_context *ctx); extern void _mesa_free_transform_feedback(struct gl_context *ctx); -#if FEATURE_EXT_transform_feedback - extern GLboolean _mesa_validate_transform_feedback_buffers(struct gl_context *ctx); @@ -110,30 +108,4 @@ _mesa_PauseTransformFeedback(void); extern void GLAPIENTRY _mesa_ResumeTransformFeedback(void); -#else /* FEATURE_EXT_transform_feedback */ - -static inline GLboolean -_mesa_validate_primitive_mode(struct gl_context *ctx, GLenum mode) -{ - return GL_TRUE; -} - -static inline GLboolean -_mesa_validate_transform_feedback_buffers(struct gl_context *ctx) -{ - return GL_TRUE; -} - -static inline void -_mesa_init_transform_feedback_functions(struct dd_function_table *driver) -{ -} - -static inline void -_mesa_init_transform_feedback_dispatch(struct _glapi_table *disp) -{ -} - -#endif /* FEATURE_EXT_transform_feedback */ - #endif /* TRANSFORM_FEEDBACK_H */ diff --git a/mesalib/src/mesa/main/varray.c b/mesalib/src/mesa/main/varray.c index 91452b75f..9a2dec61b 100644 --- a/mesalib/src/mesa/main/varray.c +++ b/mesalib/src/mesa/main/varray.c @@ -431,7 +431,6 @@ _mesa_PointSizePointer(GLenum type, GLsizei stride, const GLvoid *ptr) } -#if FEATURE_NV_vertex_program /** * Set a vertex attribute array. * Note that these arrays DO alias the conventional GL vertex arrays @@ -462,10 +461,8 @@ _mesa_VertexAttribPointerNV(GLuint index, GLint size, GLenum type, legalTypes, 1, BGRA_OR_4, size, type, stride, normalized, GL_FALSE, ptr); } -#endif -#if FEATURE_ARB_vertex_program /** * Set a generic vertex attribute array. * Note that these arrays DO NOT alias the conventional GL vertex arrays @@ -495,7 +492,6 @@ _mesa_VertexAttribPointerARB(GLuint index, GLint size, GLenum type, legalTypes, 1, BGRA_OR_4, size, type, stride, normalized, GL_FALSE, ptr); } -#endif /** diff --git a/mesalib/src/mesa/main/varray.h b/mesalib/src/mesa/main/varray.h index b6041bd78..d48361256 100644 --- a/mesalib/src/mesa/main/varray.h +++ b/mesalib/src/mesa/main/varray.h @@ -245,13 +245,9 @@ _mesa_DrawRangeElementsBaseVertex(GLenum mode, GLuint start, GLuint end, const GLvoid *indices, GLint basevertex); -#if FEATURE_EXT_transform_feedback - extern void GLAPIENTRY _mesa_DrawTransformFeedback(GLenum mode, GLuint name); -#endif - extern void GLAPIENTRY _mesa_PrimitiveRestartIndex(GLuint index); diff --git a/mesalib/src/mesa/main/vtxfmt.c b/mesalib/src/mesa/main/vtxfmt.c index 2b6e25ecd..725ac2047 100644 --- a/mesalib/src/mesa/main/vtxfmt.c +++ b/mesalib/src/mesa/main/vtxfmt.c @@ -38,8 +38,6 @@ #include "main/dispatch.h" -#if FEATURE_beginend - /** * Use the per-vertex functions found in <vfmt> to initialize the given * API dispatch table. @@ -136,7 +134,6 @@ install_vtxfmt(struct gl_context *ctx, struct _glapi_table *tab, SET_VertexAttrib3fvNV(tab, vfmt->VertexAttrib3fvNV); SET_VertexAttrib4fNV(tab, vfmt->VertexAttrib4fNV); SET_VertexAttrib4fvNV(tab, vfmt->VertexAttrib4fvNV); -#if FEATURE_ARB_vertex_program SET_VertexAttrib1fARB(tab, vfmt->VertexAttrib1fARB); SET_VertexAttrib1fvARB(tab, vfmt->VertexAttrib1fvARB); SET_VertexAttrib2fARB(tab, vfmt->VertexAttrib2fARB); @@ -145,7 +142,6 @@ install_vtxfmt(struct gl_context *ctx, struct _glapi_table *tab, SET_VertexAttrib3fvARB(tab, vfmt->VertexAttrib3fvARB); SET_VertexAttrib4fARB(tab, vfmt->VertexAttrib4fARB); SET_VertexAttrib4fvARB(tab, vfmt->VertexAttrib4fvARB); -#endif /* GL_EXT_gpu_shader4 / OpenGL 3.0 */ SET_VertexAttribI1iEXT(tab, vfmt->VertexAttribI1i); @@ -235,6 +231,3 @@ _mesa_install_save_vtxfmt(struct gl_context *ctx, const GLvertexformat *vfmt) if (_mesa_is_desktop_gl(ctx)) install_vtxfmt( ctx, ctx->Save, vfmt ); } - - -#endif /* FEATURE_beginend */ diff --git a/mesalib/src/mesa/main/vtxfmt.h b/mesalib/src/mesa/main/vtxfmt.h index aac656879..65a0e6c8e 100644 --- a/mesalib/src/mesa/main/vtxfmt.h +++ b/mesalib/src/mesa/main/vtxfmt.h @@ -37,23 +37,7 @@ #include "mfeatures.h" #include "mtypes.h" -#if FEATURE_beginend - extern void _mesa_install_exec_vtxfmt( struct gl_context *ctx, const GLvertexformat *vfmt ); extern void _mesa_install_save_vtxfmt( struct gl_context *ctx, const GLvertexformat *vfmt ); -#else /* FEATURE_beginend */ - -static inline void -_mesa_install_exec_vtxfmt( struct gl_context *ctx, const GLvertexformat *vfmt ) -{ -} - -static inline void -_mesa_install_save_vtxfmt( struct gl_context *ctx, const GLvertexformat *vfmt ) -{ -} - -#endif /* FEATURE_beginend */ - #endif /* _VTXFMT_H_ */ |