Message ID | 87d1i4mg2p.fsf@riseup.net |
---|---|
State | New |
Headers | show |
On Wed, Nov 9, 2016 at 11:41 PM, Francisco Jerez <currojerez@riseup.net> wrote: >>>>> @@ -3622,7 +3636,6 @@ piglit_init(int argc, char **argv) >>>>> sso_in_use = false; >>>>> prog_err_info = NULL; >>>>> vao = 0; >>>>> - fbo = 0; >>>> >>>> This breaks some piglit tests with --process-isolation 0. Adding >>>> "draw_fbo = 0" here fixes that. Is that the right fix? >>>> >>> >>> Interesting, I guess the test breaks while trying to deallocate the FBO >>> From the previous test? Or does it break in some other way? In the >>> former case I guess that setting 'draw_fbo = 0' would work around the >>> issue, but it would probably also lead to FBO object leaks. >> >> No idea what's causing the failures, but releasing the FBO should be >> really easy at the end of that block. >> > > Does the attached patch fix the problem for you? I didn't get a full > piglit run to work with --process-isolation 0, so I couldn't confirm > whether it fixes the issue. Yes, it fixes the issue. Thanks. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Marek
From c210a937315a2f2eb63926af1cb15f27a4fa3e4c Mon Sep 17 00:00:00 2001 From: Francisco Jerez <currojerez@riseup.net> Date: Wed, 9 Nov 2016 14:36:47 -0800 Subject: [PATCH] shader_runner: Release FBOs at the end of every subtest run. --- tests/shaders/shader_runner.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c index e2d9849..a835781 100644 --- a/tests/shaders/shader_runner.c +++ b/tests/shaders/shader_runner.c @@ -2666,6 +2666,22 @@ setup_ubos(void) } static void +teardown_fbos(void) +{ + if (draw_fbo != 0 && + draw_fbo != piglit_winsys_fbo) + glDeleteFramebuffers(1, &draw_fbo); + + if (read_fbo != 0 && + read_fbo != piglit_winsys_fbo && + read_fbo != draw_fbo) + glDeleteFramebuffers(1, &read_fbo); + + draw_fbo = 0; + read_fbo = 0; +} + +static void teardown_ubos(void) { if (num_uniform_blocks == 0) { @@ -3983,6 +3999,7 @@ piglit_init(int argc, char **argv) /* destroy GL objects? */ teardown_ubos(); teardown_atomics(); + teardown_fbos(); } exit(0); } -- 2.10.1