From: Oliver McFadden Date: Tue, 11 Sep 2012 07:41:46 +0000 (+0300) Subject: mesa: remove FEATURE_NV_(fragment|vertex)_program defines. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b7d15977f66bb3de9c475e3138c56ab1d4151382;p=mesa.git mesa: remove FEATURE_NV_(fragment|vertex)_program defines. Signed-off-by: Oliver McFadden Reviewed-by: Brian Paul --- diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c index 8038a8f4eda..3c73cc7f2a9 100644 --- a/src/mesa/main/api_exec.c +++ b/src/mesa/main/api_exec.c @@ -91,9 +91,7 @@ #include "mtypes.h" #include "varray.h" #include "viewport.h" -#if FEATURE_NV_vertex_program || FEATURE_NV_fragment_program #include "nvprogram.h" -#endif #include "shaderapi.h" #include "uniforms.h" #include "syncobj.h" @@ -474,7 +472,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); @@ -502,7 +499,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 */ @@ -515,7 +511,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); @@ -530,7 +525,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 diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index 3df4f6cc1f8..8508d95e889 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -67,9 +67,7 @@ #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 @@ -736,7 +734,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]; @@ -745,13 +742,10 @@ _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 */ @@ -4856,7 +4850,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) { @@ -4956,9 +4949,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) { @@ -5073,13 +5064,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) @@ -5257,9 +5246,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 @@ -8403,12 +8389,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]; @@ -8430,9 +8413,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, @@ -8444,8 +8424,6 @@ 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; @@ -8458,13 +8436,11 @@ execute_list(struct gl_context *ctx, GLuint list) (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 case OPCODE_BEGIN_QUERY_ARB: CALL_BeginQueryARB(ctx->Exec, (n[1].e, n[2].ui)); break; @@ -10278,7 +10254,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, @@ -10309,7 +10284,6 @@ _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); @@ -10322,7 +10296,6 @@ _mesa_create_save_table(void) #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); @@ -10339,7 +10312,6 @@ _mesa_create_save_table(void) _mesa_GetProgramLocalParameterdvARB); SET_GetProgramLocalParameterfvARB(table, _mesa_GetProgramLocalParameterfvARB); -#endif /* 262. GL_NV_point_sprite */ SET_PointParameteriNV(table, save_PointParameteriNV); diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index bc23cc0abd1..d5c40cc487f 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -97,7 +97,6 @@ client_state(struct gl_context *ctx, GLenum cap, GLboolean state) flag = VERT_BIT_POINT_SIZE; break; -#if FEATURE_NV_vertex_program case GL_VERTEX_ATTRIB_ARRAY0_NV: case GL_VERTEX_ATTRIB_ARRAY1_NV: case GL_VERTEX_ATTRIB_ARRAY2_NV: @@ -122,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: @@ -833,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; @@ -864,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: @@ -916,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; @@ -928,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: @@ -1549,7 +1542,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; @@ -1568,8 +1560,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: @@ -1640,15 +1631,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: diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index c83ed8f21cf..fe95a51a231 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -493,16 +493,10 @@ _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 diff --git a/src/mesa/main/getstring.c b/src/mesa/main/getstring.c index 24210c34bd8..54e518d2b49 100644 --- a/src/mesa/main/getstring.c +++ b/src/mesa/main/getstring.c @@ -135,8 +135,6 @@ _mesa_GetString( GLenum name ) if (ctx->API == API_OPENGLES) break; return shading_language_version(ctx); -#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 || @@ -146,7 +144,6 @@ _mesa_GetString( GLenum name ) return (const GLubyte *) ctx->Program.ErrorString; } break; -#endif default: break; } diff --git a/src/mesa/main/mfeatures.h b/src/mesa/main/mfeatures.h index d46906d3e2a..3f6e2929238 100644 --- a/src/mesa/main/mfeatures.h +++ b/src/mesa/main/mfeatures.h @@ -99,7 +99,5 @@ #define FEATURE_APPLE_object_purgeable FEATURE_GL #define FEATURE_ATI_fragment_shader FEATURE_GL -#define FEATURE_NV_fragment_program FEATURE_GL -#define FEATURE_NV_vertex_program FEATURE_GL #endif /* FEATURES_H */ diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index 91452b75fa6..ab446e29d5a 100644 --- a/src/mesa/main/varray.c +++ b/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,7 +461,6 @@ _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 diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c index 939f3f89aaf..531a93264eb 100644 --- a/src/mesa/program/program.c +++ b/src/mesa/program/program.c @@ -83,7 +83,6 @@ _mesa_init_program(struct gl_context *ctx) ctx->Program.ErrorPos = -1; ctx->Program.ErrorString = _mesa_strdup(""); -#if FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program ctx->VertexProgram.Enabled = GL_FALSE; ctx->VertexProgram.PointSizeEnabled = (ctx->API == API_OPENGLES2) ? GL_TRUE : GL_FALSE; @@ -96,15 +95,12 @@ _mesa_init_program(struct gl_context *ctx) ctx->VertexProgram.TrackMatrixTransform[i] = GL_IDENTITY_NV; } ctx->VertexProgram.Cache = _mesa_new_program_cache(); -#endif -#if FEATURE_NV_fragment_program || FEATURE_ARB_fragment_program ctx->FragmentProgram.Enabled = GL_FALSE; _mesa_reference_fragprog(ctx, &ctx->FragmentProgram.Current, ctx->Shared->DefaultFragmentProgram); assert(ctx->FragmentProgram.Current); ctx->FragmentProgram.Cache = _mesa_new_program_cache(); -#endif ctx->GeometryProgram.Enabled = GL_FALSE; /* right now by default we don't have a geometry program */ @@ -128,14 +124,10 @@ _mesa_init_program(struct gl_context *ctx) void _mesa_free_program_data(struct gl_context *ctx) { -#if FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program _mesa_reference_vertprog(ctx, &ctx->VertexProgram.Current, NULL); _mesa_delete_program_cache(ctx, ctx->VertexProgram.Cache); -#endif -#if FEATURE_NV_fragment_program || FEATURE_ARB_fragment_program _mesa_reference_fragprog(ctx, &ctx->FragmentProgram.Current, NULL); _mesa_delete_shader_cache(ctx, ctx->FragmentProgram.Cache); -#endif _mesa_reference_geomprog(ctx, &ctx->GeometryProgram.Current, NULL); _mesa_delete_program_cache(ctx, ctx->GeometryProgram.Cache); /* XXX probably move this stuff */ @@ -159,17 +151,13 @@ _mesa_free_program_data(struct gl_context *ctx) void _mesa_update_default_objects_program(struct gl_context *ctx) { -#if FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program _mesa_reference_vertprog(ctx, &ctx->VertexProgram.Current, ctx->Shared->DefaultVertexProgram); assert(ctx->VertexProgram.Current); -#endif -#if FEATURE_NV_fragment_program || FEATURE_ARB_fragment_program _mesa_reference_fragprog(ctx, &ctx->FragmentProgram.Current, ctx->Shared->DefaultFragmentProgram); assert(ctx->FragmentProgram.Current); -#endif _mesa_reference_geomprog(ctx, &ctx->GeometryProgram.Current, ctx->Shared->DefaultGeometryProgram);