[PATCH v2 0/1] MR165: 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. -- v2: tests: Pop the shader runner context after processing the current section. https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/165
From: Giovanni Mascellani <gmascellani(a)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) -- GitLab https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/165
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.
-- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/165#note_30335
This merge request was approved by Zebediah Figura. -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/165
This merge request was approved by Henri Verbeet. -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/165
participants (4)
-
Giovanni Mascellani -
Giovanni Mascellani (@giomasce) -
Henri Verbeet (@hverbeet) -
Zebediah Figura (@zfigura)