Commit Graph

6044 Commits

Author SHA1 Message Date
Giovanni Mascellani
46a1b66df7 ci: Assume an Apple Silicon-based environment for the macOS CI job.
The previous Intel-based macOS runner was replaced with another one
running as a virtual machine on top of an Apple Silicon host.

Since the current macOS runner is not yet able to deal with
different exit codes, we temporarily allow failure unconditionally.
This will be reverted as soon as the runner issue is fixed.
2024-06-17 12:32:33 +02:00
Elizabeth Figura
d3ba810c98 tests: Stop probing all pixels when drawing a uniform colour.
This is simply unnecessary and wastes time.

As part of this, simply remove the "all" directive. Only for a couple of tests
is it even potentially interesting to validate all pixels (e.g.
nointerpolation.shader_test), and for those "all" is replaced with an explicit
(0, 0, 640, 480) rect.

In all other cases we just probe (0, 0).
2024-06-13 23:55:31 +02:00
Stefan Dösinger
021eb28584 include: Get rid of the RB_FOR_EACH* macros.
They're largely unused, and RB_FOR_EACH_ENTRY_DESTRUCTOR is broken
because it uses WINE_RB_ENTRY_VALUE which doesn't exist in vkd3d.
2024-06-13 23:44:43 +02:00
Henri Verbeet
90f26759b5 vkd3d: Always use UINT views to clear UAVs with integer formats.
We would previously try to use float pipelines for SINT formats.
2024-06-13 23:26:35 +02:00
Giovanni Mascellani
a54187f3c9 vkd3d: Do not synchronize with the geometry shader stage if it's not enabled. 2024-06-13 23:24:22 +02:00
Giovanni Mascellani
a1a07de8ca vkd3d: Enable VK_KHR_portability_subset if available.
We don't check it, but at least the validation layer does not complain
when using MoltenVK.
2024-06-13 23:24:22 +02:00
Giovanni Mascellani
3254eff328 vkd3d: Do not request VK_EXT_debug_marker if debug is disabled.
Because it requires VK_EXT_debug_report.
2024-06-13 23:24:22 +02:00
Giovanni Mascellani
3ad4d984ad tests: Mark some root signature unbounded range failures as todo on MoltenVK. 2024-06-13 23:24:22 +02:00
Yuxuan Shui
8a459f5903 tests: Pass the correct buffer size to vsnprintf() in vkd3d_test_push_context(). 2024-06-12 19:04:22 +02:00
Nikolay Sivov
222c52380b vkd3d-shader/fx: Fix variable buffer offset value.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-06-12 19:02:20 +02:00
Nikolay Sivov
402dc94259 vkd3d-shader/fx: Set EXPLICIT_BIND_POINT flag for packoffset() reservations as well.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-06-12 19:02:20 +02:00
Conor McCarthy
da1d96f708 tests/shader-runner: Create a new runner object for the shader model 6 tests.
If cleaning up the old runner is not completed, descriptors for
destroyed resources may remain on the heap.
2024-06-11 15:56:43 +02:00
Conor McCarthy
7534b88a15 tests/shader-runner: Set the correct flag and format for raw UAVs. 2024-06-11 15:55:48 +02:00
Elizabeth Figura
2f88442d7d vkd3d-shader/hlsl: Always initialize $$ when parsing modifiers from an arbitrary string.
This avoids spurious errors like "row_major and column_major are mutually
exclusive" when an invalid modifier is used.

