[Piglit] [PATCH 15/15] arb_direct_state_access: Testing NamedFramebufferDrawBuffers.
Laura Ekstrand
laura at jlekstrand.net
Thu Mar 5 18:01:25 PST 2015
---
tests/spec/arb_direct_state_access/drawbuffers-multi.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/tests/spec/arb_direct_state_access/drawbuffers-multi.c b/tests/spec/arb_direct_state_access/drawbuffers-multi.c
index 06740b6..d4aa57e 100644
--- a/tests/spec/arb_direct_state_access/drawbuffers-multi.c
+++ b/tests/spec/arb_direct_state_access/drawbuffers-multi.c
@@ -85,13 +85,13 @@ piglit_init(int argc, char **argv)
static void
clear_subtest(float color[4], int att, const char *test_name)
{
- glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
glNamedFramebufferReadBuffer(fbo, GL_COLOR_ATTACHMENT0 + att);
- glBindFramebuffer(GL_READ_FRAMEBUFFER, fbo);
+ glBindFramebuffer(GL_READ_FRAMEBUFFER, fbo);
piglit_check_gl_error(GL_NO_ERROR);
SUBTESTCONDITION(piglit_probe_rect_rgb(0, 0, piglit_width,
piglit_height, color), pass, test_name);
+ glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
}
enum piglit_result
@@ -127,15 +127,14 @@ piglit_display(void)
textures[i], 0);
}
- glBindFramebuffer(GL_DRAW_FRAMEBUFFER, fbo);
- glBindFramebuffer(GL_READ_FRAMEBUFFER, fbo);
- piglit_check_gl_error(GL_NO_ERROR);
-
/* Set the draw buffers */
- glDrawBuffers(3, bufs);
+ glNamedFramebufferDrawBuffers(fbo, 3, bufs);
/* Draw the pretty colors. */
+ glBindFramebuffer(GL_DRAW_FRAMEBUFFER, fbo);
piglit_draw_rect(0, 0, piglit_width, piglit_height);
+ piglit_check_gl_error(GL_NO_ERROR);
+ glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
/* Make sure the correct colors were drawn */
clear_subtest(blue, 2, "Clear 2 to blue");
@@ -144,6 +143,7 @@ piglit_display(void)
/* Show the results of the last subtest on the screen */
if (!piglit_automatic) {
+ glBindFramebuffer(GL_READ_FRAMEBUFFER, fbo);
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, piglit_winsys_fbo);
glBlitFramebuffer(0, 0, piglit_width, piglit_height,
0, 0, piglit_width, piglit_height,
--
2.1.0
More information about the Piglit
mailing list