Commit Graph

678 Commits

Author SHA1 Message Date
Giovanni Mascellani
fb55c2b227 vkd3d: Emit an ERR() when reaching unreachable code.
This way the ERR() configuration is reused for unreachable code.
2024-07-29 13:17:19 +02:00
Giovanni Mascellani
4ada72a397 vkd3d: Allow aborting on ERR(). 2024-07-29 13:17:19 +02:00
Giovanni Mascellani
d7fc2693c4 vkd3d: Introduce a softer form of assertion.
Triggering an ERR() instead of aborting the program.
2024-07-29 13:17:19 +02:00
Giovanni Mascellani
a484063cd2 vkd3d: Introduce debug severity MESSAGE.
That's intended for messages that it's pretty important that the
user receives, but that are not proper error messages.
2024-07-29 13:17:19 +02:00
Giovanni Mascellani
021a7f030a vkd3d: Allow disabling ERR() by defining VKD3D_NO_ERROR_MESSAGES. 2024-07-29 13:17:19 +02:00
Giovanni Mascellani
60ecf8c12b vkd3d: Disable FIXME_ONCE() when VKD3D_NO_DEBUG_MESSAGES is defined.
Similarly to FIXME().
2024-07-29 13:17:19 +02:00
Giovanni Mascellani
4c1cc6101f vkd3d: Disable WARN_ON() when VKD3D_NO_DEBUG_MESSAGES is defined.
Similarly to WARN().
2024-07-29 13:17:19 +02:00
Elizabeth Figura
ae5cd6573f vkd3d-shader: Allow controlling d3d color shade mode through vkd3d-shader parameters. 2024-07-24 16:08:10 +02:00
Elizabeth Figura
806363b765 vkd3d-shader: Allow controlling alpha test through vkd3d-shader parameters. 2024-07-11 17:02:11 +02:00
Elizabeth Figura
e8bdac8147 vkd3d-shader/spirv: Support passing shader parameters through uniform buffers. 2024-07-11 16:58:52 +02:00
Elizabeth Figura
3dff608bf8 include: Document shader parameters. 2024-07-11 16:48:09 +02:00
Elizabeth Figura
98def3214b vkd3d-shader: Introduce struct vkd3d_shader_parameter_info and struct vkd3d_shader_parameter1.
As the newly added documentation describes, this reroll serves two purposes:

* to allow shader parameters to be used for any target type (which allows using
  parameters for things like Direct3D 8-9 alpha test),

* to allow the union in struct vkd3d_shader_parameter to contain types larger
  than 32 bits (by specifying them indirectly through a pointer).
