From 62e7cd2aca3f07438a8b25658918b3c87e6ebda6 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Tue, 15 Sep 2009 23:50:45 +0800 Subject: mesa: Save META_SHADER in _mesa_meta_draw_tex. --- src/mesa/drivers/common/meta.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 5c794ee443..737ffd36bd 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -2061,7 +2061,7 @@ _mesa_meta_generate_mipmap(GLcontext *ctx, GLenum target, /** * Meta implementation of ctx->Driver.DrawTex() in terms - * of texture mapping and polygon rendering. + * of polygon rendering. */ void _mesa_meta_draw_tex(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z, @@ -2072,16 +2072,13 @@ _mesa_meta_draw_tex(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z, GLfloat x, y, z, st[MAX_TEXTURE_UNITS][2]; }; struct vertex verts[4]; - GLboolean vp_enabled; GLuint i; _mesa_meta_begin(ctx, (META_RASTERIZATION | + META_SHADER | META_TRANSFORM | META_VERTEX | META_VIEWPORT)); - vp_enabled = ctx->VertexProgram.Enabled; - if (vp_enabled) - _mesa_set_enable(ctx, GL_VERTEX_PROGRAM_ARB, GL_FALSE); if (drawtex->ArrayObj == 0) { /* one-time setup */ @@ -2174,8 +2171,6 @@ _mesa_meta_draw_tex(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z, _mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4); - if (vp_enabled) - _mesa_set_enable(ctx, GL_VERTEX_PROGRAM_ARB, GL_TRUE); _mesa_meta_end(ctx); } -- cgit v1.2.3 From 25e6736400f3667b3c0c879fc1dc1bf92f5ef44e Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Wed, 23 Sep 2009 14:36:37 +0800 Subject: es: Add support for GL_ARB_texture_non_power_of_two. --- src/mesa/es/main/specials_es1.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/es/main/specials_es1.c b/src/mesa/es/main/specials_es1.c index 02c3247e94..e26bd1ebc4 100644 --- a/src/mesa/es/main/specials_es1.c +++ b/src/mesa/es/main/specials_es1.c @@ -138,6 +138,9 @@ make_extension_string(const GLcontext *ctx, char *str) if (ctx->Extensions.EXT_texture_filter_anisotropic) len += append_extension(&str, "GL_EXT_texture_filter_anisotropic"); + if (ctx->Extensions.ARB_texture_non_power_of_two) + len += append_extension(&str, "GL_ARB_texture_non_power_of_two"); + return len; } -- cgit v1.2.3 From dce62509e5d3f7fb8c5890fac51ec2d218c15960 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Wed, 23 Sep 2009 14:44:09 +0800 Subject: mesa: Pixel zoom should be ignored in _mesa_meta_draw_tex. --- src/mesa/drivers/common/meta.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 737ffd36bd..896e258712 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -2109,8 +2109,8 @@ _mesa_meta_draw_tex(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z, /* vertex positions, texcoords */ { - const GLfloat x1 = x + width * ctx->Pixel.ZoomX; - const GLfloat y1 = y + height * ctx->Pixel.ZoomY; + const GLfloat x1 = x + width; + const GLfloat y1 = y + height; verts[0].x = x; verts[0].y = y; -- cgit v1.2.3