From: Stefan Dösinger Date: Wed, 5 Dec 2012 22:08:21 +0000 (+0100) Subject: meta: Disable GL_FRAGMENT_SHADER_ATI in MESA_META_SHADER X-Git-Tag: accepted/2.0alpha-wayland/20130301.050525~56 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=794c133dfb954268fe8ee5989af81d891901de08;p=profile%2Fivi%2Fmesa.git meta: Disable GL_FRAGMENT_SHADER_ATI in MESA_META_SHADER Fixes clears in Wine on r200. NOTE: This is a candidate for stable release branches. Reviewed-by: Ian Romanick Signed-off-by: Alex Deucher (cherry picked from commit d8069b7603c368c59e7a605d696d2bd65ad414f6) Port to 9.0: Andreas Boll s/API_OPENGL_COMPAT/API_OPENGL/ --- diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 71d1279..17cdcad 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -133,6 +133,7 @@ struct save_state struct gl_vertex_program *VertexProgram; GLboolean FragmentProgramEnabled; struct gl_fragment_program *FragmentProgram; + GLboolean ATIFragmentShaderEnabled; struct gl_shader_program *VertexShader; struct gl_shader_program *GeometryShader; struct gl_shader_program *FragmentShader; @@ -626,6 +627,11 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state) _mesa_set_enable(ctx, GL_FRAGMENT_PROGRAM_ARB, GL_FALSE); } + if (ctx->API == API_OPENGL && ctx->Extensions.ATI_fragment_shader) { + save->ATIFragmentShaderEnabled = ctx->ATIFragmentShader.Enabled; + _mesa_set_enable(ctx, GL_FRAGMENT_SHADER_ATI, GL_FALSE); + } + if (ctx->Extensions.ARB_shader_objects) { _mesa_reference_shader_program(ctx, &save->VertexShader, ctx->Shader.CurrentVertexProgram); @@ -942,6 +948,11 @@ _mesa_meta_end(struct gl_context *ctx) _mesa_reference_fragprog(ctx, &save->FragmentProgram, NULL); } + if (ctx->API == API_OPENGL && ctx->Extensions.ATI_fragment_shader) { + _mesa_set_enable(ctx, GL_FRAGMENT_SHADER_ATI, + save->ATIFragmentShaderEnabled); + } + if (ctx->Extensions.ARB_vertex_shader) _mesa_use_shader_program(ctx, GL_VERTEX_SHADER, save->VertexShader);