Commit Graph

7408 Commits

Author SHA1 Message Date
Henri Verbeet
dfe3ad5551 demos: Make the demos work in the Windows build.
Commit 02fe9f5bdf introduced linking the
Windows build of the demos with d3d12 and dxgi, while also still linking
to libvkd3d-utils.la. That happens to more or less work on Wine; we get
vkd3d-utils' D3D12CreateDevice(), and Wine's
IDXGIFactory2_CreateSwapChainForHwnd(), but because Wine's
implementation of d3d12 swapchains uses vkd3d, we're able to use the
resulting swapchain buffers even though the instance of vkd3d used by
Wine may not be the same instance of vkd3d used by the demos. Perhaps
unsurprisingly, things don't go nearly as well on Windows.

We could of course stop linking the demos to vkd3d-utils on Windows, but
that's not that interesting; we're trying to show what vkd3d can do
here, not what d3d12 can do.
2025-04-28 12:16:10 +02:00
Henri Verbeet
883ffc5fd6 demos: Split demo_win32.h.
Much like we did for demo_xcb.h, demo_win32.h now just has the bits for
creating windows and handling events, while demo_d3d12.h has the d3d12
and dxgi bits.
2025-04-28 12:14:36 +02:00
Henri Verbeet
ceb2787d46 ci: Install mingw-w64-tools in the Linux image.
For the build-mingw-32 and build-mingw-64 jobs. These currently end up
picking up Linux pkg-config instead of MinGW pkg-config, which in turn
causes configure to pick up Linux OpenGL and XCB. We happen to get away
with that at the moment because none of the code using HAVE_OPENGL or
HAVE_XCB ends up getting built for Windows, but that's about to change.
Specifically, we'd like to build the vkd3d versions of the demos for
Windows.
2025-04-23 18:13:07 +02:00
Henri Verbeet
aa8161a7ad build: Do not add libvkd3d-shader.la to DEMOS_LDADD twice.
Commit e3f78706ec added libvkd3d-shader.la
to LDADD, but didn't remove it from DEMOS_LDADD.
2025-04-23 18:12:54 +02:00
Henri Verbeet
88bbc106c7 vkd3d-shader/spirv: We can parse up to SPIR-V 1.6.
The main reason to care at this point is that we actually emit SPIR-V 1.3
ourselves in some cases.
2025-04-23 18:12:39 +02:00
Conor McCarthy
4c8c31fa2e tests/hlsl: Add a shader model 5.1 test to srv-byteaddressbuffer.shader_test.
Some code paths for TPF handling are not tested if no 5.1 shaders are
compiled.
2025-04-23 18:11:42 +02:00
Conor McCarthy
c75b318805 vkd3d-shader/tpf: Emit the resource data type only for typed resource declarations. 2025-04-23 18:10:51 +02:00
Shaun Ren
5d29554fed tests/hlsl: Add geometry shader stream output syntax tests. 2025-04-23 18:03:59 +02:00
Shaun Ren
2a89b23ede vkd3d-shader/hlsl: Validate and record stream output objects.
Validation should only be done for stream outputs that are used.
2025-04-23 18:01:06 +02:00
Shaun Ren
f2f44b054d vkd3d-shader/hlsl: Allocate registers for stream output objects.
All stream output objects need to have a stream index allocated,
whether they are used or not.

We allocate stream outputs here, before other objects are allocated,
because the stream index is needed to create the appropriate output
semantic variables during append_output_copy(), which will be called
in a lowering pass for the Append() method.
2025-04-23 17:54:54 +02:00
Shaun Ren
d620ad4942 vkd3d-shader/hlsl: Introduce HLSL_REGSET_STREAM_OUTPUTS regset. 2025-04-23 17:54:54 +02:00
Shaun Ren
8059608af9 vkd3d-shader/hlsl: Parse the RestartStrip() method for stream outputs. 2025-04-23 17:54:54 +02:00
Shaun Ren
9525eb2f0c vkd3d-shader/hlsl: Parse the Append() method for stream outputs. 2025-04-23 17:54:54 +02:00
Shaun Ren
9b65cc8895 vkd3d-shader/hlsl: Support HLSL_CLASS_STREAM_OUTPUT in hlsl type helpers. 2025-04-23 17:54:54 +02:00
Giovanni Mascellani
6ca9395368 tests/d3d12: Skip testing NULL VBVs on NVIDIA on Windows.
It seems that the NVIDIA drivers leaves VBVs bindings untouched
when they are NULL (or the GPU buffer address is NULL), instead of
setting them to a null binding.

Differently from other cases of inconsistent behaviour between AMD
and NVIDIA, here I'm explicitly marking the NVIDIA behaviour as
broken, because the expected behaviour is spelled out explicitly
(at least for the D3D12 specification standards).
2025-04-21 14:43:59 +02:00
Giovanni Mascellani
bc637f2633 tests/d3d12: Do not validate the semantic of uint-clearing R11G11B10_FLOAT resources.
Implementations have no consistent behaviour.
2025-04-21 14:43:27 +02:00
Giovanni Mascellani
c1d04b84c7 tests/d3d12: Do not test out-of-bound UAV uint clears.
The behaviour is not uniform: AMD truncates, NVIDIA saturates.
2025-04-21 14:40:44 +02:00
Giovanni Mascellani
f890db872a tests/d3d12: Do not allow texture creation to fail when testing UAV uint clears.
If the format is supported texture creation should always succeed.
2025-04-21 14:40:31 +02:00
Giovanni Mascellani
f932af7f18 tests/d3d12: Check that B5G6R5_UNORM and B5G5R5A1_UNORM are supported before testing them.
They are not always available on NVIDIA GPUs.
2025-04-21 14:36:39 +02:00
Giovanni Mascellani
4324817c68 tests/d3d12: Set the descriptor heap when clearing UAVs. 2025-04-21 14:32:58 +02:00
Giovanni Mascellani
c764f71cf5 vkd3d-shader/ir: Validate that DEPTHOUTLE registers aren't used as sources. 2025-04-16 16:46:38 +02:00
Giovanni Mascellani
ee7895465c vkd3d-shader/ir: Validate that DEPTHOUTGE registers aren't used as sources. 2025-04-16 16:46:28 +02:00
Giovanni Mascellani
834017c198 vkd3d-shader/ir: Validate that DEPTHOUT registers aren't used as sources. 2025-04-16 16:46:05 +02:00
Giovanni Mascellani
a189a4cfb7 tests/hlsl: Do not test the implicit passthrough control point phase for SM6. 2025-04-16 16:43:45 +02:00
Giovanni Mascellani
dbd1938ce4 tests/hlsl: Fix the precision for a 16-bit arithmetic test. 2025-04-16 16:42:20 +02:00