[Mesa-dev] [PATCH 10/23] mesa: Remove get and enable bits for NV_fragment_program.

Kenneth Graunke kenneth at whitecape.org
Sun Oct 14 17:43:10 PDT 2012


Also remove a leftover remnant from NV_vertex_program.
---
 src/mesa/main/enable.c | 16 ----------------
 src/mesa/main/get.c    | 23 ++---------------------
 2 files changed, 2 insertions(+), 37 deletions(-)

diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 297b495..be105b6 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -854,16 +854,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
          ctx->VertexProgram.TwoSideEnabled = state;
          break;
 
-      case GL_FRAGMENT_PROGRAM_NV:
-         if (ctx->API != API_OPENGL)
-            goto invalid_enum_error;
-         CHECK_EXTENSION(NV_fragment_program, cap);
-         if (ctx->FragmentProgram.Enabled == state)
-            return;
-         FLUSH_VERTICES(ctx, _NEW_PROGRAM);
-         ctx->FragmentProgram.Enabled = state;
-         break;
-
       /* GL_NV_texture_rectangle */
       case GL_TEXTURE_RECTANGLE_NV:
          if (ctx->API != API_OPENGL)
@@ -1495,12 +1485,6 @@ _mesa_IsEnabled( GLenum cap )
          CHECK_EXTENSION(ARB_vertex_program);
          return ctx->VertexProgram.TwoSideEnabled;
 
-      case GL_FRAGMENT_PROGRAM_NV:
-         if (ctx->API != API_OPENGL)
-            goto invalid_enum_error;
-         CHECK_EXTENSION(NV_fragment_program);
-         return ctx->FragmentProgram.Enabled;
-
       /* GL_NV_texture_rectangle */
       case GL_TEXTURE_RECTANGLE_NV:
          if (ctx->API != API_OPENGL)
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 369cdee..e5a2ad3 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_fragment_program);
 EXTRA_EXT(NV_texture_rectangle);
 EXTRA_EXT(EXT_stencil_two_side);
 EXTRA_EXT(NV_light_max_exponent);
@@ -329,7 +328,6 @@ EXTRA_EXT(ARB_transform_feedback3);
 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, ARB_fragment_program);
 EXTRA_EXT(ARB_geometry_shader4);
 EXTRA_EXT(ARB_color_buffer_float);
@@ -691,7 +689,7 @@ static const struct value_desc values[] = {
    { 0, 0, TYPE_API_MASK, API_OPENGL_BIT | API_OPENGL_CORE_BIT | API_OPENGLES2_BIT, NO_EXTRA },
    { GL_MAX_TEXTURE_COORDS_ARB, /* == GL_MAX_TEXTURE_COORDS_NV */
      CONTEXT_INT(Const.MaxTextureCoordUnits),
-     extra_ARB_fragment_program_NV_fragment_program },
+     extra_ARB_fragment_program },
    { GL_PACK_IMAGE_HEIGHT_EXT, CONTEXT_INT(Pack.ImageHeight), NO_EXTRA },
    { GL_PACK_ROW_LENGTH, CONTEXT_INT(Pack.RowLength), NO_EXTRA },
    { GL_PACK_SKIP_PIXELS, CONTEXT_INT(Pack.SkipPixels), NO_EXTRA },
@@ -730,7 +728,7 @@ static const struct value_desc values[] = {
    /* GL_ARB_fragment_program */
    { GL_MAX_TEXTURE_IMAGE_UNITS_ARB, /* == GL_MAX_TEXTURE_IMAGE_UNITS_NV */
      CONTEXT_INT(Const.MaxTextureImageUnits),
-     extra_ARB_fragment_program_NV_fragment_program },
+     extra_ARB_fragment_program },
    { GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB,
      CONTEXT_INT(Const.MaxVertexTextureImageUnits), extra_ARB_vertex_shader },
    { GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB,
@@ -1007,15 +1005,6 @@ static const struct value_desc values[] = {
    { GL_POINT_SPRITE_COORD_ORIGIN, CONTEXT_ENUM(Point.SpriteOrigin),
      extra_NV_point_sprite_ARB_point_sprite },
 
-   /* GL_NV_fragment_program */
-   { GL_FRAGMENT_PROGRAM_NV, CONTEXT_BOOL(FragmentProgram.Enabled),
-     extra_NV_fragment_program },
-   { GL_FRAGMENT_PROGRAM_BINDING_NV, LOC_CUSTOM, TYPE_INT, 0,
-     extra_NV_fragment_program },
-   { GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV,
-     CONST(MAX_NV_FRAGMENT_PROGRAM_PARAMS),
-     extra_NV_fragment_program },
-
    /* GL_NV_texture_rectangle */
    { GL_TEXTURE_RECTANGLE_NV,
      LOC_CUSTOM, TYPE_BOOLEAN, 0, extra_NV_texture_rectangle },
@@ -1633,14 +1622,6 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu
       v->value_int = ctx->CopyWriteBuffer->Name;
       break;
 
-   case GL_FRAGMENT_PROGRAM_BINDING_NV:
-      v->value_int = 
-	 ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0;
-      break;
-   case GL_VERTEX_PROGRAM_BINDING_NV:
-      v->value_int =
-	 ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0;
-      break;
    case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
       v->value_int = ctx->Pack.BufferObj->Name;
       break;
-- 
1.7.12.2



More information about the mesa-dev mailing list