[Mesa-dev] [PATCH 44/45] mesa: replace FEATURE_ATI_fragment_shader with FEATURE_GL define.

Oliver McFadden oliver.mcfadden at linux.intel.com
Tue Sep 11 02:56:57 PDT 2012


Signed-off-by: Oliver McFadden <oliver.mcfadden at linux.intel.com>
---
 src/mesa/main/atifragshader.c |    4 ++--
 src/mesa/main/atifragshader.h |    6 +++---
 src/mesa/main/dlist.c         |    8 ++++----
 src/mesa/main/enable.c        |    6 +++---
 src/mesa/main/extensions.c    |    2 +-
 src/mesa/main/mfeatures.h     |    2 --
 src/mesa/main/shared.c        |    8 ++++----
 src/mesa/program/program.c    |    6 +++---
 8 files changed, 20 insertions(+), 22 deletions(-)

diff --git a/src/mesa/main/atifragshader.c b/src/mesa/main/atifragshader.c
index 63608a3..6c54d07 100644
--- a/src/mesa/main/atifragshader.c
+++ b/src/mesa/main/atifragshader.c
@@ -32,7 +32,7 @@
 #include "main/dispatch.h"
 #include "main/atifragshader.h"
 
-#if FEATURE_ATI_fragment_shader
+#if FEATURE_GL
 
 #define MESA_DEBUG_ATI_FS 0
 
@@ -787,4 +787,4 @@ _mesa_SetFragmentShaderConstantATI(GLuint dst, const GLfloat * value)
    }
 }
 
-#endif /* FEATURE_ATI_fragment_shader */
+#endif /* FEATURE_GL */
diff --git a/src/mesa/main/atifragshader.h b/src/mesa/main/atifragshader.h
index 90ada21..d15d5d8 100644
--- a/src/mesa/main/atifragshader.h
+++ b/src/mesa/main/atifragshader.h
@@ -65,7 +65,7 @@ struct atifs_setupinst
 };
 
 
-#if FEATURE_ATI_fragment_shader
+#if FEATURE_GL
 
 extern void
 _mesa_init_ati_fragment_shader_dispatch(struct _glapi_table *disp);
@@ -130,7 +130,7 @@ _mesa_AlphaFragmentOp3ATI(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1,
 extern void GLAPIENTRY
 _mesa_SetFragmentShaderConstantATI(GLuint dst, const GLfloat * value);
 
-#else /* FEATURE_ATI_fragment_shader */
+#else /* FEATURE_GL */
 
 static inline void
 _mesa_init_ati_fragment_shader_dispatch(struct _glapi_table *disp)
@@ -149,6 +149,6 @@ _mesa_delete_ati_fragment_shader(struct gl_context *ctx,
 {
 }
 
-#endif /* FEATURE_ATI_fragment_shader */
+#endif /* FEATURE_GL */
 
 #endif /* ATIFRAGSHADER_H */
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 7366722..b9b6224 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -35,7 +35,7 @@
 #include "api_exec.h"
 #include "api_loopback.h"
 #include "api_validate.h"
-#if FEATURE_ATI_fragment_shader
+#if FEATURE_GL
 #include "atifragshader.h"
 #endif
 #include "config.h"
@@ -5458,7 +5458,7 @@ save_TexBumpParameterivATI(GLenum pname, const GLint *param)
    save_TexBumpParameterfvATI(pname, p);
 }
 
-#if FEATURE_ATI_fragment_shader
+#if FEATURE_GL
 static void GLAPIENTRY
 save_BindFragmentShaderATI(GLuint id)
 {
@@ -8626,7 +8626,7 @@ execute_list(struct gl_context *ctx, GLuint list)
                CALL_TexBumpParameterfvATI(ctx->Exec, (pname, values));
             }
             break;
-#if FEATURE_ATI_fragment_shader
+#if FEATURE_GL
          case OPCODE_BIND_FRAGMENT_SHADER_ATI:
             CALL_BindFragmentShaderATI(ctx->Exec, (n[1].i));
             break;
@@ -10309,7 +10309,7 @@ _mesa_create_save_table(void)
    SET_TexBumpParameterfvATI(table, save_TexBumpParameterfvATI);
 
    /* 245. GL_ATI_fragment_shader */
-#if FEATURE_ATI_fragment_shader
+#if FEATURE_GL
    SET_BindFragmentShaderATI(table, save_BindFragmentShaderATI);
    SET_SetFragmentShaderConstantATI(table, save_SetFragmentShaderConstantATI);
 #endif
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 1f064c1..b587f3b 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -973,7 +973,7 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
 	 ctx->Transform.DepthClamp = state;
 	 break;
 
-#if FEATURE_ATI_fragment_shader
+#if FEATURE_GL
       case GL_FRAGMENT_SHADER_ATI:
          if (ctx->API != API_OPENGL)
             goto invalid_enum_error;
@@ -1665,13 +1665,13 @@ _mesa_IsEnabled( GLenum cap )
          CHECK_EXTENSION(ARB_depth_clamp);
          return ctx->Transform.DepthClamp;
 
-#if FEATURE_ATI_fragment_shader
+#if FEATURE_GL
       case GL_FRAGMENT_SHADER_ATI:
          if (ctx->API != API_OPENGL)
             goto invalid_enum_error;
 	 CHECK_EXTENSION(ATI_fragment_shader);
 	 return ctx->ATIFragmentShader.Enabled;
-#endif /* FEATURE_ATI_fragment_shader */
+#endif /* FEATURE_GL */
 
       case GL_TEXTURE_CUBE_MAP_SEAMLESS:
          if (!_mesa_is_desktop_gl(ctx))
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 6b37358..a9f7cfc 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -438,7 +438,7 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
    ctx->Extensions.APPLE_object_purgeable = GL_TRUE;
 #endif
    ctx->Extensions.ATI_envmap_bumpmap = GL_TRUE;
-#if FEATURE_ATI_fragment_shader
+#if FEATURE_GL
    ctx->Extensions.ATI_fragment_shader = GL_TRUE;
 #endif
    ctx->Extensions.ATI_texture_compression_3dc = GL_TRUE;
diff --git a/src/mesa/main/mfeatures.h b/src/mesa/main/mfeatures.h
index a315d9b..36724bd 100644
--- a/src/mesa/main/mfeatures.h
+++ b/src/mesa/main/mfeatures.h
@@ -84,6 +84,4 @@
 #define FEATURE_remap_table               0
 #endif
 
-#define FEATURE_ATI_fragment_shader       FEATURE_GL
-
 #endif /* FEATURES_H */
diff --git a/src/mesa/main/shared.c b/src/mesa/main/shared.c
index 8646d87..a9c3bbc 100644
--- a/src/mesa/main/shared.c
+++ b/src/mesa/main/shared.c
@@ -31,7 +31,7 @@
 #include "mfeatures.h"
 #include "mtypes.h"
 #include "hash.h"
-#if FEATURE_ATI_fragment_shader
+#if FEATURE_GL
 #include "atifragshader.h"
 #endif
 #include "bufferobj.h"
@@ -77,7 +77,7 @@ _mesa_alloc_shared_state(struct gl_context *ctx)
       gl_fragment_program(ctx->Driver.NewProgram(ctx,
                                                  GL_FRAGMENT_PROGRAM_ARB, 0));
 
-#if FEATURE_ATI_fragment_shader
+#if FEATURE_GL
    shared->ATIShaders = _mesa_NewHashTable();
    shared->DefaultFragmentShader = _mesa_new_ati_fragment_shader(ctx, 0);
 #endif
@@ -168,7 +168,7 @@ delete_program_cb(GLuint id, void *data, void *userData)
 }
 
 
