[Mesa-dev] [PATCH 42/45] mesa: replace FEATURE_EXT_transform_feedback with FEATURE_GL define.
Oliver McFadden
oliver.mcfadden at linux.intel.com
Tue Sep 11 02:56:55 PDT 2012
Signed-off-by: Oliver McFadden <oliver.mcfadden at linux.intel.com>
---
src/mesa/drivers/common/meta.c | 6 +++---
src/mesa/main/api_validate.c | 2 +-
src/mesa/main/api_validate.h | 2 +-
src/mesa/main/bufferobj.c | 2 +-
src/mesa/main/dlist.c | 4 ++--
src/mesa/main/enable.c | 4 ++--
src/mesa/main/extensions.c | 2 +-
src/mesa/main/mfeatures.h | 2 --
src/mesa/main/queryobj.c | 2 +-
src/mesa/main/shaderapi.c | 4 ++--
src/mesa/main/transformfeedback.c | 10 +++++-----
src/mesa/main/transformfeedback.h | 6 +++---
src/mesa/main/varray.h | 2 +-
src/mesa/state_tracker/st_cb_xformfb.c | 4 ++--
src/mesa/state_tracker/st_cb_xformfb.h | 4 ++--
src/mesa/vbo/vbo_exec_array.c | 6 +++---
16 files changed, 30 insertions(+), 32 deletions(-)
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 36db966..0d9194f 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -191,7 +191,7 @@ struct save_state
/** Miscellaneous (always disabled) */
GLboolean Lighting;
GLboolean RasterDiscard;
-#if FEATURE_EXT_transform_feedback
+#if FEATURE_GL
GLboolean TransformFeedbackNeedsResume;
#endif
};
@@ -485,7 +485,7 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
memset(save, 0, sizeof(*save));
save->SavedState = state;
-#if FEATURE_EXT_transform_feedback
+#if FEATURE_GL
/* Pausing transform feedback needs to be done early, or else we won't be
* able to change other state.
*/
@@ -1100,7 +1100,7 @@ _mesa_meta_end(struct gl_context *ctx)
if (save->RasterDiscard) {
_mesa_set_enable(ctx, GL_RASTERIZER_DISCARD, GL_TRUE);
}
-#if FEATURE_EXT_transform_feedback
+#if FEATURE_GL
if (save->TransformFeedbackNeedsResume)
_mesa_ResumeTransformFeedback();
#endif
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index 107ebb7..a4cb6cf 100644
--- a/src/mesa/main/api_validate.c
+++ b/src/mesa/main/api_validate.c
@@ -616,7 +616,7 @@ _mesa_validate_DrawElementsInstanced(struct gl_context *ctx,
}
-#if FEATURE_EXT_transform_feedback
+#if FEATURE_GL
GLboolean
_mesa_validate_DrawTransformFeedback(struct gl_context *ctx,
diff --git a/src/mesa/main/api_validate.h b/src/mesa/main/api_validate.h
index 8dc8df4..e085eb3 100644
--- a/src/mesa/main/api_validate.h
+++ b/src/mesa/main/api_validate.h
@@ -78,7 +78,7 @@ _mesa_validate_DrawElementsInstanced(struct gl_context *ctx,
const GLvoid *indices, GLsizei primcount,
GLint basevertex);
-#if FEATURE_EXT_transform_feedback
+#if FEATURE_GL
extern GLboolean
_mesa_validate_DrawTransformFeedback(struct gl_context *ctx,
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 0ce3667..9e08d84 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -87,7 +87,7 @@ get_buffer_target(struct gl_context *ctx, GLenum target)
return &ctx->CopyReadBuffer;
case GL_COPY_WRITE_BUFFER:
return &ctx->CopyWriteBuffer;
-#if FEATURE_EXT_transform_feedback
+#if FEATURE_GL
case GL_TRANSFORM_FEEDBACK_BUFFER:
if (ctx->Extensions.EXT_transform_feedback) {
return &ctx->TransformFeedback.CurrentBuffer;
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 92d5e7d..2bacf7d 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -68,7 +68,7 @@
#if FEATURE_GL
#include "nvprogram.h"
#endif
-#if FEATURE_EXT_transform_feedback
+#if FEATURE_GL
#include "transformfeedback.h"
#endif
@@ -10564,7 +10564,7 @@ _mesa_create_save_table(void)
(void) save_Uniform4uiv;
#endif
-#if FEATURE_EXT_transform_feedback
+#if FEATURE_GL
/* These are not compiled into display lists: */
SET_BindBufferBaseEXT(table, _mesa_BindBufferBase);
SET_BindBufferOffsetEXT(table, _mesa_BindBufferOffsetEXT);
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 3742776..1f064c1 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -1014,7 +1014,7 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
}
break;
-#if FEATURE_EXT_transform_feedback
+#if FEATURE_GL
case GL_RASTERIZER_DISCARD:
if (!_mesa_is_desktop_gl(ctx) && !_mesa_is_gles3(ctx))
goto invalid_enum_error;
@@ -1679,7 +1679,7 @@ _mesa_IsEnabled( GLenum cap )
CHECK_EXTENSION(ARB_seamless_cube_map);
return ctx->Texture.CubeMapSeamless;
-#if FEATURE_EXT_transform_feedback
+#if FEATURE_GL
case GL_RASTERIZER_DISCARD:
if (!_mesa_is_desktop_gl(ctx) && !_mesa_is_gles3(ctx))
goto invalid_enum_error;
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index bcedb40..04cce49 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -477,7 +477,7 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
ctx->Extensions.EXT_texture_sRGB_decode = GL_TRUE;
#endif
ctx->Extensions.EXT_texture_swizzle = GL_TRUE;
-#if FEATURE_EXT_transform_feedback
+#if FEATURE_GL
/*ctx->Extensions.EXT_transform_feedback = GL_TRUE;*/
#endif
ctx->Extensions.EXT_vertex_array_bgra = GL_TRUE;
diff --git a/src/mesa/main/mfeatures.h b/src/mesa/main/mfeatures.h
index fd3eae1..bc825e8 100644
--- a/src/mesa/main/mfeatures.h
+++ b/src/mesa/main/mfeatures.h
@@ -84,8 +84,6 @@
#define FEATURE_remap_table 0
#endif
-#define FEATURE_EXT_transform_feedback FEATURE_GL
-
#define FEATURE_APPLE_object_purgeable FEATURE_GL
#define FEATURE_ATI_fragment_shader FEATURE_GL
diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
index e7070a5..a87f45d 100644
--- a/src/mesa/main/queryobj.c
+++ b/src/mesa/main/queryobj.c
@@ -155,7 +155,7 @@ get_query_binding_point(struct gl_context *ctx, GLenum target)
return &ctx->Query.CurrentTimerObject;
else
return NULL;
-#if FEATURE_EXT_transform_feedback
+#if FEATURE_GL
case GL_PRIMITIVES_GENERATED:
if (ctx->Extensions.EXT_transform_feedback)
return &ctx->Query.PrimitivesGenerated;
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 4ce02e6..d8717e7 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -467,7 +467,7 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, GLint *param
struct gl_shader_program *shProg
= _mesa_lookup_shader_program(ctx, program);
-#if FEATURE_EXT_transform_feedback
+#if FEATURE_GL
/* Is transform feedback available in this context?
*/
const bool has_xfb =
@@ -534,7 +534,7 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, GLint *param
*params = max_len;
return;
}
-#if FEATURE_EXT_transform_feedback
+#if FEATURE_GL
case GL_TRANSFORM_FEEDBACK_VARYINGS:
if (!has_xfb)
break;
diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c
index 26345b1..e8db075 100644
--- a/src/mesa/main/transformfeedback.c
+++ b/src/mesa/main/transformfeedback.c
@@ -44,7 +44,7 @@
#include "program/prog_parameter.h"
-#if FEATURE_EXT_transform_feedback
+#if FEATURE_GL
/**
@@ -171,7 +171,7 @@ _mesa_free_transform_feedback(struct gl_context *ctx)
}
-#else /* FEATURE_EXT_transform_feedback */
+#else /* FEATURE_GL */
/* forward declarations */
static struct gl_transform_feedback_object *
@@ -202,7 +202,7 @@ _mesa_free_transform_feedback(struct gl_context *ctx)
delete_transform_feedback(ctx, ctx->TransformFeedback.DefaultObject);
}
-#endif /* FEATURE_EXT_transform_feedback */
+#endif /* FEATURE_GL */
/** Default fallback for ctx->Driver.NewTransformFeedback() */
@@ -233,7 +233,7 @@ delete_transform_feedback(struct gl_context *ctx,
}
-#if FEATURE_EXT_transform_feedback
+#if FEATURE_GL
/** Default fallback for ctx->Driver.BeginTransformFeedback() */
@@ -902,4 +902,4 @@ _mesa_ResumeTransformFeedback(void)
ctx->Driver.ResumeTransformFeedback(ctx, obj);
}
-#endif /* FEATURE_EXT_transform_feedback */
+#endif /* FEATURE_GL */
diff --git a/src/mesa/main/transformfeedback.h b/src/mesa/main/transformfeedback.h
index 85f4cbc..5474047 100644
--- a/src/mesa/main/transformfeedback.h
+++ b/src/mesa/main/transformfeedback.h
@@ -39,7 +39,7 @@ _mesa_init_transform_feedback(struct gl_context *ctx);
extern void
_mesa_free_transform_feedback(struct gl_context *ctx);
-#if FEATURE_EXT_transform_feedback
+#if FEATURE_GL
extern GLboolean
_mesa_validate_transform_feedback_buffers(struct gl_context *ctx);
@@ -110,7 +110,7 @@ _mesa_PauseTransformFeedback(void);
extern void GLAPIENTRY
_mesa_ResumeTransformFeedback(void);
-#else /* FEATURE_EXT_transform_feedback */
+#else /* FEATURE_GL */
static inline GLboolean
_mesa_validate_primitive_mode(struct gl_context *ctx, GLenum mode)
@@ -134,6 +134,6 @@ _mesa_init_transform_feedback_dispatch(struct _glapi_table *disp)
{
}
-#endif /* FEATURE_EXT_transform_feedback */
+#endif /* FEATURE_GL */
#endif /* TRANSFORM_FEEDBACK_H */
diff --git a/src/mesa/main/varray.h b/src/mesa/main/varray.h
index b6041bd..a1c1447 100644
--- a/src/mesa/main/varray.h
+++ b/src/mesa/main/varray.h
@@ -245,7 +245,7 @@ _mesa_DrawRangeElementsBaseVertex(GLenum mode, GLuint start, GLuint end,
const GLvoid *indices,
GLint basevertex);
-#if FEATURE_EXT_transform_feedback
+#if FEATURE_GL
extern void GLAPIENTRY
_mesa_DrawTransformFeedback(GLenum mode, GLuint name);
diff --git a/src/mesa/state_tracker/st_cb_xformfb.c b/src/mesa/state_tracker/st_cb_xformfb.c
index b853485..6a61416 100644
--- a/src/mesa/state_tracker/st_cb_xformfb.c
+++ b/src/mesa/state_tracker/st_cb_xformfb.c
@@ -48,7 +48,7 @@
#include "util/u_inlines.h"
#include "cso_cache/cso_context.h"
-#if FEATURE_EXT_transform_feedback
+#if FEATURE_GL
struct st_transform_feedback_object {
struct gl_transform_feedback_object base;
@@ -230,4 +230,4 @@ st_init_xformfb_functions(struct dd_function_table *functions)
functions->ResumeTransformFeedback = st_resume_transform_feedback;
}
-#endif /* FEATURE_EXT_transform_feedback */
+#endif /* FEATURE_GL */
diff --git a/src/mesa/state_tracker/st_cb_xformfb.h b/src/mesa/state_tracker/st_cb_xformfb.h
index c5261b3..c4f627f 100644
--- a/src/mesa/state_tracker/st_cb_xformfb.h
+++ b/src/mesa/state_tracker/st_cb_xformfb.h
@@ -36,7 +36,7 @@ struct dd_function_table;
struct gl_transform_feedback_object;
struct pipe_draw_info;
-#if FEATURE_EXT_transform_feedback
+#if FEATURE_GL
extern void
st_init_xformfb_functions(struct dd_function_table *functions);
@@ -58,6 +58,6 @@ st_transform_feedback_draw_init(struct gl_transform_feedback_object *obj,
{
}
-#endif /* FEATURE_EXT_transform_feedback */
+#endif /* FEATURE_GL */
#endif /* ST_CB_XFORMFB_H */
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index a923aa1..f65d0c3 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -1281,7 +1281,7 @@ vbo_exec_MultiDrawElementsBaseVertex(GLenum mode,
basevertex);
}
-#if FEATURE_EXT_transform_feedback
+#if FEATURE_GL
static void
vbo_draw_transform_feedback(struct gl_context *ctx, GLenum mode,
@@ -1409,7 +1409,7 @@ vbo_exec_array_init( struct vbo_exec_context *exec )
exec->vtxfmt.DrawElementsInstancedBaseInstance = vbo_exec_DrawElementsInstancedBaseInstance;
exec->vtxfmt.DrawElementsInstancedBaseVertex = vbo_exec_DrawElementsInstancedBaseVertex;
exec->vtxfmt.DrawElementsInstancedBaseVertexBaseInstance = vbo_exec_DrawElementsInstancedBaseVertexBaseInstance;
-#if FEATURE_EXT_transform_feedback
+#if FEATURE_GL
exec->vtxfmt.DrawTransformFeedback = vbo_exec_DrawTransformFeedback;
exec->vtxfmt.DrawTransformFeedbackStream =
vbo_exec_DrawTransformFeedbackStream;
@@ -1494,7 +1494,7 @@ _mesa_MultiDrawElementsBaseVertex(GLenum mode,
primcount, basevertex);
}
-#if FEATURE_EXT_transform_feedback
+#if FEATURE_GL
void GLAPIENTRY
_mesa_DrawTransformFeedback(GLenum mode, GLuint name)
--
1.7.8.6
More information about the mesa-dev
mailing list