Commit Graph

1806 Commits

Author SHA1 Message Date
Anna (navi) Figueiredo Gomes
e761b2cad1 tests/shader_runner: Introduce a "d3d12" tag. 2024-09-11 14:53:33 +02:00
Anna (navi) Figueiredo Gomes
3eb2a3d0e4 tests/shader_runner: Introduce a 'depth-bounds' test option. 2024-09-11 14:53:21 +02:00
Anna (navi) Figueiredo Gomes
12a7cde092 tests/shader_runner: Use ID3D12Device2_CreatePipelineState() when available. 2024-09-11 14:13:59 +02:00
Anna (navi) Figueiredo Gomes
04d7ad90e5 tests/shader_runner: Extract a pipeline creation function from d3d12_runner_draw(). 2024-09-11 14:08:37 +02:00
Nikolay Sivov
de6abd964e vkd3d-shader/hlsl: Implement the mad() intrinsic.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-09-10 21:40:32 +02:00
Nikolay Sivov
75299c04fd vkd3d-shader: Handle the SV_SampleIndex semantic.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-09-10 21:39:03 +02:00
Shaun Ren
c1babbc8aa vkd3d-shader/hlsl: Validate hull shader attributes. 2024-09-04 18:30:04 +02:00
Shaun Ren
dae88bab52 vkd3d-shader/hlsl: Parse the outputcontrolpoints attribute. 2024-09-04 18:28:46 +02:00
Shaun Ren
62fad1c185 tests: Test hull shader function overloads. 2024-09-04 18:18:23 +02:00
Shaun Ren
ed1e74dd62 tests: Test hull shader attributes. 2024-09-04 18:18:23 +02:00
Shaun Ren
73ee5a135a vkd3d-shader/hlsl: Check for duplicate attributes in function declaration. 2024-09-04 18:18:23 +02:00
Petrichor Park
855b9713b8 vkd3d-shader/hlsl: Implement the sincos() intrinsic. 2024-09-04 18:16:37 +02:00
Petrichor Park
384810b4ba vkd3d-shader/hlsl: Implement the dst() intrinsic. 2024-09-04 18:08:24 +02:00
Francisco Casas
7ec44bd70b vkd3d-shader/hlsl: Parse the CompileShader() syntax. 2024-09-04 17:59:34 +02:00
Francisco Casas
45f18a7838 vkd3d-shader/hlsl: Parse the shader 'compile' syntax.
The hlsl_ir_compile node is introduced to represent the "compile"
syntax, and later the CompileShader() and ConstructGSWithSO()
constructs.

It basically represents a function call that remembers its arguments
using hlsl_srcs and keeps its own instruction block, which is discarded
when working on non-effect shaders.

For shader compilations it can be asserted that args_count is 1, and
that this argument (and the last node in hlsl_ir_effect_call.instrs)
is a regular hlsl_ir_call pointing to the declaration of the function
to be compiled.
2024-09-04 17:58:56 +02:00
Henri Verbeet
0e72aba0bc Release 1.13. 2024-08-29 12:08:46 +02:00
Francisco Casas
f5ed0d9efd tests/test-driver: Avoid double space when printing details.
Save screen real estate.
2024-08-22 16:22:29 +02:00
Francisco Casas
b701f8d393 tests/shader_runner: Explicitly require UAV load support.
The used UAV formats are explicitly added in the [require] section of
every test that uses them.

Some of these tests were failing on Intel UHD graphics 770 because of
missing support for additional UAV load types, explicitly requiring
these formats allows these tests to be skipped.
2024-08-22 16:22:18 +02:00
Francisco Casas
fb153bf5d4 tests/shader_runner: Don't skip shader compilation on missing caps.
Currently we are skipping compilation tests ([* shader] blocks) on
missing capabilities. This is not really necessary and it is useful to
test shader compilation even on machines that can't run these tests.

So, this commit moves the checks to the [test] blocks, skipping them
entirely when caps are not met.

To make the effects of enum test_action values more explicit, these
are renamed to TEST_ACTION_SKIP_COMPILATION and
TEST_ACTION_SKIP_EXECUTION.
2024-08-22 16:01:37 +02:00
Francisco Casas
19c23ca6f2 tests/shader_runner: Replace spaces with dashes in format names.
Probably good if we want to allow specifying several formats in the same
line, separated by spaces.

While at it, rename "r32g32 int" to "r32g32-sint".
2024-08-22 16:01:37 +02:00
Francisco Casas
cec62c54ad tests/shader_runner: Move parse_format() up. 2024-08-22 16:01:32 +02:00
Francisco Casas
164076d176 tests/shader_runner: Require explicit formats for UAV resources.
The current default is r32g32b32a32 but it requires special support
which is not available on all GPUs, so it is not a very convenient
default.

