summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-02-09 12:12:09 -0700
committerBrian Paul <[email protected]>2009-02-09 12:12:29 -0700
commit60b3fe6c19eb881f6193ba46450c0c9f559a10e5 (patch)
tree5c1f0c53278ed18ec27d52a6078bcfcfe4bed651 /src/mesa
parent1a46c8a062aea59de5cf55881104489db5d609e5 (diff)
i965: need to disable current shader, if any, in intel_clear_tris()
Fixes bad background in all the progs/glsl/ tests.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/intel/intel_clear.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_clear.c b/src/mesa/drivers/dri/intel/intel_clear.c
index f95d055e621..a47c4d4050e 100644
--- a/src/mesa/drivers/dri/intel/intel_clear.c
+++ b/src/mesa/drivers/dri/intel/intel_clear.c
@@ -39,6 +39,7 @@
#include "main/macros.h"
#include "main/matrix.h"
#include "main/texstate.h"
+#include "main/shaders.h"
#include "main/stencil.h"
#include "main/varray.h"
#include "glapi/dispatch.h"
@@ -71,6 +72,7 @@ intel_clear_tris(GLcontext *ctx, GLbitfield mask)
struct gl_framebuffer *fb = ctx->DrawBuffer;
int i;
GLboolean saved_fp_enable = GL_FALSE, saved_vp_enable = GL_FALSE;
+ GLboolean saved_shader_program = 0;
unsigned int saved_active_texture;
assert((mask & ~(BUFFER_BIT_BACK_LEFT | BUFFER_BIT_FRONT_LEFT |
@@ -109,6 +111,10 @@ intel_clear_tris(GLcontext *ctx, GLbitfield mask)
saved_vp_enable = GL_TRUE;
_mesa_Disable(GL_VERTEX_PROGRAM_ARB);
}
+ if (ctx->Extensions.ARB_shader_objects && ctx->Shader.CurrentProgram) {
+ saved_shader_program = ctx->Shader.CurrentProgram->Name;
+ _mesa_UseProgramObjectARB(0);
+ }
if (ctx->Texture._EnabledUnits != 0) {
int i;
@@ -215,6 +221,9 @@ intel_clear_tris(GLcontext *ctx, GLbitfield mask)
if (saved_vp_enable)
_mesa_Enable(GL_VERTEX_PROGRAM_ARB);
+ if (saved_shader_program)
+ _mesa_UseProgramObjectARB(saved_shader_program);
+
_mesa_PopClientAttrib();
_mesa_PopAttrib();
}