summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_clear.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/swrast/s_clear.c')
-rw-r--r--src/mesa/swrast/s_clear.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/swrast/s_clear.c b/src/mesa/swrast/s_clear.c
index 2d27797d43..21167a64b3 100644
--- a/src/mesa/swrast/s_clear.c
+++ b/src/mesa/swrast/s_clear.c
@@ -24,6 +24,7 @@
#include "main/glheader.h"
#include "main/colormac.h"
+#include "main/condrender.h"
#include "main/formats.h"
#include "main/macros.h"
#include "main/imports.h"
@@ -300,6 +301,9 @@ _swrast_Clear(GLcontext *ctx, GLbitfield buffers)
}
#endif
+ if (!_mesa_check_conditional_render(ctx))
+ return; /* don't clear */
+
swrast_render_start(ctx);
/* do software clearing here */