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
Francisco Casas
9a8f6e0edb
vkd3d-shader/hlsl: Parse integers with the 'u' postfix.
2023-11-22 22:08:04 +01:00
Francisco Casas
3f09cdcaa1
tests: Test integers with the 'u' postfix.
2023-11-22 22:08:04 +01:00
Conor McCarthy
eb05e434ff
vkd3d-shader/dxil: Implement the DXIL LOAD instruction.
2023-11-22 22:07:59 +01:00
Henri Verbeet
73c563ffb7
vkd3d-shader/d3dbc: Adjust the token count for DEF and DEFI instructions in shader_sm1_skip_opcode().
...
This was broken by commit e390bc35e2c9b0a2110370f916033eea2366317e; that
commit fixed the source count for these instructions, but didn't adjust
shader_sm1_skip_opcode(). Note that this only affects shader model 1;
later versions have a token count embedded in the initial opcode token.
2023-11-20 22:07:29 +01:00
Akihiro Sagawa
aed2d142cf
vkd3d-shader/hlsl: Add degrees() function.
2023-11-20 22:07:19 +01:00
Akihiro Sagawa
e493627130
vkd3d-shader/hlsl: Add radians() function.
2023-11-20 22:07:17 +01:00
Conor McCarthy
63b8972b0e
tests: Test CreatePipelineState().
...
Based on vkd3d-proton patches by Hans-Kristian Arntzen and Philip
Rebohle.
2023-11-15 21:48:44 +01:00
Conor McCarthy
3c4631a4d4
vkd3d-shader/dxil: Implement the DXIL VSELECT instruction.
2023-11-15 21:48:35 +01:00
Conor McCarthy
130e7bdf0f
tests/shader-runner: Add tests for 64-bit casts.
2023-11-15 21:48:33 +01:00
Conor McCarthy
38e85079aa
tests/shader-runner: Add a test for float comparisons.
2023-11-15 21:48:30 +01:00
Conor McCarthy
d957247c67
tests/shader-runner: Run d3d11 tests with a mimimum shader model of 4.0.
...
Passing less than 4.0 breaks the use of [require] with
'shader model < 4.0'.
2023-11-15 21:48:28 +01:00
Henri Verbeet
9de793f180
vkd3d-shader: Implement scanning combined resource/sampler information.
2023-11-13 23:19:23 +01:00
Nikolay Sivov
41a72a4eae
tests: Fix some spelling mistakes.
2023-11-13 23:19:14 +01:00
Conor McCarthy
d3b90cc877
vkd3d-shader/dxil: Implement the DXIL CMP2 instruction.
2023-11-10 20:23:50 +01:00
Zebediah Figura
514d179b70
vkd3d-shader/hlsl: Do not consider scalars and 1-dimensional vectors to be equivalent in function parameters.
2023-11-09 21:15:14 +01:00
Zebediah Figura
3e35570221
tests: Add some more tests for function overloads.
2023-11-09 21:15:08 +01:00
Conor McCarthy
90d178bf12
vkd3d-shader/dxil: Implement the DXIL CAST instruction.
2023-11-09 21:14:42 +01:00
Zebediah Figura
0805ce121e
tests: Add more semantics to test_nop_tessellation_shaders().
...
To act as a regression test for 852eefc01d
.
2023-11-08 22:49:51 +01:00
Nikolay Sivov
4778d051df
vkd3d-shader: Add constant folding for 'floor'.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-11-08 22:49:40 +01:00
Nikolay Sivov
494f681bf6
vkd3d-shader/tpf: Add support for ceil().
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-11-08 22:49:38 +01:00
Nikolay Sivov
e57bf3db0b
tests: Add some tests for ceil().
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-11-08 22:49:37 +01:00
Nikolay Sivov
522a0dfb56
vkd3d-shader/hlsl: Add tex2Dlod() function.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-11-08 22:49:26 +01:00
Francisco Casas
0ef25ad137
vkd3d-shader/tpf: Support relative addressing for indexable temps in SM4.
...
For relative addressing, the vkd3d_shader_registers must point to
another vkd3d_shader_src_param. For now, use the sm4_instruction to save
them, since the only purpose of this struct is to be used as paramter
for write_sm4_instruction.
2023-11-07 22:25:49 +01:00
Francisco Casas
915f9f1373
tests: Add aditional relative addressing tests.
2023-11-07 22:25:44 +01:00
Francisco Casas
3deb3b5a21
tests: Rename array-index-expr.shader_test as non-const-indexing.shader_test.
2023-11-07 22:25:42 +01:00
Conor McCarthy
749df8dec2
vkd3d-shader/dxil: Implement the DXIL BINOP instruction.
2023-11-06 23:09:03 +01:00
Conor McCarthy
7419f4e31d
vkd3d-shader/dxil: Allow empty struct types.
2023-11-02 18:23:12 +01:00
Nikolay Sivov
dbcc4c4e40
vkd3d-shader/hlsl: Parse empty technique declarations.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-11-02 18:23:07 +01:00
Nikolay Sivov
53b0101a53
vkd3d-shader/hlsl: Use case-insensitive match for the "technique" keyword.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-11-02 18:23:06 +01:00
Nikolay Sivov
ea8ff5394c
vkd3d-shader/hlsl: Add a keyword for fx_5_0 techniques.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-11-02 18:23:05 +01:00
Nikolay Sivov
c588f33822
tests: Add some tests for using technique blocks when compiling for pixel/vertex profiles.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-11-02 18:23:04 +01:00
Nikolay Sivov
ecdc3f39d4
vkd3d-shader: Accept 'loop' attribute, on loops.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-11-01 21:47:49 +01:00
Nikolay Sivov
26784672d8
vkd3d-shader: Check loop [unroll] attribute for conflict with other attributes.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-11-01 21:47:49 +01:00
Nikolay Sivov
b8047fd650
tests: Add some tests for loop attributes.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-11-01 21:47:49 +01:00
Giovanni Mascellani
c691ad8869
tests: Immediately transition buffers after creation in the shader runner.
...
The resource could be destructed before the command list left open
is executed; instead, we immediately perform the transition.
2023-11-01 21:47:44 +01:00
Giovanni Mascellani
46b7fccfd7
tests: Immediately transition textures after creation in the shader runner.
...
The resource could be destructed before the command list left open
is executed; instead, we immediately perform the transition.
2023-11-01 21:47:43 +01:00
Giovanni Mascellani
ca7fa0c015
tests: Immediately transition resources after readback in the shader runner.
...
The resource could be destructed before the command list left open
is executed; instead, we immediately perform the transition.
2023-11-01 21:47:41 +01:00
Conor McCarthy
589670180a
vkd3d-shader/dxil: Implement the DXIL EXTRACTVAL instruction.
2023-11-01 21:47:34 +01:00
Nikolay Sivov
8e5c8c1725
tests: Add some tests for 'technique' token behaviour.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-31 21:59:45 +01:00
Nikolay Sivov
214d44fb11
tests: Add [effect] section support.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-31 21:59:45 +01:00
Nikolay Sivov
ea554b91d7
tests: Remove unused parameter from mul() tests functions.
2023-10-31 21:59:29 +01:00
Francisco Casas
ab463f74bd
tests: Test array indexing with multiple swizzles.
2023-10-31 21:59:11 +01:00
Nikolay Sivov
bc2a4ee66a
vkd3d-shader/tpf: Write out 'switch' statements.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-31 21:59:05 +01:00
Nikolay Sivov
68c14079a6
vkd3d-shader/hlsl: Add a pass to normalize switch cases blocks.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-31 21:59:04 +01:00
Nikolay Sivov
72623031a2
vkd3d-shader/hlsl: Validate break/continue context.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-31 21:59:01 +01:00
Nikolay Sivov
ec8dfa467f
vkd3d-shader/hlsl: Add initial support for parsing 'switch' statements.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-31 21:58:57 +01:00
Nikolay Sivov
ebb5aacabf
tests: Add some tests for the 'switch' statements.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-31 21:58:57 +01:00
Giovanni Mascellani
f462d237c1
ci: Run shader tests on Windows.
2023-10-31 21:58:53 +01:00
Giovanni Mascellani
dbc5e7d07c
ci: Run cross tests on Windows.
...
A driver program is introduced to coordinate test running on Windows,
similarly to what "make test" does on Linux and macOS.
2023-10-31 21:58:51 +01:00
Henri Verbeet
f75bdd6e21
vkd3d-utils: Implement D3DStripShader().
2023-10-19 23:07:50 +02:00
Henri Verbeet
96556a8834
vkd3d-shader/hlsl: Add support for RWTexture2DArray.
2023-10-19 23:07:31 +02:00
Henri Verbeet
6fe781ff50
tests: Add basic RWTexture2DArray tests.
2023-10-19 23:07:31 +02:00
Henri Verbeet
2c71c18879
vkd3d-shader/hlsl: Add support for RWTexture1DArray.
2023-10-19 23:07:30 +02:00
Henri Verbeet
ae9d29a377
tests: Add basic RWTexture1DArray tests.
2023-10-19 23:07:29 +02:00
Henri Verbeet
b63c853688
vkd3d-utils: Implement D3DGetBlobPart().
...
This was largely adapted from Wine's d3dcompiler_43, with some style
adjustments.
2023-10-18 20:58:22 +02:00
Giovanni Mascellani
0dc40d7c1e
tests: Skip processing resources according to [require] directives.
2023-10-18 20:58:19 +02:00
Giovanni Mascellani
d69c04471e
tests: Do not test matrix majority on SM1-3.
...
I'm not sure of what's happening here, but it seems that this change
fixes a crash when running on Windows in the CI. Since most of the
test excludes SM1-3 anyway, this shouldn't be a big loss.
2023-10-18 20:58:18 +02:00
Giovanni Mascellani
ca51c359ec
tests: Fix the usage of require directives.
...
They are reset each time "[require]" is encountered.
2023-10-18 20:58:17 +02:00
Giovanni Mascellani
ead98ef329
tests: Remove an irrelevant input from a test.
...
The irrelevant input caused the test to fail on D3D12 for reasons
unrelated to the test's goal.
2023-10-18 20:58:16 +02:00
Giovanni Mascellani
671548494f
tests: Do not test integral types for SM1-3.
2023-10-18 20:58:16 +02:00
Giovanni Mascellani
90f9407b80
tests: Do not use global half values.
...
They are not allowed by the native compiler, except in compatibility
mode.
2023-10-18 20:58:14 +02:00
Henri Verbeet
803e5183cc
tests: Specify argument types for dxcompiler_create().
2023-10-17 22:18:36 +02:00
Henri Verbeet
47d4097efa
vkd3d-utils: Check for a NULL 'blob' pointer in D3DCreateBlob().
2023-10-16 22:36:58 +02:00