summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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();
}