Commit Graph

1306 Commits

Author SHA1 Message Date
Zebediah Figura
9ac210eb1e tests: Add many more tests for ternary expressions. 2024-01-17 22:28:50 +01:00
Nikolay Sivov
e7d65d39ba vkd3d-shader/fx: Initial support for fx_5_0 output. 2024-01-15 19:57:42 +01:00
Francisco Casas
43ff28b00b vkd3d-shader/hlsl: Emit fixmes on non-constant vector addressing.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56162

Storing to a vector component using a non-constant index is not allowed
on profiles lower than 6.0. Unless this happens inside a loop that can be
unrolled, which we are not doing yet.

For this reason, a validate_nonconstant_vector_store_derefs pass is
added to detect these cases.

Ideally we would want to emit an hlsl_error on this pass, but before
implementing loop unrolling, we could reach this point on valid HLSL.

Also, as pointed out by Nikolay in the mentioned bug, currently
new_offset_from_path_index() fails an assertion when this happens,
because it expects an hlsl_ir_constant, so a check is added.
It also felt correct to emit an hlsl_fixme there, despite the
redundancy.
2024-01-15 19:57:12 +01:00
Conor McCarthy
c5bc28b454 tests/d3d12: Test vector parameter for countbits() and firstbithigh() in test_shader_instructions(). 2024-01-15 19:56:36 +01:00
Nikolay Sivov
a0207436f2 vkd3d-shader/tpf: Add initial support for writing fx_4_0/fx_4_1 binaries.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-01-11 23:04:48 +01:00
Nikolay Sivov
e527d7c1e7 vkd3d-shader/hlsl: Handle effect group statement.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-01-11 23:04:46 +01:00
Nikolay Sivov
f7a02a5da2 vkd3d-shader/hlsl: Add variables for techniques.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-01-11 23:04:45 +01:00
Nikolay Sivov
c3af1f9989 vkd3d-shader/hlsl: Add 'fxgroup' token.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-01-11 23:04:42 +01:00
Nikolay Sivov
ffae369748 tests: Add some tests for effects groups syntax.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-01-11 23:04:42 +01:00
Giovanni Mascellani
90bcc6691d tests: Mark resource arrays as buggy on MoltenVK.
They require Vulkan descriptor indexing extension, which is
exposed by MoltenVK but known to be buggy, so we assume it is
disabled.
2024-01-08 21:44:58 +01:00
Giovanni Mascellani
a610ccaed9 tests: Mark predicated rendering as buggy on MoltenVK.
It requires Vulkan conditional rendering extension.
2024-01-08 21:44:56 +01:00
Giovanni Mascellani
54514ba7dd tests: Mark streaming output as buggy on MoltenVK.
It requires Vulkan transform feedback extension.
2024-01-08 21:44:55 +01:00
Giovanni Mascellani
1cc2ccaf98 tests: Mark some sampling tests as buggy on MoltenVK.
Apparently Metal doesn't support specifying a bias directly in the
sampler, and, with "nearest" mip filtering, it doesn't switch
precisely at LOD 0.5 (though still between 0.5 and 0.6).
2024-01-08 21:44:53 +01:00
Giovanni Mascellani
9c9b1fadbd tests: Use a uint target for rendering uint data.
This fixes a failure in MoltenVK.
2024-01-08 21:44:50 +01:00
Zebediah Figura
1ce7e3d8b1 vkd3d-shader/d3dbc: Assign unique register indices for VKD3DSPR_RASTOUT. 2024-01-04 22:23:09 +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
Conor McCarthy
812f01c2e2 vkd3d-shader/spirv: Handle ITOI and UTOU in spirv_compiler_map_alu_instruction().
These instructions perform integer casts to/from 64 bits.
2024-01-02 23:03:07 +01:00
Conor McCarthy
99924d913b vkd3d-shader/spirv: Support 64-bit sources in spirv_compiler_emit_int_div(). 2024-01-02 23:03:05 +01:00
Conor McCarthy
13459a55f1 vkd3d-shader/spirv: Introduce a UINT64 component type. 2024-01-02 23:03:04 +01:00
Conor McCarthy
cc43ef3bca vkd3d: Pass int64 capability info to vkd3d-shader. 2024-01-02 23:03:00 +01:00
Zebediah Figura
6a514ebe8e tests: Avoid using "SV_Position" as a name for the vertex shader input.
We use vkd3d_shader_find_signature_element() in the Vulkan runner, and
vkd3d-shader translates SM1 position to "POSITION".
2023-12-14 23:19:30 +01:00
Zebediah Figura
aa44f9b390 tests: Use struct vkd3d_shader_scan_signature_info to retrieve the VS input signature.
In order to allow retrieving it from d3dbc shaders.
2023-12-14 23:19:28 +01:00
Conor McCarthy
f23426ec32 tests/shader-runner: Check for int64 support in the Vulkan runner. 2023-12-14 21:00:41 +01:00
Conor McCarthy
a80ea8168f tests/shader-runner: Check for float64 support in the Vulkan runner. 2023-12-14 21:00:39 +01:00
Conor McCarthy
cd43cb3752 tests/shader-runner: Check for float64 support in the d3d11 runner. 2023-12-14 21:00:38 +01:00
Giovanni Mascellani
09235d9e09 tests: Test assigning multisampled textures with different sample counts. 2023-12-13 22:32:38 +01:00
Conor McCarthy
af731024d7 tests/shader-runner: Fix the arithmetic-int-uniform int64 abs expected results. 2023-12-13 22:32:31 +01:00
Conor McCarthy
108941fce0 tests/shader-runner: Add 64-bit bitwise tests. 2023-12-12 22:50:52 +01:00
Conor McCarthy
27d4ccf225 tests/shader-runner: Add 64-bit arithmetic tests. 2023-12-12 22:50:51 +01:00
Conor McCarthy
8a1eb306e8 tests/shader-runner: Introduce a 'float64' requirement directive. 2023-12-12 22:50:50 +01:00
Conor McCarthy
95c48eb98e tests/shader-runner: Introduce an 'int64' requirement directive. 2023-12-12 22:50:49 +01:00
Conor McCarthy
af86cdf713 tests/shader-runner: Add a non-const-indexing test for asfloat() result storage. 2023-12-11 23:18:54 +01:00
Conor McCarthy
3db7c2a62d vkd3d-shader/dxil: Implement the DXIL STORE instruction. 2023-12-11 23:18:51 +01:00
Conor McCarthy
df82c61482 tests/shader-runner: Test an uninitialised indexable temp. 2023-12-11 23:18:49 +01:00
Stefan Dösinger
b0d1fb0bd7 tests: Show that CreatePipelineState also doesn't reuse duplicate objects. 2023-12-07 21:57:45 +01:00
Stefan Dösinger
1eaf7fa37b tests: Show that compute pipeline state objects are not reused. 2023-12-07 21:57:45 +01:00
Stefan Dösinger
82a3209ee2 tests: Show that graphics pipeline state objects are not reused. 2023-12-07 21:57:45 +01:00
Stefan Dösinger
705cf10626 tests: Show that creating identical root signatures returns the same pointer. 2023-12-07 21:57:45 +01:00
Zebediah Figura
fcd6ec33bd tests: Avoid shadowing "l" in test_get_copyable_footprints().
Found with -Wshadow.
2023-12-07 21:57:18 +01:00
Conor McCarthy
a33a9127ca vkd3d-shader/dxil: Implement DX intrinsic Unary. 2023-12-07 21:56:53 +01:00
Conor McCarthy
16cb6fdbad vkd3d-shader/spirv: Support constant initialisers in indexable temps. 2023-12-07 21:56:44 +01:00
Henri Verbeet
0c33f82f72 Release 1.10. 2023-12-06 15:31:21 +01:00
Francisco Casas
736f3ae2df vkd3d-shader/hlsl: Use values at the time of the swizzle's load in copy-propagation.
This preempts us from replacing a swizzle incorrectly, as in the
following example:

    1: A.x = 1.0
    2: A
    3: A.x = 2.0
    4: @2.x

