mesa: remove FEATURE_ARB_(fragment|vertex)_program defines.
authorOliver McFadden <oliver.mcfadden@linux.intel.com>
Tue, 11 Sep 2012 07:56:33 +0000 (10:56 +0300)
committerOliver McFadden <oliver.mcfadden@linux.intel.com>
Sat, 15 Sep 2012 09:57:38 +0000 (12:57 +0300)
Signed-off-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/api_exec.c
src/mesa/main/context.c
src/mesa/main/dlist.c
src/mesa/main/enable.c
src/mesa/main/extensions.c
src/mesa/main/mfeatures.h
src/mesa/main/shared.c
src/mesa/main/varray.c
src/mesa/main/vtxfmt.c

index 3c73cc7f2a984b29759d6ca13e802cd74dfcf260..d236dd7af87793768f60e205566e3a7519ff0a11 100644 (file)
@@ -33,9 +33,7 @@
 #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"
@@ -607,7 +605,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 */
@@ -675,7 +672,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);
@@ -746,12 +742,10 @@ _mesa_create_exec_table(struct gl_context *ctx)
 #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 (ctx->API != API_OPENGLES2) {
index b460d1268e0ef47c5083cba8e8fbb14039fd5914..e1f124e2d4b71c3928f7264a3a7e2ab4377ff0fd 100644 (file)
@@ -599,13 +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
    init_program_limits(ctx, MESA_GEOMETRY_PROGRAM, &ctx->Const.GeometryProgram);
+
    ctx->Const.MaxProgramMatrices = MAX_PROGRAM_MATRICES;
    ctx->Const.MaxProgramMatrixStackDepth = MAX_PROGRAM_MATRIX_STACK_DEPTH;
 
index 8508d95e889ae0f909f16115d4ecb096b29ac1c1..6ee1834cdd9bd90760ad62fb3fc14689515d54d6 100644 (file)
@@ -64,9 +64,7 @@
 #include "texstorage.h"
 #include "mtypes.h"
 #include "varray.h"
-#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program
 #include "arbprogram.h"
-#endif
 #include "nvprogram.h"
 #if FEATURE_EXT_transform_feedback
 #include "transformfeedback.h"
@@ -746,12 +744,10 @@ _mesa_delete_list(struct gl_context *ctx, struct gl_display_list *dlist)
             free(n[3].data);      /* parameter name */
             n += InstSize[n[0].opcode];
             break;
-#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:
@@ -5283,8 +5279,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)
@@ -5312,8 +5306,6 @@ save_ProgramStringARB(GLenum target, GLenum format, GLsizei len,
    }
 }
 
-#endif /* FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program */
-
 
 static void GLAPIENTRY
 save_BeginQueryARB(GLenum target, GLuint id)
@@ -8430,12 +8422,10 @@ execute_list(struct gl_context *ctx, GLuint list)
          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
          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,
@@ -10381,7 +10371,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);
@@ -10411,7 +10400,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 */
@@ -10477,10 +10465,8 @@ _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
index d5c40cc487fd08b39ab55f1830baee487de60984..c8c6996a11c7f644f9e47391f8b87ac31f0d50a7 100644 (file)
@@ -949,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;
@@ -959,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:
@@ -1652,12 +1650,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:
index fe95a51a231195ebfa1b1c334b4992a272fe8946..8433d9e90f737d6316b0622d149df275ac25207d 100644 (file)
@@ -395,10 +395,8 @@ _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
    ctx->Extensions.ARB_fragment_shader = GL_TRUE;
 #if FEATURE_ARB_framebuffer_object
    ctx->Extensions.ARB_framebuffer_object = GL_TRUE;
@@ -427,9 +425,7 @@ _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
    ctx->Extensions.ARB_vertex_shader = GL_TRUE;
 #if FEATURE_ARB_sync
    ctx->Extensions.ARB_sync = GL_TRUE;
@@ -497,9 +493,7 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
    ctx->Extensions.NV_vertex_program1_1 = GL_TRUE;
    ctx->Extensions.NV_fragment_program = GL_TRUE;
    ctx->Extensions.NV_fragment_program_option = GL_TRUE;
-#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program
    ctx->Extensions.EXT_gpu_program_parameters = GL_TRUE;
-#endif
    _mesa_enable_extension(ctx, "GL_3DFX_texture_compression_FXT1");
    if (ctx->Mesa_DXTn) {
       _mesa_enable_extension(ctx, "GL_EXT_texture_compression_s3tc");
index 3f6e2929238611bbdd4c9b190afa01048d6ecfda..1b1be52fa803cffe54613a6c2dab5f80b5e7e662 100644 (file)
@@ -84,9 +84,6 @@
 #define FEATURE_remap_table               0
 #endif
 
-#define FEATURE_ARB_fragment_program      1
-#define FEATURE_ARB_vertex_program        1
-
 #define FEATURE_ARB_framebuffer_object    FEATURE_GL
 #define FEATURE_ARB_map_buffer_range      FEATURE_GL
 #define FEATURE_ARB_pixel_buffer_object   FEATURE_GL
index d1443e97baaf99bc2d5620cda3e46ee8fd39600c..e4bb83010ac6957385138afbe7e8ee942482ff9f 100644 (file)
@@ -70,17 +70,12 @@ _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();
@@ -324,13 +319,8 @@ free_shared_state(struct gl_context *ctx, struct gl_shared_state *shared)
    _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);
index ab446e29d5a597f61454e1306eaef7be4a47165c..9a2dec61b1016458807e8c4e617c1407a68239a0 100644 (file)
@@ -463,7 +463,6 @@ _mesa_VertexAttribPointerNV(GLuint index, GLint size, GLenum type,
 }
 
 
-#if FEATURE_ARB_vertex_program
 /**
  * Set a generic vertex attribute array.
  * Note that these arrays DO NOT alias the conventional GL vertex arrays
@@ -493,7 +492,6 @@ _mesa_VertexAttribPointerARB(GLuint index, GLint size, GLenum type,
                 legalTypes, 1, BGRA_OR_4,
                 size, type, stride, normalized, GL_FALSE, ptr);
 }
-#endif
 
 
 /**
index 7ebf9ed76e6cd82ab0e0d0d1d303273959966a75..725ac20472dab12d93ab4464eef0cc3724d78e4b 100644 (file)
@@ -134,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);
@@ -143,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);