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.
This commit is contained in:
Giovanni Mascellani 2023-04-17 14:53:24 +02:00 committed by Alexandre Julliard
parent db7359f36a
commit 625155bd3c
Notes: Alexandre Julliard 2023-04-19 22:12:02 +02:00
Approved-by: Zebediah Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/165

View File

@ -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)