[Mesa-dev] [PATCH 24/47] mesa: remove FEATURE_ARB_vertex_shader define.

Oliver McFadden oliver.mcfadden at linux.intel.com
Thu Sep 13 01:18:53 PDT 2012


Signed-off-by: Oliver McFadden <oliver.mcfadden at linux.intel.com>
---
 src/mesa/main/context.c    |    2 --
 src/mesa/main/extensions.c |    4 ----
 src/mesa/main/mfeatures.h  |    3 +--
 src/mesa/main/shaderapi.c  |    9 +--------
 4 files changed, 2 insertions(+), 16 deletions(-)

diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index f5e6d9c..3caaf5f 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -622,11 +622,9 @@ _mesa_init_constants(struct gl_context *ctx)
    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;
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index dc5ea78..aaee0af 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -438,9 +438,7 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
 #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
@@ -596,9 +594,7 @@ _mesa_enable_2_0_extensions(struct gl_context *ctx)
    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
 }
 
 
diff --git a/src/mesa/main/mfeatures.h b/src/mesa/main/mfeatures.h
index fdecbd4..22cb15a 100644
--- a/src/mesa/main/mfeatures.h
+++ b/src/mesa/main/mfeatures.h
@@ -86,9 +86,8 @@
 
 #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_shader_objects        FEATURE_ARB_fragment_shader
 #define FEATURE_ARB_shading_language_100  FEATURE_ARB_shader_objects
 #define FEATURE_ARB_geometry_shader4      FEATURE_ARB_shader_objects
 
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 643ef51..2e70860 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -171,10 +171,8 @@ validate_shader_target(const struct gl_context *ctx, GLenum type)
    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;
@@ -860,7 +858,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,7 +865,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;
@@ -899,11 +895,9 @@ 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. */
@@ -1752,11 +1746,10 @@ _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);
-- 
1.7.8.6



More information about the mesa-dev mailing list