summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorOliver McFadden <[email protected]>2012-09-11 10:56:33 +0300
committerOliver McFadden <[email protected]>2012-09-15 12:57:38 +0300
commite8a72d8282d1be401825f4c2c32544b01e2e56bc (patch)
tree8ebce55050680932b464ab4b6de4d208a78f74ce /src/mesa
parentb7d15977f66bb3de9c475e3138c56ab1d4151382 (diff)
mesa: remove FEATURE_ARB_(fragment|vertex)_program defines.
Signed-off-by: Oliver McFadden <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/api_exec.c6
-rw-r--r--src/mesa/main/context.c5
-rw-r--r--src/mesa/main/dlist.c14
-rw-r--r--src/mesa/main/enable.c4
-rw-r--r--src/mesa/main/extensions.c6
-rw-r--r--src/mesa/main/mfeatures.h3
-rw-r--r--src/mesa/main/shared.c10
-rw-r--r--src/mesa/main/varray.c2
-rw-r--r--src/mesa/main/vtxfmt.c2
9 files changed, 1 insertions, 51 deletions
diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c
index 3c73cc7f2a9..d236dd7af87 100644
--- a/src/mesa/main/api_exec.c
+++ b/src/mesa/main/api_exec.c
@@ -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) {
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index b460d1268e0..e1f124e2d4b 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -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;
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 8508d95e889..6ee1834cdd9 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -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
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index d5c40cc487f..c8c6996a11c 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -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:
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index fe95a51a231..8433d9e90f7 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -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");
diff --git a/src/mesa/main/mfeatures.h b/src/mesa/main/mfeatures.h
index 3f6e2929238..1b1be52fa80 100644
--- a/src/mesa/main/mfeatures.h
+++ b/src/mesa/main/mfeatures.h
@@ -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
diff --git a/src/mesa/main/shared.c b/src/mesa/main/shared.c
index d1443e97baa..e4bb83010ac 100644
--- a/src/mesa/main/shared.c
+++ b/src/mesa/main/shared.c
@@ -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);
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index ab446e29d5a..9a2dec61b10 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -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
/**
diff --git a/src/mesa/main/vtxfmt.c b/src/mesa/main/vtxfmt.c
index 7ebf9ed76e6..725ac20472d 100644
--- a/src/mesa/main/vtxfmt.c
+++ b/src/mesa/main/vtxfmt.c
@@ -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);