Commit Graph

129 Commits

Author SHA1 Message Date
Elizabeth Figura
5a53b73995 tests: Test alpha test. 2024-07-11 17:02:53 +02:00
Elizabeth Figura
7e868f1f4b tests: Factor out a set_default_target() helper. 2024-07-11 17:02:45 +02:00
Elizabeth Figura
737967604e tests: Implement multisampling in the Vulkan renderer. 2024-07-11 00:33:57 +02:00
Elizabeth Figura
fe21318b5f tests/shader_runner: Factor out a resource_desc structure. 2024-07-11 00:33:57 +02:00
Elizabeth Figura
fa570ee1f3 tests/shader_runner: Use resource->width instead of resource->size for buffer width. 2024-07-11 00:33:57 +02:00
Giovanni Mascellani
4f67675a51 tests: Support using the Agility SDK in the crosstests. 2024-07-09 16:57:03 +02:00
Elizabeth Figura
d3ba810c98 tests: Stop probing all pixels when drawing a uniform colour.
This is simply unnecessary and wastes time.

As part of this, simply remove the "all" directive. Only for a couple of tests
is it even potentially interesting to validate all pixels (e.g.
nointerpolation.shader_test), and for those "all" is replaced with an explicit
(0, 0, 640, 480) rect.

In all other cases we just probe (0, 0).
2024-06-13 23:55:31 +02:00
Conor McCarthy
7534b88a15 tests/shader-runner: Set the correct flag and format for raw UAVs. 2024-06-11 15:55:48 +02:00
Henri Verbeet
9693271dcf tests: Rename VKD3D_TESTS_SKIP_DXC to VKD3D_TEST_SKIP_DXC.
For consistency with the other VKD3D_TEST_* environment variables.
2024-05-27 21:08:14 +02:00
Conor McCarthy
00b0b8d65c tests/hlsl: Add a geometry shader test. 2024-05-08 21:08:13 +02:00
Conor McCarthy
e6c802e713 tests/shader-runner: Free the hull and domain shader source code. 2024-05-08 21:08:11 +02:00
Conor McCarthy
29786d7efb tests/shader-runner: Add a 'require' directive for wave ops. 2024-05-02 22:18:53 +02:00
Conor McCarthy
c2a787181f tests/hlsl: Add SV_Coverage tests. 2024-04-30 16:32:10 +02:00
Conor McCarthy
0bd6083785 tests/hlsl: Add an SV_InstanceId test. 2024-04-30 16:32:10 +02:00
Henri Verbeet
2b6012df7d tests/shader_runner: Use WIDL_C_INLINE_WRAPPERS. 2024-04-24 23:48:44 +02:00
Francisco Casas
dbb9cfd958 tests/shader-runner: Report whole-block errors on the block's starting line.
So, if there is an error or a trace on "[pixel shader]" or similar
blocks, they get reported in the line with the tag at the beginning of
the block and no on the line where the next block starts.
2024-04-24 23:47:55 +02:00
Giovanni Mascellani
09630ada90 tests: Allow compiling shaders with DXC on crosstests.
This is currently disabled on the CI because dxcompiler.dll is not
available.
2024-04-22 23:13:48 +02:00
Giovanni Mascellani
53fd1a95fc tests: Allow skipping DXC tests at runtime. 2024-04-22 23:13:48 +02:00
Conor McCarthy
7eeca3fa39 tests/hlsl: Add tests for SV_DepthLessEqual and SV_DepthGreaterEqual. 2024-04-19 22:23:42 +02:00
Conor McCarthy
b68a9ae3ec tests/hlsl: Add tests for SV_Depth. 2024-04-19 22:23:40 +02:00
Conor McCarthy
696fc12061 tests/hlsl: Add tests for GetSamplePosition() and GetSampleCount(). 2024-04-17 22:51:30 +02:00
Conor McCarthy
2379bda36f tests/hlsl: Add a tessellation test. 2024-04-16 22:18:12 +02:00
Zebediah Figura
083a58767a tests: Test HLSL unbounded array syntax.
Change the shader in test_unbounded_samplers() to also test a nested array.
Note that the changed shader compiles to the same bytecode.
2024-04-09 12:27:49 -05:00
Henri Verbeet
0715734dfb tests/shader_runner: Add GLSL support to the GL runner. 2024-03-19 22:57:50 +01:00
Conor McCarthy
52a831ba0d tests/hlsl: Add UAV counter tests. 2024-03-18 23:07:21 +01:00
Conor McCarthy
7fcf1b6ca2 tests/shader-runner: Add sampler comparison tests. 2024-03-11 22:09:08 +01:00
Conor McCarthy
13143700b7 tests/shader-runner: Add raw UAV tests. 2024-03-06 23:04:11 +01:00
Conor McCarthy
9180ea6591 tests/shader-runner: Add a test for a signed int typed buffer UAV.
Check for backend type mismatches resulting from the absence of
signedness in SM 6.
2024-02-22 22:45:04 +01:00
Conor McCarthy
081c9dbc96 tests/shader-runner: Support structured buffer UAVs. 2024-02-22 22:45:02 +01:00
Conor McCarthy
a04f16918f tests/shader-runner: Support scalar signed int probe values. 2024-02-20 22:50:12 +01:00
Henri Verbeet
54142eb0bd tests/shader_runner: Print information about the run configuration in run_shader_tests(). 2024-02-19 21:12:33 +01:00
Henri Verbeet
f15a0ace3e tests/shader_runner: Print a summary of the runner capabilities in run_shader_tests(). 2024-02-19 21:12:32 +01:00
Henri Verbeet
930fbcbb26 tests/shader_runner: Pass the runner capabilities to run_shader_tests().
Allowing these to be checked by run_shader_tests() itself, instead of
reimplementing those checks in each individual runner.
2024-02-19 21:12:30 +01:00
Francisco Casas
4fe9ab0a90 tests/shader-runner: Change probe directive syntax on shader_test files.
For consistency with the previous commit.
2024-02-19 21:11:53 +01:00
Francisco Casas
b08be04465 tests/shader-runner: Change resource declaration syntax on shader_test files.
On shader_test files, now resources should be declared this way:

    [texture n]       -> [srv n]
    [srv buffer n]    -> [srv n]
    [uav n]           -> [uav n]
    [uav buffer n]    -> [uav n]
    [vertex buffer n] -> [vb n]
    [render target n] -> [rtv n]

