diff options
author | Francisco Jerez <currojerez@riseup.net> | 2016-09-17 01:18:40 -0700 |
---|---|---|
committer | Francisco Jerez <currojerez@riseup.net> | 2016-11-07 14:07:05 -0800 |
commit | f17dbc83caac23f93384a3618f8dda226f2861c3 (patch) | |
tree | 34d478e804e40f82f586cee072307b64b98666da | |
parent | 36e225d034bdc183c0001b469cda111c4328b4ad (diff) |
shader_runner: Add winsys framebuffer binding command.
"fb winsys" binds the original window system framebuffer. Useful for
displaying the contents rendered into an offscreen framebuffer at the
end of the test.
-rw-r--r-- | tests/shaders/shader_runner.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c index d17e34640..2197c086b 100644 --- a/tests/shaders/shader_runner.c +++ b/tests/shaders/shader_runner.c @@ -3110,6 +3110,17 @@ piglit_display(void) piglit_report_result(PIGLIT_FAIL); } + } else if (parse_str(rest, "winsys", &rest)) { + fbo = piglit_winsys_fbo; + glBindFramebuffer(target, fbo); + if (!piglit_check_gl_error(GL_NO_ERROR)) { + fprintf(stderr, "glBindFramebuffer error\n"); + piglit_report_result(PIGLIT_FAIL); + } + + w = piglit_width; + h = piglit_height; + } else { fprintf(stderr, "Unknown fb bind subcommand " "\"%s\"\n", rest); @@ -3131,6 +3142,7 @@ piglit_display(void) * it's no longer reachable. */ if (draw_fbo != 0 && + draw_fbo != piglit_winsys_fbo && draw_fbo != (target == GL_DRAW_FRAMEBUFFER ? read_fbo : 0)) glDeleteFramebuffers(1, &draw_fbo); @@ -3146,6 +3158,7 @@ piglit_display(void) * it's no longer reachable. */ if (read_fbo != 0 && + read_fbo != piglit_winsys_fbo && read_fbo != (target == GL_READ_FRAMEBUFFER ? draw_fbo : 0)) glDeleteFramebuffers(1, &read_fbo); |