summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/spec/ext_framebuffer_multisample/draw-buffers-common.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/spec/ext_framebuffer_multisample/draw-buffers-common.cpp b/tests/spec/ext_framebuffer_multisample/draw-buffers-common.cpp
index 1a898b2ba..6f54dfe86 100644
--- a/tests/spec/ext_framebuffer_multisample/draw-buffers-common.cpp
+++ b/tests/spec/ext_framebuffer_multisample/draw-buffers-common.cpp
@@ -699,9 +699,19 @@ draw_image_to_window_system_fb(int draw_buffer_count, bool rhs)
GL_RGBA,
GL_FLOAT, image);
}
+
+ /* Rendering using gldrawPixels() with dual source blending enabled
+ * produces undefined results. So, disable blending in visualize_image
+ * function to avoid undefined behavior.
+ */
+ GLboolean isBlending;
+ glGetBooleanv(GL_BLEND, &isBlending);
+ glDisable(GL_BLEND);
visualize_image(image, GL_RGBA,
pattern_width, pattern_height,
draw_buffer_count + 1, rhs);
+ if(isBlending)
+ glEnable(GL_BLEND);
free(image);
}