summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-10-09 15:33:21 -0700
committerEric Anholt <[email protected]>2012-10-15 11:53:24 -0700
commit8b2fe73897b1d50fd99de3f66bf78fe3fc44bfee (patch)
treed6962d362f4a4fa3c5e31499f3860255f4a269d0 /src
parentcb9a1bf316c1cb9a4273311e93d6bfa4d6e345c2 (diff)
mesa: Remove miscellaneous remains of NV_vertex_program.
v2: Rebase on top of get.c changes. Reviewed-by: Brian Paul <[email protected]> (v1)
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/enable.c12
-rw-r--r--src/mesa/main/extensions.c2
-rw-r--r--src/mesa/main/get.c19
-rw-r--r--src/mesa/main/get_hash_params.py19
-rw-r--r--src/mesa/main/mtypes.h3
-rw-r--r--src/mesa/main/nvprogram.c3
-rw-r--r--src/mesa/program/program.c1
-rw-r--r--src/mesa/tnl/t_vb_program.c32
8 files changed, 15 insertions, 76 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index e771cba7caf..297b495092b 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -826,7 +826,7 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
case GL_VERTEX_PROGRAM_ARB:
if (ctx->API != API_OPENGL)
goto invalid_enum_error;
- CHECK_EXTENSION2(ARB_vertex_program, NV_vertex_program, cap);
+ CHECK_EXTENSION(ARB_vertex_program, cap);
if (ctx->VertexProgram.Enabled == state)
return;
FLUSH_VERTICES(ctx, _NEW_PROGRAM);
@@ -838,7 +838,7 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
*/
if (!_mesa_is_desktop_gl(ctx))
goto invalid_enum_error;
- CHECK_EXTENSION2(ARB_vertex_program, NV_vertex_program, cap);
+ CHECK_EXTENSION(ARB_vertex_program, cap);
if (ctx->VertexProgram.PointSizeEnabled == state)
return;
FLUSH_VERTICES(ctx, _NEW_PROGRAM);
@@ -847,7 +847,7 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
if (ctx->API != API_OPENGL)
goto invalid_enum_error;
- CHECK_EXTENSION2(ARB_vertex_program, NV_vertex_program, cap);
+ CHECK_EXTENSION(ARB_vertex_program, cap);
if (ctx->VertexProgram.TwoSideEnabled == state)
return;
FLUSH_VERTICES(ctx, _NEW_PROGRAM);
@@ -1479,7 +1479,7 @@ _mesa_IsEnabled( GLenum cap )
case GL_VERTEX_PROGRAM_ARB:
if (ctx->API != API_OPENGL)
goto invalid_enum_error;
- CHECK_EXTENSION2(ARB_vertex_program, NV_vertex_program);
+ CHECK_EXTENSION(ARB_vertex_program);
return ctx->VertexProgram.Enabled;
case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
/* This was added with ARB_vertex_program, but it is also used with
@@ -1487,12 +1487,12 @@ _mesa_IsEnabled( GLenum cap )
*/
if (!_mesa_is_desktop_gl(ctx))
goto invalid_enum_error;
- CHECK_EXTENSION2(ARB_vertex_program, NV_vertex_program);
+ CHECK_EXTENSION(ARB_vertex_program);
return ctx->VertexProgram.PointSizeEnabled;
case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
if (ctx->API != API_OPENGL)
goto invalid_enum_error;
- CHECK_EXTENSION2(ARB_vertex_program, NV_vertex_program);
+ CHECK_EXTENSION(ARB_vertex_program);
return ctx->VertexProgram.TwoSideEnabled;
case GL_FRAGMENT_PROGRAM_NV:
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 1bdd1b1b9a4..8681c4c63af 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -312,8 +312,6 @@ static const struct extension extension_table[] = {
{ "GL_NV_texture_barrier", o(NV_texture_barrier), GL, 2009 },
{ "GL_NV_texture_env_combine4", o(NV_texture_env_combine4), GLL, 1999 },
{ "GL_NV_texture_rectangle", o(NV_texture_rectangle), GLL, 2000 },
- { "GL_NV_vertex_program1_1", o(NV_vertex_program1_1), GLL, 2001 },
- { "GL_NV_vertex_program", o(NV_vertex_program), GLL, 2000 },
{ "GL_S3_s3tc", o(S3_s3tc), GL, 1999 },
{ "GL_SGIS_generate_mipmap", o(dummy_true), GLL, 1997 },
{ "GL_SGIS_texture_border_clamp", o(ARB_texture_border_clamp), GLL, 1997 },
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 7570fab962c..ca471845cf7 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -305,7 +305,6 @@ EXTRA_EXT(NV_fog_distance);
EXTRA_EXT(EXT_texture_filter_anisotropic);
EXTRA_EXT(IBM_rasterpos_clip);
EXTRA_EXT(NV_point_sprite);
-EXTRA_EXT(NV_vertex_program);
EXTRA_EXT(NV_fragment_program);
EXTRA_EXT(NV_texture_rectangle);
EXTRA_EXT(EXT_stencil_two_side);
@@ -331,7 +330,6 @@ EXTRA_EXT(EXT_pixel_buffer_object);
EXTRA_EXT(ARB_vertex_program);
EXTRA_EXT2(NV_point_sprite, ARB_point_sprite);
EXTRA_EXT2(ARB_fragment_program, NV_fragment_program);
-EXTRA_EXT2(ARB_vertex_program, NV_vertex_program);
EXTRA_EXT2(ARB_vertex_program, ARB_fragment_program);
EXTRA_EXT(ARB_geometry_shader4);
EXTRA_EXT(ARB_color_buffer_float);
@@ -344,23 +342,6 @@ EXTRA_EXT(ARB_uniform_buffer_object);
EXTRA_EXT(ARB_timer_query);
static const int
-extra_ARB_vertex_program_ARB_fragment_program_NV_vertex_program[] = {
- EXT(ARB_vertex_program),
- EXT(ARB_fragment_program),
- EXT(NV_vertex_program),
- EXTRA_END
-};
-
-static const int
-extra_NV_vertex_program_ARB_vertex_program_ARB_fragment_program_NV_vertex_program[] = {
- EXT(NV_vertex_program),
- EXT(ARB_vertex_program),
- EXT(ARB_fragment_program),
- EXT(NV_vertex_program),
- EXTRA_END
-};
-
-static const int
extra_NV_primitive_restart[] = {
EXT(NV_primitive_restart),
EXTRA_END
diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py
index 42455df3050..c694ca7ad8a 100644
--- a/src/mesa/main/get_hash_params.py
+++ b/src/mesa/main/get_hash_params.py
@@ -513,9 +513,6 @@ descriptor=[
[ "POINT_SPRITE_R_MODE_NV", "CONTEXT_ENUM(Point.SpriteRMode), extra_NV_point_sprite" ],
[ "POINT_SPRITE_COORD_ORIGIN", "CONTEXT_ENUM(Point.SpriteOrigin), extra_NV_point_sprite_ARB_point_sprite" ],
-# GL_NV_vertex_program
- [ "VERTEX_PROGRAM_BINDING_NV", "LOC_CUSTOM, TYPE_INT, 0, extra_NV_vertex_program" ],
-
# GL_NV_fragment_program
[ "FRAGMENT_PROGRAM_NV", "CONTEXT_BOOL(FragmentProgram.Enabled), extra_NV_fragment_program" ],
[ "FRAGMENT_PROGRAM_BINDING_NV", "LOC_CUSTOM, TYPE_INT, 0, extra_NV_fragment_program" ],
@@ -550,23 +547,23 @@ descriptor=[
# GL_ARB_vertex_program
# == GL_VERTEX_PROGRAM_NV
- [ "VERTEX_PROGRAM_ARB", "CONTEXT_BOOL(VertexProgram.Enabled), extra_ARB_vertex_program_NV_vertex_program" ],
+ [ "VERTEX_PROGRAM_ARB", "CONTEXT_BOOL(VertexProgram.Enabled), extra_ARB_vertex_program" ],
# == GL_VERTEX_PROGRAM_POINT_SIZE_NV
- [ "VERTEX_PROGRAM_POINT_SIZE_ARB", "CONTEXT_BOOL(VertexProgram.PointSizeEnabled), extra_ARB_vertex_program_NV_vertex_program" ],
+ [ "VERTEX_PROGRAM_POINT_SIZE_ARB", "CONTEXT_BOOL(VertexProgram.PointSizeEnabled), extra_ARB_vertex_program" ],
# == GL_VERTEX_PROGRAM_TWO_SIDE_NV
- [ "VERTEX_PROGRAM_TWO_SIDE_ARB", "CONTEXT_BOOL(VertexProgram.TwoSideEnabled), extra_ARB_vertex_program_NV_vertex_program" ],
+ [ "VERTEX_PROGRAM_TWO_SIDE_ARB", "CONTEXT_BOOL(VertexProgram.TwoSideEnabled), extra_ARB_vertex_program" ],
# == GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV
- [ "MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB", "CONTEXT_INT(Const.MaxProgramMatrixStackDepth), extra_ARB_vertex_program_ARB_fragment_program_NV_vertex_program" ],
+ [ "MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB", "CONTEXT_INT(Const.MaxProgramMatrixStackDepth), extra_ARB_vertex_program_ARB_fragment_program" ],
# == GL_MAX_TRACK_MATRICES_NV
- [ "MAX_PROGRAM_MATRICES_ARB", "CONTEXT_INT(Const.MaxProgramMatrices), extra_ARB_vertex_program_ARB_fragment_program_NV_vertex_program" ],
+ [ "MAX_PROGRAM_MATRICES_ARB", "CONTEXT_INT(Const.MaxProgramMatrices), extra_ARB_vertex_program_ARB_fragment_program" ],
# == GL_CURRENT_MATRIX_STACK_DEPTH_NV
- [ "CURRENT_MATRIX_STACK_DEPTH_ARB", "LOC_CUSTOM, TYPE_INT, 0, extra_ARB_vertex_program_ARB_fragment_program_NV_vertex_program" ],
+ [ "CURRENT_MATRIX_STACK_DEPTH_ARB", "LOC_CUSTOM, TYPE_INT, 0, extra_ARB_vertex_program_ARB_fragment_program" ],
# == GL_CURRENT_MATRIX_NV
- [ "CURRENT_MATRIX_ARB", "LOC_CUSTOM, TYPE_MATRIX, 0, extra_ARB_vertex_program_ARB_fragment_program_NV_vertex_program" ],
+ [ "CURRENT_MATRIX_ARB", "LOC_CUSTOM, TYPE_MATRIX, 0, extra_ARB_vertex_program_ARB_fragment_program" ],
# == GL_CURRENT_MATRIX_NV
[ "TRANSPOSE_CURRENT_MATRIX_ARB", "LOC_CUSTOM, TYPE_MATRIX, 0, extra_ARB_vertex_program_ARB_fragment_program" ],
# == GL_PROGRAM_ERROR_POSITION_NV
- [ "PROGRAM_ERROR_POSITION_ARB", "CONTEXT_INT(Program.ErrorPos), extra_NV_vertex_program_ARB_vertex_program_ARB_fragment_program_NV_vertex_program" ],
+ [ "PROGRAM_ERROR_POSITION_ARB", "CONTEXT_INT(Program.ErrorPos), extra_ARB_vertex_program_ARB_fragment_program" ],
# GL_ARB_fragment_program
[ "FRAGMENT_PROGRAM_ARB", "CONTEXT_BOOL(FragmentProgram.Enabled), extra_ARB_fragment_program" ],
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 681c0f95bf0..77865eea9c6 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1980,7 +1980,6 @@ struct gl_program
struct gl_vertex_program
{
struct gl_program Base; /**< base class */
- GLboolean IsNVProgram; /**< is this a GL_NV_vertex_program program? */
GLboolean IsPositionInvariant;
GLboolean UsesClipDistance;
};
@@ -3068,8 +3067,6 @@ struct gl_extensions
GLboolean NV_texgen_reflection;
GLboolean NV_texture_env_combine4;
GLboolean NV_texture_rectangle;
- GLboolean NV_vertex_program;
- GLboolean NV_vertex_program1_1;
GLboolean SGIS_texture_lod;
GLboolean TDFX_texture_compression_FXT1;
GLboolean S3_s3tc;
diff --git a/src/mesa/main/nvprogram.c b/src/mesa/main/nvprogram.c
index 6807af51f40..6ad846e377e 100644
--- a/src/mesa/main/nvprogram.c
+++ b/src/mesa/main/nvprogram.c
@@ -315,8 +315,7 @@ _mesa_LoadProgramNV(GLenum target, GLuint id, GLsizei len,
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
- if (!ctx->Extensions.NV_vertex_program
- && !ctx->Extensions.NV_fragment_program) {
+ if (!ctx->Extensions.NV_fragment_program) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glLoadProgramNV()");
return;
}
diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c
index 80fc649f54b..c97c696691e 100644
--- a/src/mesa/program/program.c
+++ b/src/mesa/program/program.c
@@ -504,7 +504,6 @@ _mesa_clone_program(struct gl_context *ctx, const struct gl_program *prog)
const struct gl_vertex_program *vp = gl_vertex_program_const(prog);
struct gl_vertex_program *vpc = gl_vertex_program(clone);
vpc->IsPositionInvariant = vp->IsPositionInvariant;
- vpc->IsNVProgram = vp->IsNVProgram;
}
break;
case GL_FRAGMENT_PROGRAM_ARB:
diff --git a/src/mesa/tnl/t_vb_program.c b/src/mesa/tnl/t_vb_program.c
index 61ccece001d..8ff300cd7f5 100644
--- a/src/mesa/tnl/t_vb_program.c
+++ b/src/mesa/tnl/t_vb_program.c
@@ -231,21 +231,6 @@ init_machine(struct gl_context *ctx, struct gl_program_machine *machine,
memcpy(machine->VertAttribs, ctx->Current.Attrib,
MAX_VERTEX_GENERIC_ATTRIBS * 4 * sizeof(GLfloat));
- if (ctx->VertexProgram._Current->IsNVProgram) {
- GLuint i;
- /* Output/result regs are initialized to [0,0,0,1] */
- for (i = 0; i < MAX_NV_VERTEX_PROGRAM_OUTPUTS; i++) {
- ASSIGN_4V(machine->Outputs[i], 0.0F, 0.0F, 0.0F, 1.0F);
- }
- /* Temp regs are initialized to [0,0,0,0] */
- for (i = 0; i < MAX_NV_VERTEX_PROGRAM_TEMPS; i++) {
- ASSIGN_4V(machine->Temporaries[i], 0.0F, 0.0F, 0.0F, 0.0F);
- }
- for (i = 0; i < MAX_VERTEX_PROGRAM_ADDRESS_REGS; i++) {
- ASSIGN_4V(machine->AddressReg[i], 0, 0, 0, 0);
- }
- }
-
machine->NumDeriv = 0;
/* init condition codes */
@@ -420,23 +405,6 @@ run_vp( struct gl_context *ctx, struct tnl_pipeline_stage *stage )
unmap_textures(ctx, program);
- /* Fixup fog and point size results if needed */
- if (program->IsNVProgram) {
- if (ctx->Fog.Enabled &&
- (program->Base.OutputsWritten & BITFIELD64_BIT(VERT_RESULT_FOGC)) == 0) {
- for (i = 0; i < VB->Count; i++) {
- store->results[VERT_RESULT_FOGC].data[i][0] = 1.0;
- }
- }
-
- if (ctx->VertexProgram.PointSizeEnabled &&
- (program->Base.OutputsWritten & BITFIELD64_BIT(VERT_RESULT_PSIZ)) == 0) {
- for (i = 0; i < VB->Count; i++) {
- store->results[VERT_RESULT_PSIZ].data[i][0] = ctx->Point.Size;
- }
- }
- }
-
if (program->IsPositionInvariant) {
/* We need the exact same transform as in the fixed function path here
* to guarantee invariance, depending on compiler optimization flags