[Piglit] [PATCH v2] gl-1.0-simple-renderbuffer: add a protection from test failure when an user fbo is defined
Sandra Koroniewska
sandra.koroniewska at gmail.com
Tue Apr 25 12:07:22 UTC 2017
This fixes spec/gl-1.0/simple-readbuffer with the argument "-fbo" according to OpenGL 4.4 spec (page 476).
---
tests/spec/gl-1.0/simple-readbuffer.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/spec/gl-1.0/simple-readbuffer.c b/tests/spec/gl-1.0/simple-readbuffer.c
index e5b67bf4d..6abe45607 100644
--- a/tests/spec/gl-1.0/simple-readbuffer.c
+++ b/tests/spec/gl-1.0/simple-readbuffer.c
@@ -45,7 +45,10 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- glReadBuffer(GL_FRONT);
+ if (!piglit_use_fbo)
+ glReadBuffer(GL_FRONT);
+ else
+ glReadBuffer(GL_COLOR_ATTACHMENT0);
if (!piglit_check_gl_error(GL_NO_ERROR)) {
piglit_report_result(PIGLIT_FAIL);
--
2.11.0.windows.1
More information about the Piglit
mailing list