-#if FEATURE_ATI_fragment_shader
+#if FEATURE_GL
 /**
  * Callback for deleting an ATI fragment shader object.
  * Called by _mesa_HashDeleteAll().
@@ -322,7 +322,7 @@ free_shared_state(struct gl_context *ctx, struct gl_shared_state *shared)
    _mesa_reference_vertprog(ctx, &shared->DefaultVertexProgram, NULL);
    _mesa_reference_fragprog(ctx, &shared->DefaultFragmentProgram, NULL);
 
-#if FEATURE_ATI_fragment_shader
+#if FEATURE_GL
    _mesa_HashDeleteAll(shared->ATIShaders, delete_fragshader_cb, ctx);
    _mesa_DeleteHashTable(shared->ATIShaders);
    _mesa_delete_ati_fragment_shader(ctx, shared->DefaultFragmentShader);
diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c
index 13e0ce1..a47740c 100644
--- a/src/mesa/program/program.c
+++ b/src/mesa/program/program.c
@@ -113,7 +113,7 @@ _mesa_init_program(struct gl_context *ctx)
    ctx->GeometryProgram.Cache = _mesa_new_program_cache();
 
    /* XXX probably move this stuff */
-#if FEATURE_ATI_fragment_shader
+#if FEATURE_GL
    ctx->ATIFragmentShader.Enabled = GL_FALSE;
    ctx->ATIFragmentShader.Current = ctx->Shared->DefaultFragmentShader;
    assert(ctx->ATIFragmentShader.Current);
@@ -135,7 +135,7 @@ _mesa_free_program_data(struct gl_context *ctx)
    _mesa_reference_geomprog(ctx, &ctx->GeometryProgram.Current, NULL);
    _mesa_delete_program_cache(ctx, ctx->GeometryProgram.Cache);
    /* XXX probably move this stuff */
-#if FEATURE_ATI_fragment_shader
+#if FEATURE_GL
    if (ctx->ATIFragmentShader.Current) {
       ctx->ATIFragmentShader.Current->RefCount--;
       if (ctx->ATIFragmentShader.Current->RefCount <= 0) {
@@ -167,7 +167,7 @@ _mesa_update_default_objects_program(struct gl_context *ctx)
                       ctx->Shared->DefaultGeometryProgram);
 
    /* XXX probably move this stuff */
-#if FEATURE_ATI_fragment_shader
+#if FEATURE_GL
    if (ctx->ATIFragmentShader.Current) {
       ctx->ATIFragmentShader.Current->RefCount--;
       if (ctx->ATIFragmentShader.Current->RefCount <= 0) {
-- 
1.7.8.6



More information about the mesa-dev mailing list