Commit Graph

1190 Commits

Author SHA1 Message Date
Giovanni Mascellani
ee3c4b6555 tests: Skip test_get_copyable_footprints() on WARP.
There are 12025 failures with WARP. I haven't investigated them.
2023-10-16 22:36:47 +02:00
Giovanni Mascellani
d72e30f1d1 tests: Skip test_null_vbv() on WARP.
On WARP 0xffffffff is read instead of zero.
2023-10-16 22:36:45 +02:00
Giovanni Mascellani
14c9be697f tests: Acknowledge some double operations being broken on WARP. 2023-10-16 22:36:45 +02:00
Giovanni Mascellani
3f87cf9d7f tests: Acknowledge WARP giving a GPU handle to a non-shader-visible descriptor heap.
WARP has no GPU, so it probably treats GPU handles just like CPU handles.
2023-10-16 22:36:43 +02:00
Giovanni Mascellani
862dcf27a6 tests: Acknowledge WARP accepting some unusual CreateCommittedResource() configuration.
A software implementation can conceivably satisfy some requests that
cannot work on real hardware.
2023-10-16 22:36:41 +02:00
Conor McCarthy
e0d0a04b79 vkd3d-shader/dxil: Handle multi-row signature elements. 2023-10-16 22:36:38 +02:00
Henri Verbeet
e53178f395 tests: Use the same viewport origin and front-face orientation in the Vulkan and D3D runners.
I.e., top-left origin, and clockwise front-facing. These end up cancelling
each other out when drawing full-screen quads, but that's not necessarily true
for other geometry.
2023-10-16 22:36:22 +02:00
Giovanni Mascellani
c1de65a99b tests: Fail if dxcompiler is not available at runtime. 2023-10-16 22:36:17 +02:00
Conor McCarthy
57280673e5 tests/shader-runner: Test shaders with dxcompiler.
The location of dxcompiler should be set during configuration with
'DXCOMPILER_LIBS=-L/path/to/dxcompiler', and then at runtime with
LD_LIBRARY_PATH, WINEPATH or PATH as applicable.