were @4 ends up being 2.0 instead of 1.0, because that's the value stored in
A.x at time 4, and we should be querying it at time 2.

This also helps us to avoid replacing a swizzle with itself in copy-prop
which can result in infinite loops, as with the included tests this commit.

Consider the following sequence of instructions:

    1 : A
    2 : B = @1
    3 : B
    4 : A = @3
    5 : @1.x

Current copy-prop would replace 5 so it points to @3 now:

    1 : A
    2 : B = @1
    3 : B
    4 : A = @3
    5 : @3.x

But in the next iteration it would make it point back to @1, keeping it
spinning infinitively.

The solution is to index the instructions and don't replace the swizzle
if the new load happens after the current load.
2023-11-29 22:53:24 +01:00
Francisco Casas
e6b7b38a29 tests: Test current failure when propagating swizzles.
The included test fails because copy_propagation_transform_swizzle()
is using the value recorded for the variable when the swizzle is being
read, and not the swizzle's load.
2023-11-29 22:53:16 +01:00
Zebediah Figura
d1ce069ea6 tests/shader_runner: Remove an unnecessary local variable declaration.
Found with -Wshadow.
2023-11-28 00:09:51 +01:00
Alistair Leslie-Hughes
5c134d44d6 include: D3D12_RT_FORMAT_ARRAY remove typedef to make header compatible with windows.
windows d3d12.idl doesn't have this as a typedef.
2023-11-28 00:09:20 +01:00
Giovanni Mascellani
f0a16d84ce ci: Execute the shader runner on the correct test data on Windows. 2023-11-23 22:37:21 +01:00
Henri Verbeet
beb3f6e0c2 tests: Introduce an OpenGL shader runner. 2023-11-22 22:08:11 +01:00
Francisco Casas
4e1bf5e163 vkd3d-shader/hlsl: Discern between signed and unsigned ints when parsing. 2023-11-22 22:08:05 +01:00
Francisco Casas
1ee9e23e00 tests: Test overloads with signed and unsigned numeric values. 2023-11-22 22:08:05 +01:00