From: Petrichor Park ppark@codeweavers.com
Currently, if a probe fails, it will print the line number of the [test] block the probe is in, not the line number of the probe itself. This makes it somewhat difficult to debug.
This commit makes it print the line number of the probe as well. --- tests/shader_runner.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tests/shader_runner.c b/tests/shader_runner.c index 0e6104ce3..d821a7571 100644 --- a/tests/shader_runner.c +++ b/tests/shader_runner.c @@ -533,7 +533,7 @@ static void read_uint64_t2(const char **line, struct u64vec2 *v) read_uint64(line, &v->y); }
-static void parse_test_directive(struct shader_runner *runner, const char *line) +static void parse_test_directive(struct shader_runner *runner, const char *line, unsigned int line_number) { char *rest; int ret; @@ -658,6 +658,8 @@ static void parse_test_directive(struct shader_runner *runner, const char *line) if (runner->last_render_failed) return;
+ vkd3d_test_push_context("probe line %u", line_number); + if (match_string(line, "uav", &line)) { slot = strtoul(line, &rest, 10); @@ -742,6 +744,7 @@ static void parse_test_directive(struct shader_runner *runner, const char *line) }
runner->ops->release_readback(runner, rb); + vkd3d_test_pop_context(); } else if (match_string(line, "uniform", &line)) { @@ -1482,7 +1485,7 @@ void run_shader_tests(struct shader_runner *runner, const struct shader_runner_o /* Compilation which fails with dxcompiler is not 'todo', therefore the tests are * not 'todo' either. They cannot run, so skip them entirely. */ if (!skip_tests && SUCCEEDED(expect_hr)) - parse_test_directive(runner, line); + parse_test_directive(runner, line, line_number); break; } }