i965: Add glBlitFramebuffer to commands affected by conditional rendering
authorAnuj Phogat <anuj.phogat@gmail.com>
Fri, 4 Apr 2014 23:49:19 +0000 (16:49 -0700)
committerAnuj Phogat <anuj.phogat@gmail.com>
Thu, 17 Apr 2014 17:26:39 +0000 (10:26 -0700)
Fixes failures in Khronos OpenGL CTS test conditional_render_test9

Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/intel_fbo.c

index c70b1bf36b2806854673c57b874598a86a9012c7..f58d7c85b27013c4e7620fafa76a50cd63aed407 100644 (file)
@@ -38,6 +38,7 @@
 #include "main/image.h"
 #include "main/hash_table.h"
 #include "main/set.h"
+#include "main/condrender.h"
 
 #include "swrast/swrast.h"
 #include "drivers/common/meta.h"
@@ -851,6 +852,13 @@ intel_blit_framebuffer(struct gl_context *ctx,
                        GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
                        GLbitfield mask, GLenum filter)
 {
+   /* Page 679 of OpenGL 4.4 spec says:
+    *    "Added BlitFramebuffer to commands affected by conditional rendering in
+    *     section 10.10 (Bug 9562)."
+    */
+   if (!_mesa_check_conditional_render(ctx))
+      return;
+
    mask = brw_blorp_framebuffer(brw_context(ctx),
                                 srcX0, srcY0, srcX1, srcY1,
                                 dstX0, dstY0, dstX1, dstY1,