Module: vkd3d Branch: master Commit: 625155bd3cc2812707ebb51ddf615a9c85e1c559 URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/625155bd3cc2812707ebb51ddf615a...
Author: Giovanni Mascellani gmascellani@codeweavers.com Date: Mon Apr 17 14:53:24 2023 +0200
tests: Pop the shader runner context after processing the current section.
This way failures produced while compiling or preprocessing a shader are shown with the appropriate context.
---
tests/shader_runner.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/tests/shader_runner.c b/tests/shader_runner.c index 9922496b..58ed2d98 100644 --- a/tests/shader_runner.c +++ b/tests/shader_runner.c @@ -780,9 +780,6 @@ void run_shader_tests(struct shader_runner *runner, const struct shader_runner_o
if (!ret || line[0] == '[') { - if (state != STATE_NONE) - vkd3d_test_pop_context(); - switch (state) { case STATE_INPUT_LAYOUT: @@ -793,7 +790,10 @@ void run_shader_tests(struct shader_runner *runner, const struct shader_runner_o
case STATE_REQUIRE: if (runner->ops->check_requirements && !runner->ops->check_requirements(runner)) + { + vkd3d_test_pop_context(); goto out; + } break;
case STATE_RESOURCE: @@ -884,6 +884,9 @@ void run_shader_tests(struct shader_runner *runner, const struct shader_runner_o break; } } + + if (state != STATE_NONE) + vkd3d_test_pop_context(); }
if (!ret)