The dimension (buffer or 2D) is now specified as an additional parameter
in the "size" directive:

  For 2D resources:
  size (n, m)         -> size (2d, n, m)

  For buffers:
  size (n, 1)         -> size (buffer, n)
2024-02-19 21:11:52 +01:00
Francisco Casas
4d855611b7 tests/shader-runner: Support SRV buffers. 2024-02-19 21:11:51 +01:00
Francisco Casas
22a0f14a2f tests/shader-runner: Separate resource_type into type and dimension.
If in the same shader_test file we have both a [buffer uav n] and a
[uav n] with the same slot "n", we want the last one to override the
first one instead of passing both resources to the backends.

Same for [buffer srv n] and [texture n] after we introduce SRV buffers.
2024-02-19 21:11:49 +01:00
Evan Tang
628acb6b96 tests: Add some tests for rasteriser-ordered views. 2024-02-14 21:48:53 +01:00
Henri Verbeet
0f3a42c34b tests: Implement check_requirements() for the OpenGL shader runner. 2024-02-13 22:51:36 +01:00
Francisco Casas
22c47e57f5 tests/shader-runner: Introduce "if" qualifier.
When the "if" qualifier is added to a directive, the directive is
skipped if the shader->minimum_shader_model is not included in the
range.

This can be used on the "probe" directives for tests that have different
expected results on different shader models, without having to resort to
[require] blocks.
2024-02-13 22:51:22 +01:00
Francisco Casas
0f9f5269e9 tests/vkd3d-shader: Set uninitialized uniforms to a value.
Avoids a potential source of non-determinism because the padding bytes
between uniforms could be left uninitialized.
2024-02-13 22:51:19 +01:00
Evan Tang
13ac795061 tests/shader-runner: Support testing for integer pixel data.
Modified by Conor McCarthy to use read_uint() and read_uint4().
2024-02-01 22:24:54 +01:00
Francisco Casas
d7ffdd7340 tests/shader_runner: Free runner->cs_source and runner->fx_source (valgrind). 2024-01-25 22:24:34 +01:00
Francisco Casas
70e1924e6e tests/shader_runner: Free runner->input_elements in parse_test_directive() (valgrind). 2024-01-25 22:24:33 +01:00
Francisco Casas
48e61fa323 tests/shader_runner: Free runner->uniforms (valgrind). 2024-01-25 22:24:31 +01:00
Francisco Casas
969350a280 tests/shader_runner: Free params.data on test directives (valgrind). 2024-01-25 22:24:30 +01:00
Francisco Casas
1c73513425 tests: Use the vulkan runner to run SM1 compilation tests.
At the current moment this is a little odd because for SM1 [test]
directives are skipped, and the [shader] directives are not executed by
the shader_runner_vulkan.c:compile_shader() but by the general
shader_runner.c:compile_shader(). So in principle it is a little weird
that we go through the vulkan runner.

But fret not, because in the future we plan to make the parser agnostic
to the language of the tests, so we will get rid of the general
shader_runner.c:compile_shader() function and instead call a
runner->compile_shader() function, defined for each runner. Granted,
most of these may call a generic implementation that uses native
compiler in Windows, and vkd3d-shader on Linux, but it would be more
conceptually correct.
2024-01-24 22:37:44 +01:00
Francisco Casas
671f4ec2b2 tests/shader-runner: Call each runner only once.
If the runners require multiple calls to run_shader_tests() for
different shader model ranges, these are moved inside the sole runner
call.

For the same reason, the trace() messages are also moved inside the
runner calls.
2024-01-24 22:37:34 +01:00
Francisco Casas
79de3ec766 tests/shader-runner: Support reading multiple model range args for qualifiers.
We can now pass (sm<4) and (sm>=4) to "fail" and "todo" qualifiers, and
we can use multiple of these qualifier arguments using "&" for AND and
"|" for OR.

examples:
todo(sm>=4 & sm<6)
todo(sm<4 | sm>6)

parenthesis are not supported.

Adding additional model ranges for the tests, if we need them, should be
easier now, since they only have to be added to the "valid_args" array.
2024-01-24 22:37:30 +01:00
Henri Verbeet
62f18f749b tests: Print the failing line numbers when a test fails.
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 that a test fails at.
2024-01-02 23:03:25 +01:00