Commit Graph

7965 Commits

Author SHA1 Message Date
Giovanni Mascellani
f4f2617584 vkd3d-shader/dxil: Rewrite sm6_value_is_ssa() in terms of the value type. 2025-06-10 17:40:17 +02:00
Giovanni Mascellani
361ecd6cf5 vkd3d-shader/dxil: Rewrite sm6_value_is_undef() in terms of the value type. 2025-06-10 17:40:17 +02:00
Giovanni Mascellani
0ac20b3029 vkd3d-shader/dxil: Rewrite sm6_value_is_constant() in terms of the value type. 2025-06-10 17:40:17 +02:00
Nikolay Sivov
fcb5650dbf vkd3d-shader/fx: Use a separate table for sampler states in fx_2_0.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2025-06-10 17:39:30 +02:00
Nikolay Sivov
b22ebe73bc vkd3d-shader/fx: Do not print padding bytes of fx_2_0 strings. 2025-06-10 17:39:18 +02:00
Nikolay Sivov
8aacee8eae vkd3d-shader/fx: Add a few missing fxlc opcode names.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2025-06-10 17:34:41 +02:00
Giovanni Mascellani
8da518f2cd tests: Fix the shader model requirements for a ps_5_0 shader.
In practice this is irrelevant, but better get our tests
consistent.
2025-06-09 16:22:19 +02:00
Giovanni Mascellani
45ef9fdbe8 tests: Add a test about discontiguous input swizzles in bytecode format. 2025-06-09 16:22:19 +02:00
Henri Verbeet
d881356ab2 vkd3d-shader/msl: Implement VKD3DSIH_IGE. 2025-06-09 16:20:53 +02:00
Henri Verbeet
3673b65485 vkd3d-shader/msl: Implement VKD3DSIH_IADD. 2025-06-09 16:20:53 +02:00
Henri Verbeet
cc33439f19 vkd3d-shader/msl: Implement VKD3DSIH_EQO. 2025-06-09 16:20:53 +02:00
Henri Verbeet
fc6249a228 vkd3d-shader/msl: Implement support for VKD3DSPR_SAMPLEMASK registers. 2025-06-09 16:20:53 +02:00
Henri Verbeet
ea5cf883fa vkd3d-shader/msl: Implement support for VKD3DSPR_IDXTEMP registers. 2025-06-09 16:20:53 +02:00
Francisco Casas
66d0c2a426 tests/d3d12: Avoid out-of-bounds access when evaluating ok() args (ubsan).
Compiling and running with UBSan reported the following errors:

tests/d3d12.c:31063:5: runtime error: index 4 out of bounds for type 'float [4][8]'
tests/d3d12.c:31063:5: runtime error: index 8 out of bounds for type 'float [8]'
tests/d3d12.c:31063:5: runtime error: load of address 0x557ee85a1500 with insufficient space for an object of type 'const float'
tests/d3d12.c:31248:5: runtime error: index 4 out of bounds for type 'float [4][4]'
tests/d3d12.c:31248:5: runtime error: index 4 out of bounds for type 'float [4]'
tests/d3d12.c:31248:5: runtime error: load of address 0x557ee85a10d0 with insufficient space for an object of type 'const float'
2025-06-09 16:09:22 +02:00
Giovanni Mascellani
d65be3d0c5 tests: Skip test_graphics_compute_queue_synchronization() on paravirtualized MoltenVK.
This used to work when the macOS runner had a Sonoma host system.
Now it has Sequoia, even if the guest is still Sonoma, and the
test crashes with:

    [mvk-error] VK_TIMEOUT: MTLCommandBuffer "vkQueueSubmit MTLCommandBuffer on Queue 3-0" execution failed (code 2): Caused GPU Hang Error (00000003:kIOGPUCommandBufferCallbackErrorHang)
    vkd3d:56072:err:vkd3d_wait_for_gpu_timeline_semaphore Failed to wait for Vulkan timeline semaphore, vr -4.

Upgrading MoltenVK or the guest to Sequoia doesn't seem to help.
I haven't investigated the problem, but my experience is that
the paravirtualized Metal driver has a number of problems.
2025-06-05 16:50:15 +02:00
Giovanni Mascellani
7e134f85a4 vkd3d-shader/dxil: Do not set the value type in sm6_parser_function_init().
It is rewritten in all branches that produce a value.

VALUE_TYPE_REG is therefore never set and can be retired at last.
2025-06-05 16:05:09 +02:00
Giovanni Mascellani
0e406cf0a8 vkd3d-shader/dxil: Do not set the value type in sm6_parser_declare_global().
It is rewritten in all branches.
2025-06-05 16:05:09 +02:00
Giovanni Mascellani
00b3fb96d9 vkd3d-shader/dxil: Store a SM6 value in sm6_phi.
Rather than a VSIR register.
2025-06-05 16:05:09 +02:00
Giovanni Mascellani
a9a3100cca vkd3d-shader/dxil: Represent non uniformness in the SM6 value. 2025-06-05 16:05:09 +02:00
Giovanni Mascellani
af5e5fe31b vkd3d-shader/dxil: Generate specialized values in sm6_parser_emit_cast() for trivial casts.
There is currently no need to make a special case for 16-bit
values, since the SPIR-V backend currently confuses them with
32-bit values. The generated VSIR code is not correct, but that
will have to be handled at a different level.
2025-06-05 16:05:09 +02:00
Elizabeth Figura
5e6def0843 vkd3d-shader/preproc: Store EOF state per buffer.
We may immediately push a new file or expansion.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=43481
2025-06-05 16:04:02 +02:00
Elizabeth Figura
d768ea6709 vkd3d-shader/preproc: Swap to the INITIAL state after ending a buffer. 2025-06-05 16:04:02 +02:00
Elizabeth Figura
0eb5fee633 vkd3d-shader/preproc: Parse comments in #include and #line directives. 2025-06-05 16:04:02 +02:00
Henri Verbeet
5ea697b8eb vkd3d-shader/msl: Handle SV_SAMPLE_INDEX inputs. 2025-06-05 15:58:44 +02:00
Henri Verbeet
34d8be3b2e tests/shader_runner_metal: Set the pipeline sample count in metal_runner_draw(). 2025-06-05 15:58:44 +02:00