tests: Use % as the shader_test comment character.

So as to avoid clashing with the preprocessor.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-10-03 19:19:07 -05:00 committed by Alexandre Julliard
parent 12acfd9724
commit 5f8becada4
3 changed files with 6 additions and 7 deletions

View File

@ -1,4 +1,5 @@
# Test what kinds of expressions are valid array dimensions.
% Test what kinds of expressions are valid array dimensions.
[pixel shader]
float4 main() : sv_target
{

View File

@ -1,4 +1,4 @@
# Use a uniform to prevent the compiler from optimizing.
% Use a uniform to prevent the compiler from optimizing.
[pixel shader]
uniform int i;

View File

@ -452,13 +452,12 @@ START_TEST(shader_runner_d3d12)
vkd3d_test_set_context("Section %.*s, line %u", strlen(line) - 1, line, line_number);
}
else if (line[0] != '\n')
else if (line[0] != '%' && line[0] != '\n')
{
switch (state)
{
case STATE_NONE:
if (line[0] != '#')
fprintf(stderr, "Ignoring line '%s' in %s.\n", line, argv[1]);
fprintf(stderr, "Ignoring line '%s' in %s.\n", line, argv[1]);
break;
case STATE_PREPROC:
@ -475,8 +474,7 @@ START_TEST(shader_runner_d3d12)
}
case STATE_TEST:
if (line[0] != '#')
parse_test_directive(&context, line);
parse_test_directive(&context, line);
break;
}
}