A new 'fail(sm<6)' decoration is needed on many shader declarations
because dxcompiler succeeds on many shaders which fail with fxc. The
opposite case is less common and is flagged with 'fail(sm>=6)'. A few
tests cause dxcompiler to crash or hang, so these are avoided using
[require], which now skips tests until reset instead of exiting. Also,
'todo(sm<6)' and 'todo(sm>=6)' are used to separate checking of results.
2023-10-11 22:21:14 +02:00
Conor McCarthy
d211160b89 tests/shader-runner: Replace immediate shader type strings with an enum. 2023-10-11 22:21:14 +02:00
Conor McCarthy
0ef0735999 tests/shader-runner: Do not exit if a 'require' directive is not met.
Tests are skipped until the next 'require' directive, which restores
the defaults before the new requirements are read.
2023-10-11 22:21:14 +02:00
Conor McCarthy
192f4dcb2b tests/shader-runner: Handle individual keywords in shader directives.
Matching all possible combinations of keywords becomes too complex
if more keywords are added.
2023-10-11 22:21:14 +02:00
Nikolay Sivov
9c6c7cb78f vkd3d: Add partial implementation for CreateCommittedResource1(). 2023-10-10 22:11:46 +02:00
Nikolay Sivov
8479ceedfc vkd3d-shader/hlsl: Propagate structure fields modifiers when copying shader inputs.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-09 21:58:29 +02:00
Nikolay Sivov
1930b51d97 vkd3d-shader/hlsl: Allow interpolation modifiers on structure fields.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-09 21:58:27 +02:00
Nikolay Sivov
de860c3cbf vkd3d-shader/hlsl: Parse 'centroid' and 'noperspective' modifiers.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-09 21:58:24 +02:00
Nikolay Sivov
4b8a4809d1 tests: Add a test for interpolation modifiers specified on structure fields.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-09 21:58:24 +02:00
Nikolay Sivov
c5414fa92f vkd3d-shader/tpf: Write 'continue' instruction.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-09 21:58:17 +02:00
Nikolay Sivov
0e5749e78e vkd3d-shader/hlsl: Allow 'break' instructions in loops.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-09 21:58:12 +02:00
Nikolay Sivov
89f493b900 tests: Add some tests for 'break'/'continue' in loops.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-09 21:58:12 +02:00
Nikolay Sivov
6ba75fd92f vkd3d: Add partial implementation for CreateHeap1().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-09 21:58:07 +02:00
Nikolay Sivov
7c378cc6f9 vkd3d-shader/hlsl: Remove conditional branching when condition is a compile time constant.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-05 16:16:09 +02:00
Nikolay Sivov
8ebccad3c9 vkd3d-shader/hlsl: Add constant folding for rshift.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-05 16:15:54 +02:00
Nikolay Sivov
6e74819eb7 vkd3d-shader/hlsl: Add constant folding for lshift.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-05 16:15:52 +02:00
Francisco Casas
e64e08b2b7 tests: Test register reservations on structs for SM5. 2023-10-05 16:15:30 +02:00
Nikolay Sivov
b5c0c9c22f vkd3d-shader/hlsl: Add fwidth() function.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-05 16:15:10 +02:00
Conor McCarthy
39be40ce94 tests: Destroy the test context in test_readback_map_stability(). 2023-10-02 22:25:10 +02:00
Henri Verbeet
5503a025d9 tests: Add some missing vkd3d_test_pop_context() calls to test_shader_instructions(). 2023-09-28 23:13:04 +02:00
Giovanni Mascellani
4374d45655 tests: Work around a MoltenVK bug in test_tgsm(). 2023-09-26 22:07:43 +02:00
Petrichor Park
976fd67f51 vkd3d-shader/hlsl: Implement intrinsic tan.
This commit also extends the trigonometry tests a little bit to make
sure that tan works right.
2023-09-25 22:07:13 +02:00
Giovanni Mascellani
ca05e57e67 tests: Mark a bug as resolved on Mesa. 2023-09-22 11:06:57 +02:00
Giovanni Mascellani
d640b213b2 tests: Do not crash if the render target doesn't support MSAA 8.
This currently happens on MoltenVK.
2023-09-22 11:06:50 +02:00
Giovanni Mascellani
6dfdbb5c26 tests: Do not crash if a pipeline statistics query heap cannot be created.
This currently happens on MoltenVK.
2023-09-22 11:06:44 +02:00
Giovanni Mascellani
d742770499 tests: Compile HLSL shaders at runtime in test_draw_depth_only(). 2023-09-22 11:06:41 +02:00
Giovanni Mascellani
4557ad36b0 tests: Compile HLSL shaders at runtime in test_draw_depth_no_ps(). 2023-09-22 11:06:41 +02:00
Giovanni Mascellani
b7c951ba78 tests: Compile HLSL shaders at runtime in test_scissor(). 2023-09-22 11:06:41 +02:00
Giovanni Mascellani
15c5ef5bb5 tests: Compile HLSL shaders at runtime in test_fractional_viewports(). 2023-09-22 11:06:40 +02:00
Giovanni Mascellani
49bbd98a04 vkd3d-shader/hlsl: Correctly fold casts from float.
I.e., without invoking undefined behavior in the compiler. The rules
are desumed from the the MSDN documentation for ftoi and ftou.
2023-09-22 11:06:28 +02:00
Nikolay Sivov
6d1ba83856 vkd3d-shader/hlsl: Use conditional moves for arithmetic operators instead of branching.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-09-22 11:06:22 +02:00
Zebediah Figura
9417c7cfb7 vkd3d-shader/d3dbc: Translate sm1 fragment outputs to system values. 2023-09-21 19:16:31 +02:00
Zebediah Figura
1615e5a76b vkd3d-shader/dxbc: Map sm4 fragment outputs to system values based on their name. 2023-09-21 19:16:29 +02:00
Henri Verbeet
419c6364db tests: Add a small test for vkd3d_shader_build_varying_map().
There's probably room for improvement, but this at least verifies the
function can be called.
2023-09-19 21:30:37 +02:00
Giovanni Mascellani
b8f2c3e1f4 tests: Relax the precision of some tests so that they pass on MoltenVK. 2023-09-18 21:04:06 +02:00
Nikolay Sivov
177ea3bcbd vkd3d-shader/hlsl: Produce 2D resource declarations and loads for tex1D().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-09-13 23:11:11 +02:00
Giovanni Mascellani
61b403a032 tests: Compile HLSL shaders at runtime in test_unknown_dsv_format(). 2023-09-13 23:11:04 +02:00
Giovanni Mascellani
264ff9e2da tests: Compile HLSL shaders at runtime in test_unknown_rtv_format(). 2023-09-13 23:11:04 +02:00
Giovanni Mascellani
b1cae0dd1e tests: Compile HLSL shaders at runtime in test_multiple_render_targets(). 2023-09-13 23:11:04 +02:00
Giovanni Mascellani
f7354ff9e3 tests: Compile HLSL shaders at runtime in test_create_compute_pipeline_state(). 2023-09-13 23:11:04 +02:00
Zebediah Figura
e847df9528 tests: Check the result of vkCreateGraphicsPipelines(). 2023-09-13 23:10:46 +02:00
Francisco Casas
39563aa5b3 vkd3d-shader/hlsl: Lower matrix swizzles. 2023-09-13 23:10:38 +02:00