This way failures produced while compiling or preprocessing a shader are shown with the appropriate context.
-- v2: tests: Pop the shader runner context after processing the current section.
From: Giovanni Mascellani gmascellani@codeweavers.com
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)
On Tue Apr 18 09:56:52 2023 +0000, Zebediah Figura wrote:
This is actually kind of broken as-is, because [require] does an early return without popping the context.
Ouch, I had missed it. Should be better now.
This merge request was approved by Zebediah Figura.
This merge request was approved by Henri Verbeet.