Fixes: cf7c05f431
2024-06-11 15:54:10 +02:00
Nikolay Sivov
72ddea6030 vkd3d-shader/fx: Use original full semantic name.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-06-11 15:53:19 +02:00
Nikolay Sivov
1124ea46ee vkd3d-shader/hlsl: Store original semantic name.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-06-11 15:53:19 +02:00
Conor McCarthy
47d077e5ce vkd3d: Interpret a null vertex buffer 'views' pointer as a null buffer. 2024-06-11 15:52:28 +02:00
Conor McCarthy
c3ea43b619 tests/d3d12: Test a null vertex buffer 'views' pointer on multiple slots. 2024-06-11 15:52:28 +02:00
Conor McCarthy
589ed1e358 vkd3d: Allow block compressed textures to have unaligned width and height. 2024-06-11 15:51:34 +02:00
Conor McCarthy
9244f2b536 tests/d3d12: Check for unaligned block texture support in test_create_committed_resource(). 2024-06-11 15:51:33 +02:00
Nikolay Sivov
ba18035260 vkd3d-shader/d3dbc: Write load instruction for tex2Dbias().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-06-11 15:50:34 +02:00
Nikolay Sivov
a289393fe7 vkd3d-shader/asm: Output 'bias' flag for 'texld'.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-06-11 15:50:34 +02:00
Nikolay Sivov
ccbe36fb8d vkd3d-shader/hlsl: Implement tex2Dbias().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56701
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-06-11 15:50:34 +02:00
Elizabeth Figura
f0cd35b40d tests: Add reflection tests for register space. 2024-06-11 15:49:30 +02:00
Elizabeth Figura
33e5553158 vkd3d-shader/hlsl: Write SM5.1 binding reflection data. 2024-06-11 15:49:30 +02:00
Elizabeth Figura
bb41947fc6 vkd3d-shader: Write SM5.1 register spaces. 2024-06-11 15:49:30 +02:00
Elizabeth Figura
4355e6ca69 vkd3d-shader/hlsl: Allocate register spaces for objects. 2024-06-11 15:49:30 +02:00
Elizabeth Figura
7b61b0219e vkd3d-shader/hlsl: Allocate register spaces for constant buffers. 2024-06-11 15:49:30 +02:00
Elizabeth Figura
28a5e23814 vkd3d-shader: Write SM5.1 register indices.
Separate ID and index. Allocate IDs for all external resources (but ignore them
for shader models other than 5).
2024-06-11 15:49:30 +02:00
Elizabeth Figura
19a13740de vkd3d-shader/hlsl: Put constant buffers into the extern_resources struct.
Mostly to get the same sorting logic.
2024-06-11 15:49:30 +02:00
Elizabeth Figura
558320b52f vkd3d-shader/hlsl: Add a hlsl_fixme() for 5.1 resource arrays.
These are a bit trickier to handle, and need more tests.
2024-06-11 15:49:30 +02:00
Conor McCarthy
9b070edf01 vkd3d-shader/spirv: Implement the QUAD_READ_LANE_AT instruction. 2024-06-11 15:48:21 +02:00
Conor McCarthy
0b8b5b2d0f vkd3d-shader/dxil: Implement DX intrinsic QuadReadLaneAt. 2024-06-11 15:48:21 +02:00
Conor McCarthy
c298493e4f vkd3d-shader/spirv: Implement the QUAD_READ_ACROSS_* instructions. 2024-06-11 15:48:21 +02:00
Conor McCarthy
8a15642f45 vkd3d-shader/dxil: Implement DX intrinsic QuadOp. 2024-06-11 15:48:21 +02:00
Francisco Casas
f5bfa728eb vkd3d-shader/hlsl: Reorder default values for matrices for SM4.
Default value initializers behave differently than regular initializers
for matrices on SM4 profiles.

While regular initializers assign the rhs elements in reading-order
(completing one row at the time), default initializers assing the rhs
elements in Chinese reading-order (completing one column at the time).

So after lowering a default value to a constant, the index of the
component to which this default value is stored is computed to meet
this expectation. This can be done because the default values.

For reference, compiling this shader:

    row_major int2x3 m = {1, 2, 3, 4, 5, 6};

    float4 main() : sv_target
    {
        return float4(m[0][0], 99, 99, 99);
    }

gives the following buffer definition:

    // cbuffer $Globals
    // {
    //
    //   row_major int2x3 m;                // Offset:    0 Size:    28
    //      = 0x00000001 0x00000003 0x00000005 0x00000000
    //        0x00000002 0x00000004 0x00000006
    //
    // }

Given that the matrix is column-major, m's default value is actually
{{1, 3, 5}, {2, 4, 6}}, unlike the {{1, 2, 3}, {4, 5, 6}} one would
expect in a regular initializer.

SM1 profiles assign the elements in regular reading order.
2024-06-11 15:46:40 +02:00
Francisco Casas
ab01fedc5d vkd3d-shader/hlsl: Fix numeric register offset for matrix components. 2024-06-11 15:46:40 +02:00
Francisco Casas
ade3daa311 tests: Test matrix default value initializers. 2024-06-11 15:46:40 +02:00
Francisco Casas
affadf319c vkd3d-shader/d3dbc: Write default values for SM1. 2024-06-11 15:46:40 +02:00
Francisco Casas
253c994155 vkd3d-shader/tpf: Write default values for SM4. 2024-06-11 15:46:40 +02:00
Francisco Casas
b44a25ce19 tests: Test default values using reflection. 2024-06-11 15:46:40 +02:00
Francisco Casas
099a64aeb2 vkd3d-shader/hlsl: Initialize default values with braceless initializers.
It is hard to initialize default values on add_assignment() and calling
add_assignment() for initializers is not really necessary: the only
thing we need from it the implicit cast.
2024-06-11 15:46:40 +02:00
Francisco Casas
e8dbc36bd2 vkd3d-shader/hlsl: Record default values for uniforms and constant buffers. 2024-06-11 15:46:40 +02:00
Henri Verbeet
1fe7a6581b vkd3d-shader/ir: Rename the "handler_idx" field of struct vkd3d_shader_instruction to "opcode". 2024-05-30 19:57:01 +02:00
Nikolay Sivov
5265fbb789 vkd3d-shader/fx: Do not write shared buffers block when not compiling as a child effect.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-05-30 19:56:50 +02:00
Nikolay Sivov
727aacca18 tests: Add a few tests for the NULL value.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-05-30 19:56:44 +02:00
Nikolay Sivov
163aaf9729 tests: Add some basic tests for ConstantBuffer type.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-05-30 19:56:39 +02:00
Nikolay Sivov
ea177a7750 vkd3d-shader/hlsl: Handle "unsigned int" type.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-05-30 19:56:29 +02:00
Henri Verbeet
36c123c005 Release 1.12. 2024-05-29 22:05:28 +02:00
Henri Verbeet
9693271dcf tests: Rename VKD3D_TESTS_SKIP_DXC to VKD3D_TEST_SKIP_DXC.
For consistency with the other VKD3D_TEST_* environment variables.
2024-05-27 21:08:14 +02:00