vkd3d/tests
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
..
hlsl vkd3d-shader/hlsl: Use values at the time of the swizzle's load in copy-propagation. 2023-11-29 22:53:24 +01:00
.gitignore tests: Add some C HLSL preprocessor tests. 2020-11-24 22:28:11 +01:00
d3d12_crosstest.h tests: Do not crash if a pipeline statistics query heap cannot be created. 2023-09-22 11:06:44 +02:00
d3d12_invalid_usage.c tests/shader_runner: Use the global test_options structure. 2023-03-10 21:13:05 +01:00
d3d12_test_utils.h tests: Immediately transition buffers after creation in the shader runner. 2023-11-01 21:47:44 +01:00
d3d12.c include: D3D12_RT_FORMAT_ARRAY remove typedef to make header compatible with windows. 2023-11-28 00:09:20 +01:00
driver.c ci: Execute the shader runner on the correct test data on Windows. 2023-11-23 22:37:21 +01:00
dxcompiler.idl tests/shader-runner: Test shaders with dxcompiler. 2023-10-11 22:21:14 +02:00
hlsl_d3d12.c vkd3d-utils: Implement D3DStripShader(). 2023-10-19 23:07:50 +02:00
preproc-if-expr.shader_test vkd3d-shader/preproc: Allow capital U and L after integer constants as well. 2022-02-02 21:06:21 +01:00
preproc-if.shader_test tests: Add some basic tests for #if and related preprocessor directives. 2020-11-23 22:07:44 +01:00
preproc-ifdef.shader_test tests: Add some tests for #ifdef and defined(). 2020-11-23 22:07:47 +01:00
preproc-invalid.shader_test tests: Add some tests for shaders which fail to preprocess. 2020-11-24 22:27:59 +01:00
preproc-macro.shader_test vkd3d-shader/preproc: Append spaces between tokens in macro invocations. 2023-08-02 20:19:21 +09:00
preproc-misc.shader_test tests: Add some more miscellaneous preprocessor tests. 2020-11-24 22:28:05 +01:00
shader_runner_d3d9.c tests/shader-runner: Test shaders with dxcompiler. 2023-10-11 22:21:14 +02:00
shader_runner_d3d11.c tests/shader-runner: Run d3d11 tests with a mimimum shader model of 4.0. 2023-11-15 21:48:28 +01:00
shader_runner_d3d12.c tests: Immediately transition buffers after creation in the shader runner. 2023-11-01 21:47:44 +01:00
shader_runner_gl.c tests: Introduce an OpenGL shader runner. 2023-11-22 22:08:11 +01:00
shader_runner_vulkan.c tests: Use the same viewport origin and front-face orientation in the Vulkan and D3D runners. 2023-10-16 22:36:22 +02:00
shader_runner.c tests/shader_runner: Remove an unnecessary local variable declaration. 2023-11-28 00:09:51 +01:00
shader_runner.h tests: Introduce an OpenGL shader runner. 2023-11-22 22:08:11 +01:00
utils.h tests/shader-runner: Add tests for 64-bit casts. 2023-11-15 21:48:33 +01:00
vkd3d_api.c tests: Distinguish between cross and non-cross Win32 builds. 2023-01-24 18:10:15 +01:00
vkd3d_common.c vkd3d-common: Move vkd3d_write_mask_is_contiguous() from vkd3d-shader. 2019-07-05 17:52:04 +02:00
vkd3d_shader_api.c vkd3d-shader/d3dbc: Adjust the token count for DEF and DEFI instructions in shader_sm1_skip_opcode(). 2023-11-20 22:07:29 +01:00
vulkan_procs.h tests: Add support for UAV buffers in Vulkan runner. 2023-05-22 22:03:28 +02:00