From 5489fc7b9f17de35af87cb7ceb464716dd1f946e Mon Sep 17 00:00:00 2001 From: Oliver McFadden Date: Tue, 11 Sep 2012 09:49:44 +0300 Subject: [PATCH] mesa: remove FEATURE_OES_draw_texture define. Signed-off-by: Oliver McFadden Reviewed-by: Brian Paul --- src/mesa/drivers/common/meta.c | 2 -- src/mesa/main/drawtex.c | 5 ----- src/mesa/main/drawtex.h | 4 ---- src/mesa/main/extensions.c | 2 -- src/mesa/main/mfeatures.h | 1 - src/mesa/main/texparam.c | 10 ---------- src/mesa/state_tracker/st_cb_drawtex.c | 6 ------ src/mesa/state_tracker/st_cb_drawtex.h | 16 ---------------- src/mesa/state_tracker/st_extensions.c | 2 -- 9 files changed, 48 deletions(-) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 0d569b63ea5..1454154618a 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -3807,7 +3807,6 @@ void _mesa_meta_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height) { -#if FEATURE_OES_draw_texture struct drawtex_state *drawtex = &ctx->Meta->DrawTex; struct vertex { GLfloat x, y, z, st[MAX_TEXTURE_UNITS][2]; @@ -3923,5 +3922,4 @@ _mesa_meta_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z, _mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4); _mesa_meta_end(ctx); -#endif /* FEATURE_OES_draw_texture */ } diff --git a/src/mesa/main/drawtex.c b/src/mesa/main/drawtex.c index 83485a928d8..d5cac22bd3b 100644 --- a/src/mesa/main/drawtex.c +++ b/src/mesa/main/drawtex.c @@ -28,9 +28,6 @@ #include "main/mtypes.h" -#if FEATURE_OES_draw_texture - - static void draw_texture(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height) @@ -133,5 +130,3 @@ _mesa_DrawTexxv(const GLfixed *coords) (GLfloat) coords[3] / 65536.0f, (GLfloat) coords[4] / 65536.0f); } - -#endif /* FEATURE_OES_draw_texture */ diff --git a/src/mesa/main/drawtex.h b/src/mesa/main/drawtex.h index 13ff6f97e9e..938b65fb2e9 100644 --- a/src/mesa/main/drawtex.h +++ b/src/mesa/main/drawtex.h @@ -29,8 +29,6 @@ #include "mfeatures.h" -#if FEATURE_OES_draw_texture - extern void GLAPIENTRY _mesa_DrawTexf(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height); @@ -55,7 +53,5 @@ _mesa_DrawTexx(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height); extern void GLAPIENTRY _mesa_DrawTexxv(const GLfixed *coords); -#endif /* FEATURE_OES_draw_texture */ - #endif /* DRAWTEX_H */ diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index d1a1529433f..dc5ea7843b3 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -235,9 +235,7 @@ static const struct extension extension_table[] = { { "GL_OES_depth24", o(EXT_framebuffer_object), ES1 | ES2, 2005 }, { "GL_OES_depth32", o(dummy_false), DISABLE, 2005 }, { "GL_OES_depth_texture", o(ARB_depth_texture), ES2, 2006 }, -#if FEATURE_OES_draw_texture { "GL_OES_draw_texture", o(OES_draw_texture), ES1, 2004 }, -#endif #if FEATURE_OES_EGL_image /* FIXME: Mesa expects GL_OES_EGL_image to be available in OpenGL contexts. */ { "GL_OES_EGL_image", o(OES_EGL_image), GL | ES1 | ES2, 2006 }, diff --git a/src/mesa/main/mfeatures.h b/src/mesa/main/mfeatures.h index 578cb6a4b94..fdecbd41815 100644 --- a/src/mesa/main/mfeatures.h +++ b/src/mesa/main/mfeatures.h @@ -111,7 +111,6 @@ #define FEATURE_NV_vertex_program FEATURE_GL #define FEATURE_OES_EGL_image 1 -#define FEATURE_OES_draw_texture FEATURE_ES1 #define FEATURE_OES_framebuffer_object FEATURE_ES #define FEATURE_OES_mapbuffer FEATURE_ES diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index e6140eb65f8..63a63b732a5 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -428,7 +428,6 @@ set_tex_parameteri(struct gl_context *ctx, } goto invalid_pname; -#if FEATURE_OES_draw_texture case GL_TEXTURE_CROP_RECT_OES: if (ctx->API != API_OPENGLES || !ctx->Extensions.OES_draw_texture) goto invalid_pname; @@ -438,7 +437,6 @@ set_tex_parameteri(struct gl_context *ctx, texObj->CropRect[2] = params[2]; texObj->CropRect[3] = params[3]; return GL_TRUE; -#endif case GL_TEXTURE_SWIZZLE_R_EXT: case GL_TEXTURE_SWIZZLE_G_EXT: @@ -728,8 +726,6 @@ _mesa_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params) need_update = set_tex_parameteri(ctx, texObj, pname, p); } break; - -#if FEATURE_OES_draw_texture case GL_TEXTURE_CROP_RECT_OES: { /* convert float params to int */ @@ -741,8 +737,6 @@ _mesa_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params) need_update = set_tex_parameteri(ctx, texObj, pname, iparams); } break; -#endif - case GL_TEXTURE_SWIZZLE_R_EXT: case GL_TEXTURE_SWIZZLE_G_EXT: case GL_TEXTURE_SWIZZLE_B_EXT: @@ -1398,7 +1392,6 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params ) *params = obj->Sampler.LodBias; break; -#if FEATURE_OES_draw_texture case GL_TEXTURE_CROP_RECT_OES: if (ctx->API != API_OPENGLES || !ctx->Extensions.OES_draw_texture) goto invalid_pname; @@ -1408,7 +1401,6 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params ) params[2] = obj->CropRect[2]; params[3] = obj->CropRect[3]; break; -#endif case GL_TEXTURE_SWIZZLE_R_EXT: case GL_TEXTURE_SWIZZLE_G_EXT: @@ -1573,7 +1565,6 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params ) *params = (GLint) obj->Sampler.LodBias; break; -#if FEATURE_OES_draw_texture case GL_TEXTURE_CROP_RECT_OES: if (ctx->API != API_OPENGLES || !ctx->Extensions.OES_draw_texture) goto invalid_pname; @@ -1583,7 +1574,6 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params ) params[2] = obj->CropRect[2]; params[3] = obj->CropRect[3]; break; -#endif case GL_TEXTURE_SWIZZLE_R_EXT: case GL_TEXTURE_SWIZZLE_G_EXT: case GL_TEXTURE_SWIZZLE_B_EXT: diff --git a/src/mesa/state_tracker/st_cb_drawtex.c b/src/mesa/state_tracker/st_cb_drawtex.c index d57e629f1e8..e87de44063e 100644 --- a/src/mesa/state_tracker/st_cb_drawtex.c +++ b/src/mesa/state_tracker/st_cb_drawtex.c @@ -34,9 +34,6 @@ #include "cso_cache/cso_context.h" -#if FEATURE_OES_draw_texture - - struct cached_shader { void *handle; @@ -306,6 +303,3 @@ st_destroy_drawtex(struct st_context *st) } NumCachedShaders = 0; } - - -#endif /* FEATURE_OES_draw_texture */ diff --git a/src/mesa/state_tracker/st_cb_drawtex.h b/src/mesa/state_tracker/st_cb_drawtex.h index 455da04e674..ccb615e983b 100644 --- a/src/mesa/state_tracker/st_cb_drawtex.h +++ b/src/mesa/state_tracker/st_cb_drawtex.h @@ -16,26 +16,10 @@ struct dd_function_table; struct st_context; -#if FEATURE_OES_draw_texture - extern void st_init_drawtex_functions(struct dd_function_table *functions); extern void st_destroy_drawtex(struct st_context *st); -#else - -static INLINE void -st_init_drawtex_functions(struct dd_function_table *functions) -{ -} - -static INLINE void -st_destroy_drawtex(struct st_context *st) -{ -} - -#endif /* FEATURE_OES_draw_texture */ - #endif /* ST_CB_DRAWTEX_H */ diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index ac11f127c06..ead5145a18c 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -535,9 +535,7 @@ void st_init_extensions(struct st_context *st) if (ctx->API != API_OPENGL) ctx->Extensions.OES_EGL_image_external = GL_TRUE; #endif -#if FEATURE_OES_draw_texture ctx->Extensions.OES_draw_texture = GL_TRUE; -#endif /* Expose the extensions which directly correspond to gallium caps. */ for (i = 0; i < Elements(cap_mapping); i++) { -- 2.30.2