2024-07-11 16:48:09 +02:00
Giovanni Mascellani
4f67675a51 tests: Support using the Agility SDK in the crosstests. 2024-07-09 16:57:03 +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
Yuxuan Shui
8a459f5903 tests: Pass the correct buffer size to vsnprintf() in vkd3d_test_push_context(). 2024-06-12 19:04:22 +02:00
Henri Verbeet
36c123c005 Release 1.12. 2024-05-29 22:05:28 +02:00
Henri Verbeet
b363fdbb21 include: Add a \since tag for VKD3D_FALSE. 2024-05-27 21:08:00 +02:00
Henri Verbeet
007233a016 include: Document the additional HLSL transformations supported by vkd3d_shader_compile(). 2024-05-27 21:08:00 +02:00
Giovanni Mascellani
05394b624a vkd3d: Handle D3D12_FEATURE_D3D12_OPTIONS18 in CheckFeatureSupport(). 2024-05-13 11:50:37 +02:00
Giovanni Mascellani
7c7503713a vkd3d: Handle D3D12_FEATURE_D3D12_OPTIONS17 in CheckFeatureSupport(). 2024-05-13 11:50:37 +02:00
Giovanni Mascellani
d528fdbebf vkd3d: Handle D3D12_FEATURE_D3D12_OPTIONS16 in CheckFeatureSupport(). 2024-05-13 11:50:37 +02:00
Giovanni Mascellani
5445c4c8aa vkd3d: Handle D3D12_FEATURE_D3D12_OPTIONS15 in CheckFeatureSupport(). 2024-05-13 11:50:37 +02:00
Giovanni Mascellani
761ee1e487 vkd3d: Handle D3D12_FEATURE_D3D12_OPTIONS14 in CheckFeatureSupport(). 2024-05-13 11:50:37 +02:00
Giovanni Mascellani
3f43d06f5c include: Document structure vkd3d_image_resource_create_info. 2024-05-02 22:19:08 +02:00
Giovanni Mascellani
2679b10fcb include: Document structure vkd3d_optional_device_extensions_info. 2024-05-02 22:19:08 +02:00
Giovanni Mascellani
2b1abc5d7b include: Document structure vkd3d_device_create_info. 2024-05-02 22:19:08 +02:00
Stefan Dösinger
71f1955cd6 vkd3d: Implement vkd3d_shader_cache_get. 2024-04-24 23:49:20 +02:00
Stefan Dösinger
aad76f4ed2 vkd3d: Implement vkd3d_shader_cache_put. 2024-04-24 23:49:15 +02:00
Henri Verbeet
af33caf036 vkd3d-common: Introduce vkd3d_atomic_exchange_ptr(). 2024-04-24 23:49:12 +02:00
Henri Verbeet
b1c326ce56 vkd3d-common: Introduce vkd3d_atomic_exchange_u32(). 2024-04-24 23:49:11 +02:00
Henri Verbeet
5c8a90a6c9 vkd3d-common: Introduce vkd3d_atomic_compare_exchange_u32(). 2024-04-24 23:49:11 +02:00
Henri Verbeet
46fca3f9f4 vkd3d-common: Introduce VKD3D_BITMAP_SIZE. 2024-04-23 22:41:25 +02:00
Henri Verbeet
7b4a1fdfbc vkd3d: Move the vkd3d_cond implementation to vkd3d-common.
Much like the vkd3d_mutex implementation.
2024-04-22 23:15:20 +02:00
Giovanni Mascellani
7fbd753cf7 include: Document structure vkd3d_host_time_domain_info. 2024-04-22 23:14:15 +02:00
Giovanni Mascellani
d2d4ed9f63 include: Document structure vkd3d_application_info. 2024-04-22 23:14:15 +02:00
Giovanni Mascellani
d27bbce0e1 include: Document struct vkd3d_optional_instance_extensions_info. 2024-04-22 23:14:15 +02:00
Giovanni Mascellani
a1ebb3925b include: Document struct vkd3d_structure_type. 2024-04-22 23:14:15 +02:00
Giovanni Mascellani
995a316fba include: Document struct vkd3d_instance_create_info. 2024-04-22 23:14:15 +02:00
Conor McCarthy
b0145ad96e vkd3d-shader: Introduce a wave ops feature flag. 2024-04-17 22:51:52 +02:00
Conor McCarthy
6975a8d726 vkd3d-shader: Introduce SPIRV_ENVIRONMENT_VULKAN_1_1.
The SPIR-V backend may emit SPIR-V 1.3 if Vulkan 1.1 is available.
Some extensions which provide wave op instructions are available in
SPIR-V 1.0, but these are not sufficient to implement all Shader Model 6
wave op intrinsics. SPIR-V 1.3 has all of the required instructions, but
does not support reading from a quad at a non-constant (but uniform) lane
index, so it may later prove necessary to introduce a Vulkan 1.2
environment.
2024-04-17 22:51:49 +02:00
Stefan Dösinger
a7860ae752 vkd3d: Implement reopening existing caches. 2024-04-10 08:54:58 -05:00
Stefan Dösinger
8653ce17cf tests: Add tests for creating D3D12ShaderCacheSession objects. 2024-04-04 22:19:46 +02:00
Nikolay Sivov
e1e6367210 vkd3d-shader/fx: Add an option to include empty buffers in the effect binary.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-04-02 23:10:42 +02:00
Giovanni Mascellani
5f2f126b70 include: Include stddef.h in vkd3d_shader.h.
Type size_t is used in the file without importing any header which
defines it. This only works when the translation unit includes one of
the appropriate headers anyway or when the appropriate header is included
internally by other standard C headers; none of those strategies should
be relied upon.
2024-04-02 23:09:51 +02:00
Zebediah Figura
6b6e4bc212 vkd3d-shader: Add a compile option to control whether implicit truncation warnings are printed.
d3dcompiler and d3dx9 versions before 42 don't emit this error; this will be
necessary to emulate that behaviour.

Other warnings exist that are introduced in different d3dcompiler versions,
although there are not very many distinct HLSL warnings to begin with.

We could of course group all these together under a single compiler option, but
I find that using separate top-level options is unilaterally friendlier to an
API consumer, and simpler to implement as well. It also in some sense maps
conceptually to e.g. "-Wno-implicit-conversion".
2024-03-27 22:37:34 +01:00
Nikolay Sivov
cfa63da3f1 vkd3d-shader: Adjust "child-effect" option documentation.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-27 22:37:21 +01:00
Zebediah Figura
2fceebd050 vkd3d-utils: Parse the RD11 section. 2024-03-27 22:36:33 +01:00
Zebediah Figura
90cd57404b vkd3d-utils: Implement ID3D12ShaderReflection::GetConstantBufferByIndex(). 2024-03-27 22:36:31 +01:00
Henri Verbeet
166dc24b2f vkd3d: Move the vkd3d_mutex implementation to vkd3d-common. 2024-03-19 22:58:53 +01:00
Henri Verbeet
2431357fd6 vkd3d-common: Merge vkd3d_debug.h into vkd3d_common.h.
There doesn't seem much point in separating these. Pretty much all of
vkd3d (eventually) includes vkd3d_debug.h, and vkd3d_debug.h includes
vkd3d_common.h because it uses VKD3D_PRINTF_FUNC. The separation also
makes it inconvenient to use the debug macros in vkd3d_common.h.
2024-03-19 22:58:51 +01:00