Commit Graph

88 Commits

Author SHA1 Message Date
8887501042 tests: Test I/O index ranges not intersecting a signature element for a given register.
Since this test depend on the specific code generated by the
native d3dcompiler we add the possibility to specify a "raw"
shader using a hex format. When the shader assembler is finally
available they should be replaced with assembly code.
2025-02-19 17:01:17 +01:00
033a0d29c5 tests/hlsl: Add some arithmetic uint16 shader tests. 2025-01-28 13:13:44 +01:00
a557ad0aea tests/hlsl: Add a test for SV_RenderTargetArrayIndex. 2025-01-27 14:52:28 +01:00
d5ed4df254 tests/shader_runner: Add a "mesa<23.3" tag. 2024-12-19 20:34:55 +01:00
ed552e4519 tests/hlsl: Add tests for the EvaluateAttribute*() intrinsics.
Based on earlier tests by Conor McCarthy.
2024-12-18 17:27:31 +01:00
e91c07e1de tests/shader_runner: Record HLSL todo/fail state for each shader model.
When a shader fails to compile for a range of versions, we want to validate that
we are correctly implementing that behaviour. E.g. if a feature requires shader
model 5.0, we should validate that it compiles correctly with 5.0 (which we do),
but also that it *fails* to compile with 4.1 (which we do not).

The obvious and simple solution is to simply run compile tests for each version.
There are, however, at least 12 versions of HLSL up to and including 6.0, at
least 10 of which are known to introduce new features. Shader compilation takes
about 10-15% of the time that draw and dispatch does, both for native and
(currently) vkd3d. Testing every version for every shader would add a
noticeable amount of time to the tests.

In practice, the interesting versions to test for most shaders are:

* At least one from each range 1-3, 4-5, and 6. It's common enough for the
  semantics of the HLSL to differ between bytecode formats, or for features to
  be added or removed across those boundaries.

* If the shader requires a given feature, we want to test both sides of the cusp
  to ensure we're requiring the same version for the feature.

In practice this is 3 or 4 versions, which is measurably less than the 12 we'd
otherwise be running.

In order to achieve this goal of testing only the 3 or 4 interesting versions
for a shader, we need to know what version is actually required for a feature.
This is encoded in the shader itself using e.g. [pixel shader fail(sm<5)].

This patch therefore implements the first step towards this goal, namely,
determining which versions succeed and fail, so we can figure out which ones are
interesting.

We could require the test writer to specify which versions are interesting ahead
of time (e.g. "for version in 2.0 4.1 5.0 6.0") but this is both redundant (and
there are a *lot* of tests that need some feature gate) and easy for a test
writer to get wrong by missing interesting versions.
2024-12-17 16:18:21 +01:00
d56601c8d0 vkd3d-shader/ir: Implement exponential fog. 2024-12-02 17:12:20 +01:00
1fbbc82f3a vkd3d-shader/ir: Allow controlling the fog source through a parameter. 2024-12-02 17:12:16 +01:00
f86d1e72a4 vkd3d-shader/ir: Allow controlling fog through parameters.
Fog requires several parameters to even implement the most basic of
functionality correctly, so this commit is relatively large.
2024-12-02 17:12:06 +01:00
7450c4a368 tests: Mark some tests in wave-reconvergence.shader_test as buggy on MoltenVK. 2024-11-06 22:15:09 +01:00
b0646cb427 tests/shader_runner: Introduce a Metal shader runner. 2024-10-31 16:47:26 +01:00
aeae8322da tests: Add a test for actual multisample loads.
The existing test loads from a single sample texture.
2024-10-28 17:58:05 +01:00
b3eee0a323 tests/shader_runner: Centralize the compile_hlsl() helper in shader_runner.c. 2024-10-28 17:23:10 +01:00
591ae5e18e tests/shader_runner: Store the dxc_compiler in the shader_runner. 2024-10-28 17:23:10 +01:00
b492ebc374 tests/shader_runner: Store shader sources as an array. 2024-10-28 17:23:06 +01:00
d39e840c14 tests/shader_runner: Store shader caps using an array. 2024-10-28 16:20:27 +01:00
6fd1a1ce7e tests: Test point sprite. 2024-10-22 19:14:05 +02:00
bc351f4b70 tests/shader-runner: Make geometry shaders optional.
This allows the Vulkan runner to execute in environments which do
not support geometry shaders, most notably MoltenVK. In particular,
that enables SM<4 shaders to run in such environments
2024-10-15 16:55:15 +02:00
cd249a47b8 tests: Test FFP point size clamping. 2024-10-10 22:44:33 +02:00
ec53e325b6 tests: Test FFP point size. 2024-10-10 22:30:35 +02:00
d76435cd21 tests: Move the dxc compilation helpers to utils.h. 2024-10-08 20:34:03 +02:00
3b1760134f tests: Test clip planes. 2024-10-02 21:49:54 +02:00
3eb2a3d0e4 tests/shader_runner: Introduce a 'depth-bounds' test option. 2024-09-11 14:53:21 +02:00
b701f8d393 tests/shader_runner: Explicitly require UAV load support.
The used UAV formats are explicitly added in the [require] section of
every test that uses them.

Some of these tests were failing on Intel UHD graphics 770 because of
missing support for additional UAV load types, explicitly requiring
these formats allows these tests to be skipped.
2024-08-22 16:22:18 +02:00
164076d176 tests/shader_runner: Require explicit formats for UAV resources.
The current default is r32g32b32a32 but it requires special support
which is not available on all GPUs, so it is not a very convenient
default.

Instead of changing the default making it different from RTV resoures,
the format is required to always be explicit for UAVs.

The exceptions are counter_buffer and buffers with "stride", which don't
require a format because it is already implied.
2024-08-22 16:01:26 +02:00