[Piglit] [PATCH] arb_fb_no_attach: add multisampling subtests
Ilia Mirkin
imirkin at alum.mit.edu
Sat Jan 30 22:28:16 PST 2016
Test both MS and per-sample shaded cases. With MS, there should be no
additional invocations, while with per-sample shading, each sample
should be counted.
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
The "MS4" test fails for me on nvc0 for some reason... it ends up with a whole extra column's worth of counting added. No idea why... perhaps this is somehow permissible and happens as a result of the seam?
tests/spec/arb_framebuffer_no_attachments/atomic.c | 24 ++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/tests/spec/arb_framebuffer_no_attachments/atomic.c b/tests/spec/arb_framebuffer_no_attachments/atomic.c
index 0c62ac3..553ff02 100644
--- a/tests/spec/arb_framebuffer_no_attachments/atomic.c
+++ b/tests/spec/arb_framebuffer_no_attachments/atomic.c
@@ -157,6 +157,30 @@ piglit_init(int argc, char **argv)
pass &= compare_counter(4, "glViewport");
+ /* Reset counter and add samples to the default fb */
+ reset_counter();
+ glViewport(0, 0, piglit_width, piglit_height);
+ glFramebufferParameteri(GL_FRAMEBUFFER,
+ GL_FRAMEBUFFER_DEFAULT_SAMPLES, 4);
+
+ piglit_draw_rect(-1, -1, 2, 2);
+
+ pass &= compare_counter(piglit_width * piglit_height, "MS4");
+
+ if (piglit_is_extension_supported("GL_ARB_sample_shading")) {
+ /* Reset counter and enable per-sample shading */
+ reset_counter();
+ glEnable(GL_SAMPLE_SHADING_ARB);
+ glMinSampleShadingARB(1.0);
+
+ piglit_draw_rect(-1, -1, 2, 2);
+
+ pass &= compare_counter(piglit_width * piglit_height * 4,
+ "Per-sample");
+ } else {
+ piglit_report_subtest_result(PIGLIT_SKIP, "Per-sample");
+ }
+
glDeleteFramebuffers(1, &fbo);
glDeleteVertexArrays(1, &vao);
glDeleteBuffers(1, &buffer);
--
2.4.10
More information about the Piglit
mailing list