[Piglit] [PATCH] util/wfl: unbound the current context before destroying its window
Emil Velikov
emil.l.velikov at gmail.com
Tue Sep 30 18:01:57 PDT 2014
Otherwise we end up leaking the drawable. Spotted by Valgrind
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
Perhaps we can simplify the call chain for the following a bit
make_current > make_current_singlepass > special_case31 >
make_curren_singlepass...
But that for another day :P
-Emil
tests/util/piglit-framework-gl/piglit_wfl_framework.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/util/piglit-framework-gl/piglit_wfl_framework.c b/tests/util/piglit-framework-gl/piglit_wfl_framework.c
index ac99e00..c762b00 100644
--- a/tests/util/piglit-framework-gl/piglit_wfl_framework.c
+++ b/tests/util/piglit-framework-gl/piglit_wfl_framework.c
@@ -458,6 +458,7 @@ special_case_gl31(struct piglit_wfl_framework *wfl_fw,
"profile if context creation succeeds.",
context_description, error_verb);
+ waffle_make_current(wfl_fw->display, NULL, NULL);
waffle_window_destroy(wfl_fw->window);
waffle_context_destroy(wfl_fw->context);
waffle_config_destroy(wfl_fw->config);
@@ -536,6 +537,7 @@ make_context_current_singlepass(struct piglit_wfl_framework *wfl_fw,
return true;
fail:
+ waffle_make_current(wfl_fw->display, NULL, NULL);
waffle_window_destroy(wfl_fw->window);
waffle_context_destroy(wfl_fw->context);
waffle_config_destroy(wfl_fw->config);
@@ -645,6 +647,7 @@ fail:
void
piglit_wfl_framework_teardown(struct piglit_wfl_framework *wfl_fw)
{
+ waffle_make_current(wfl_fw->display, NULL, NULL);
waffle_window_destroy(wfl_fw->window);
waffle_context_destroy(wfl_fw->context);
waffle_config_destroy(wfl_fw->config);
--
2.1.0
More information about the Piglit
mailing list