Commit Graph

7408 Commits

Author SHA1 Message Date
Henri Verbeet
a93d258a86 Release 1.16. vkd3d-1.16 2025-05-20 11:35:48 +02:00
Henri Verbeet
379b297d2c build: Add the Objective-C API JSON to the distribution. 2025-05-15 14:13:07 +02:00
Henri Verbeet
07d8fe0462 build: Add the SPIR-V grammar JSON to the distribution. 2025-05-15 14:13:07 +02:00
Giovanni Mascellani
129b3a8c4b tests: Check that shader-visible descriptor heaps have a valid GPU descriptor handle start.
We currently check that non-shader-visible heaps have a NULL
handle, but that doesn't seem to be guaranteed: beside WARP, also
NVIDIA drivers still return a valid pointer. And that's a pretty
useless check anyway; rather, check that shader-visible heaps
have a valid pointer, which is more interesting.
2025-05-15 14:11:10 +02:00
Giovanni Mascellani
1aa33ebc80 tests: Allow creating GPU upload heaps.
They are write-combine heaps on L1 memory, and were introduced
recently in Direct3D 12.
2025-05-15 14:10:53 +02:00
Giovanni Mascellani
d5410e3115 tests: Expect success when creating resources in certain cases.
Currently the tests expect that creating buffers in COMMON or
COPY_SOURCE state on UPLOAD heaps or in COMMON state on READBACK
heaps leads to a failure. I tested WARP, AMD and NVIDIA, and in
all cases the operations is successful.

I think the D3D12 runtime used reject resources created in the
configurations detailed above, but it doesn't any more (both
using the latest Agility SDK and the runtime distributed with
an updated Windows 11 system). However the CI still uses an
earlier runtime, so the old behavior is still allowed as
broken.
2025-05-15 14:09:23 +02:00
Henri Verbeet
f5a26fd2b8 vkd3d-shader/dxil: Document the supported dxbc-dxil transformations. 2025-05-14 15:10:44 +02:00
Henri Verbeet
1efbcebed4 build: Sort the $(vkd3d_shader_tests) list. 2025-05-14 15:10:18 +02:00
Elizabeth Figura
c1adf54a44 vkd3d-shader/hlsl: Forbid referring to typedefs with "struct". 2025-05-14 15:09:48 +02:00
Elizabeth Figura
8ca50a2f7e tests/hlsl: Add more tests for struct syntax. 2025-05-14 15:09:42 +02:00
Elizabeth Figura
5ad2e7ee6d vkd3d-shader/hlsl: Fix an incorrect error message for referring to non-struct types with "struct".
We cannot be redefining struct types in this rule, only referring to already
defined types. Struct type definition is handled by named_struct_spec, which
complains if the type was defined at all, regardless of class.
2025-05-14 15:08:13 +02:00
Elizabeth Figura
bfa655a01f vkd3d-shader/ir: Use the .w component of the existing swizzle when lowering texldb. 2025-05-14 15:07:46 +02:00
Elizabeth Figura
e16176672a vkd3d-shader/hlsl: Validate "numthreads" attribute values. 2025-05-14 14:56:42 +02:00
Elizabeth Figura
cfb59828f3 tests/hlsl: Add more tests for the "numthreads" attribute. 2025-05-14 14:56:42 +02:00
Elizabeth Figura
a06b9f6646 vkd3d-shader/hlsl: Do not emit HLSL_OP1_ABS for unsigned types. 2025-05-14 14:55:59 +02:00
Elizabeth Figura
cdc74a9377 vkd3d-shader/hlsl: Emit an error when min16uint is used in d3dbc target profiles.
Fixes: 18ca7affad
2025-05-14 14:12:19 +02:00
Elizabeth Figura
8f6616993b vkd3d-shader/spirv: Do not declare inputs with an empty used_mask.
This is motivated by SampleId, whose presence or absence determines whether a
fragment shader runs at sample frequency or not.

In HLSL, if SV_SampleIndex is declared but not used, this results in a signature
entry, but no dcl instruction (and a zero used mask in the signature entry).
Whether the shader will actually run at sample frequency is inconsistent. NVidia
does, AMD does not, and WARP does for d3d12 but not for d3d11.

Previously vkd3d-shader relied on the dcl instruction, thereby aligning with
AMD. This was changed by 66cb2815f0. This commit
restores the previous behaviour.
2025-05-14 14:09:28 +02:00
Elizabeth Figura
65e1ef047f vkd3d-shader/spirv: Return void from spirv_compiler_emit_input(). 2025-05-14 14:09:28 +02:00
Elizabeth Figura
d40422592a vkd3d-shader/ir: Merge tess factor used masks together.
Encountered with the domain shader in
test_domain_shader_one_patch_constant_input().
2025-05-14 14:09:21 +02:00
Henri Verbeet
d4032f7d09 demos: Build with -fno-lto.
Some versions of Clang do not properly pass include paths to the
assembler when LTO is enabled. That's a problem for the DEMO_EMBED macro
used by the demos, since it relies on .incbin. To make matters even
better, compilation fails, but doesn't return an error code; the
resulting binary is simply broken. Fortunately we don't really care
about LTO for the demos, so we can simply disable it. See also
https://github.com/llvm/llvm-project/issues/112920

Thanks to Giovanni for tracking down some of the pieces of this issue.
2025-05-14 14:06:37 +02:00
Henri Verbeet
3c8fd8a2f2 ci: Build the demos on macOS. 2025-05-12 15:38:01 +02:00
Henri Verbeet
a2d5358ac6 demos: Avoid objc_msgSend_fpret() on ARM64 macOS.
It's unavailable, and unnecessary.
2025-05-12 15:38:01 +02:00
Giovanni Mascellani
dd34899e97 vkd3d-shader/dxil: Call register_get_float_value() directly in sm6_value_get_constant_float().
sm6_metadata_get_float_value() already calls sm6_value_is_constant()
itself, and some compilers (rightly) emit a warning that the conversion
of UINT_MAX to float changes the value.
2025-05-12 15:37:27 +02:00
Anna (navi) Figueiredo Gomes
820430001f vkd3d-shader/hlsl: Use the source data type in clone_interlocked(). 2025-05-12 15:31:09 +02:00
Elizabeth Figura
4a5411aa6e vkd3d-shader/hlsl: Return a uint1 from GetRenderTargetSampleCount(). 2025-05-12 15:29:23 +02:00