[PATCH vkd3d 3/5] tests: Use % as the shader_test comment character.
Giovanni Mascellani
gmascellani at codeweavers.com
Mon Oct 4 09:52:49 CDT 2021
Signed-off-by: Giovanni Mascellani <gmascellani at codeweavers.com>
Il 04/10/21 02:19, Zebediah Figura ha scritto:
> So as to avoid clashing with the preprocessor.
>
> Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
> ---
> tests/hlsl-array-dimension.shader_test | 3 ++-
> tests/hlsl-vector-indexing-uniform.shader_test | 2 +-
> tests/shader_runner_d3d12.c | 8 +++-----
> 3 files changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/tests/hlsl-array-dimension.shader_test b/tests/hlsl-array-dimension.shader_test
> index fdb52b144..469d36bf6 100644
> --- a/tests/hlsl-array-dimension.shader_test
> +++ b/tests/hlsl-array-dimension.shader_test
> @@ -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
> {
> diff --git a/tests/hlsl-vector-indexing-uniform.shader_test b/tests/hlsl-vector-indexing-uniform.shader_test
> index 2556b589e..26a458796 100644
> --- a/tests/hlsl-vector-indexing-uniform.shader_test
> +++ b/tests/hlsl-vector-indexing-uniform.shader_test
> @@ -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;
> diff --git a/tests/shader_runner_d3d12.c b/tests/shader_runner_d3d12.c
> index d5c0380e8..a0cdc5b38 100644
> --- a/tests/shader_runner_d3d12.c
> +++ b/tests/shader_runner_d3d12.c
> @@ -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;
> }
> }
>
More information about the wine-devel
mailing list