>From b882d9e08932198e243b9cbb534d01d547661f86 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?=
Date: Mon, 3 Dec 2012 11:03:26 +0100
Subject: [PATCH 1/4] meta: Disable GL_FRAGMENT_SHADER_ATI in MESA_META_SHADER
Fixes clears in Wine on r200.
---
src/mesa/drivers/common/meta.c | 11 +++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index d5e8af3..ad21fa8 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;
@@ -594,6 +595,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_COMPAT && 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);
@@ -914,6 +920,11 @@ _mesa_meta_end(struct gl_context *ctx)
_mesa_reference_fragprog(ctx, &save->FragmentProgram, NULL);
}
+ if (ctx->API == API_OPENGL_COMPAT && 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);
--
1.7.8.6
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev