Commit Graph

107 Commits

Author SHA1 Message Date
Giovanni Mascellani
ffbf0320ba tests/hlsl: Mark a denormalization mode test as todo on Intel.
It behaves the same as llvmpipe.
2025-11-17 15:20:47 +01:00
Giovanni Mascellani
653de0c076 tests/shader_runner: Generate a default descriptor mapping when none is provided. 2025-11-12 15:02:18 +01:00
Giovanni Mascellani
69c109786b tests/hlsl: Test shader model 6.2 denormal mode for 32-bit floats. 2025-10-30 19:12:27 +01:00
Giovanni Mascellani
da6ce78c1c tests/shader_runner: Add support for testing explicit descriptor mapping.
When no descriptor mapping is specified, the backend will just
build the usual default mapping. Otherwise the explicit mapping
is used.

Once all backends support the explicit mapping, we'll be able to
handle generating the default mapping in the shader runner core
rather than having each backend implement its own algorithm.

So far only the d3d12 backend supports explicit descriptor
mapping.
2025-10-30 18:42:35 +01:00
Francisco Casas
cb7dac4d65 tests/shader_runner: Introduce a "cull-distance" capability. 2025-10-29 12:24:50 +01:00
Elizabeth Figura
6633c220b7 tests: Add bump mapping tests. 2025-10-27 18:41:26 +01:00
Shaun Ren
e5081a1bf9 tests/shader_runner: Add a "compile shader model" require directive.
This directive requires specific shader models to be tested for
compilation, bypassing the default behaviour where only one version from
each shader model set (SM1-3, SM4-5, SM6) is compiled.
2025-10-16 14:26:47 +02:00
Giovanni Mascellani
cd64aa69c8 tests/shader_runner: Introduce a new tag system.
Mostly to be able to associate a version number to each tag and
get rid of all the foo<1.2.3 tags. The new system also has fixed
tag slots, rather than dealing with strings, so we don't have to
manually adjust the size of the `tags' array.

With the new system each tag can be present or not, and if it is
present it can have an associated version number (of the form
major.minor.patch). If the version is not available, it is set to
0.0.0. Each tag can be queried for existence and for comparison
with the version number.
2025-10-06 19:41:09 +02:00
Giovanni Mascellani
3c8b4ce731 ci: Run Linux tests on Debian trixie.
So we have a more recent version of SPIRV-Tools and also don't
have to recompile Mesa to test llvmpipe. This fixes a few failing
tests, but also breaks a couple.
2025-10-03 00:43:10 +02:00
Giovanni Mascellani
463df8e1ea tests/hlsl: Skip a shader model 6 floating-point comparison test on Windows NVIDIA. 2025-09-29 12:44:53 +02:00
Giovanni Mascellani
3817df1164 tests/shader_runner_metal: Run the Metal shader runner with DXIL shaders. 2025-08-04 14:34:23 +02:00
Conor McCarthy
cd8cea6913 tests: Replace test_ps_viewport_index() with a shader runner test.
Mainly to allow testing the functionality in question with DXIL shaders
as well.
2025-07-31 14:55:33 +02:00
Elizabeth Figura
e312207124 tests/shader_runner: Add support for cube resources. 2025-06-26 17:38:55 +02:00
Elizabeth Figura
587c2dc76e tests/shader_runner: Add support for 3D resources. 2025-06-26 17:31:34 +02:00
Henri Verbeet
85d2703c03 tests/shader_runner: Introduce a "tessellation-shader" cap.
Similar to how we have the "geometry-shader" cap. In principle shader
model 5+ implies support for tessellation shaders, but the Vulkan,
OpenGL, and Metal runners are able to support most of shader model 5+
without the underlying GPU (or API) necessarily supporting tessellation
shaders.
2025-06-04 12:10:10 +02:00
Henri Verbeet
4e783e2d66 tests/shader_runner: Get rid of enum texture_data_type. 2025-04-14 15:48:24 +02:00
Victor Chiletto
cc9f4ac587 tests/hlsl: Attempt to deduce the data type of unspecified type texture data.
Try parsing first as integer, and if the parse stops at a decimal separator, parse as float.
2025-04-08 19:18:57 +02:00
Giovanni Mascellani
fc4316f664 tests/shader_runner: Avoid creating devices for backends that won't execute.
My main motivation to this is avoiding generating a lot of useless
log lines from other executors when I'm interested in just one of
them, but I can imagine this also somewhat improving efficiency.
2025-03-17 14:01:22 +01:00
Giovanni Mascellani
0b273ea88c tests: Store the compiler string in the shader runner capabilities.
Just like the executor.
2025-03-17 13:50:19 +01:00
Giovanni Mascellani
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
Conor McCarthy
033a0d29c5 tests/hlsl: Add some arithmetic uint16 shader tests. 2025-01-28 13:13:44 +01:00
Conor McCarthy
a557ad0aea tests/hlsl: Add a test for SV_RenderTargetArrayIndex. 2025-01-27 14:52:28 +01:00
Anna (navi) Figueiredo Gomes
d5ed4df254 tests/shader_runner: Add a "mesa<23.3" tag. 2024-12-19 20:34:55 +01:00
Giovanni Mascellani
ed552e4519 tests/hlsl: Add tests for the EvaluateAttribute*() intrinsics.
Based on earlier tests by Conor McCarthy.
2024-12-18 17:27:31 +01:00
Elizabeth Figura
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