Instead of changing the default making it different from RTV resoures,
the format is required to always be explicit for UAVs.

The exceptions are counter_buffer and buffers with "stride", which don't
require a format because it is already implied.
2024-08-22 16:01:26 +02:00
Francisco Casas
56cd64ccba tests: Test shader compilation with default values. 2024-08-20 21:26:26 +02:00
Francisco Casas
9fa8921b50 tests: Test shader compilation within braces. 2024-08-20 21:26:26 +02:00
Francisco Casas
1d24587405 tests: Test compile syntax on effects. 2024-08-20 21:26:26 +02:00
Francisco Casas
e9260bba3a tests: Test shader compilation within function definitions. 2024-08-20 21:26:26 +02:00
Francisco Casas
7363fd2816 tests: Add additional tests for function calls in state block rhs. 2024-08-20 21:26:26 +02:00
Petrichor Park
4467c655f0 vkd3d-shader/hlsl: Factor out add_binary_expr() and use it for assignment operators.
This fixes a lot of internal compiler errors with assignment operators,
especially bitwise ones. The bitwise-assignment test has the motivating
examples.
2024-08-19 14:15:43 +02:00
Nikolay Sivov
ebc039d128 vkd3d-shader/fx: Resolve NULL values for SamplerState.Texture field.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-08-15 17:53:46 +02:00
Nikolay Sivov
873b182021 vkd3d-shader/fx: Support NULL constants for object fields.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-08-15 17:53:46 +02:00
Nikolay Sivov
aa0ea548e4 vkd3d-shader/fx: Handle SetPixelShader() and SetVertexShader().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-08-15 17:53:46 +02:00
Nikolay Sivov
2c533e494a vkd3d-shader/fx: Handle SetBlendState().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-08-15 17:53:46 +02:00
Nikolay Sivov
60ce81112b vkd3d-shader/fx: Support string annotations for fx_4+.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-08-14 22:00:35 +02:00
Nikolay Sivov
89be723ad7 vkd3d-shader/hlsl: Treat "string" type name as case-insensitive.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-08-14 22:00:35 +02:00
Nikolay Sivov
1ce68cee2c vkd3d-shader/hlsl: Tokenize 'String' the same as 'string'.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-08-14 22:00:35 +02:00
Francisco Casas
094e298c1c vkd3d-shader/hlsl: Parse string default values. 2024-08-13 21:19:01 +02:00
Francisco Casas
f8108a4753 tests: Add additional string tests. 2024-08-13 21:16:46 +02:00
Nikolay Sivov
e0b5fe1288 vkd3d-shader/hlsl: Add a test for assigning to DSV and RTV variables.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-08-13 21:11:48 +02:00
Nikolay Sivov
b4d957f848 vkd3d-shader/hlsl: Handle NULL constants.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-08-13 21:10:45 +02:00
Nikolay Sivov
d945d5e78c vkd3d-shader/hlsl: Check MS texture declaration without sample count only for used variables.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-08-13 21:10:29 +02:00
Nikolay Sivov
b0ca3627bf vkd3d-shader/fx: Turn assignments to arrays to element assignments for certain states. 2024-08-12 14:15:14 +02:00
Nikolay Sivov
25e1c3e374 vkd3d-shader/fx: Explicitly handle bool values in state entries. 2024-08-12 14:15:14 +02:00
Nikolay Sivov
c81223d086 vkd3d-shader/fx: Handle states of a BlendState object. 2024-08-12 14:15:14 +02:00
Nikolay Sivov
f1e65ecc83 vkd3d-shader/fx: Enable writing BlendState variables. 2024-08-12 14:15:14 +02:00
Nikolay Sivov
91e88fac2e vkd3d-shader/hlsl: Add parser support for BlendState type. 2024-08-12 14:15:14 +02:00
Nikolay Sivov
de48960b33 vkd3d-shader/fx: Add support for the OMSetRenderTargets() state. 2024-08-08 23:42:37 +02:00
Nikolay Sivov
9fb23b9090 vkd3d-shader/fx: Handle "Texture" field of the sampler state objects.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-08-08 23:42:37 +02:00
Victor Chiletto
8c3a5e5458 vkd3d-shader/hlsl: Implement f16tof32 intrinsic. 2024-08-08 23:35:02 +02:00
Francisco Casas
016be7e591 vkd3d-shader/hlsl: Lower non-constant row_major matrix loads for SM1. 2024-08-08 23:33:33 +02:00
Francisco Casas
87f01f5205 vkd3d-shader/hlsl: Remove SM1 fixme for matrix writemasks.
hlsl_ir_store instructions don't use writemasks for whole matrices.
2024-08-08 23:32:03 +02:00