Hans-Kristian Arntzen
7502b4c4c8
vkd3d: Fix MSVC build.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-12-02 22:48:48 +01:00
Hans-Kristian Arntzen
d2fd3de7c1
vkd3d: Handle somewhat common VkResult.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-11-26 20:02:14 +01:00
Philip Rebohle
4000397570
vkd3d: Remove legacy format compatibility info.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-11-26 16:51:01 +01:00
Philip Rebohle
9624102dcb
vkd3d: Rework format compatibility lists.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-11-26 16:51:01 +01:00
Philip Rebohle
42b8fc3338
vkd3d: Introduce new format compatibility table.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-11-26 16:51:01 +01:00
Hans-Kristian Arntzen
3081887757
vkd3d: Add 12_2 to list of valid feature levels.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-14 21:18:29 +02:00
Hans-Kristian Arntzen
fcaeca8d27
vkd3d: Allow typeless depth-stencil formats without ALLOW_DEPTH_STENCIL.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-07 13:31:28 +02:00
Hans-Kristian Arntzen
7b67de7d0e
vkd3d: Generalize get_plane_footprints.
...
Get information directly from vkd3d_format and allow for subsampled
formats in the future.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-02 12:21:22 +02:00
Hans-Kristian Arntzen
5c2376faf5
vkd3d: Handle multiplanar formats in GetCopyableFootprints.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-02 12:21:22 +02:00
Georg Lehmann
a7922a7c85
vkd3d: Introduce vkd3d_internal_get_vk_format.
...
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2021-06-24 12:55:17 +02:00
Georg Lehmann
0d9c7bc3ad
vkd3d: Index formats by format.
...
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2021-06-24 12:55:17 +02:00
Georg Lehmann
c915f237e3
vkd3d: Index depth stencil formats by format.
...
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2021-06-24 12:55:17 +02:00
Georg Lehmann
1af017c284
include: Add some new dxgi formats.
...
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2021-06-24 12:55:17 +02:00
Joshua Ashton
135c7332e4
vkd3d: Implement D3D12_RESOURCE_STATE_SHADING_RATE_SOURCE
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-04-12 13:22:01 +02:00
Hans-Kristian Arntzen
2f60a3bf66
vkd3d: Fix broken debug_vk_memory_{property,heap}_flags.
...
C is fun, yo. Returned data from dead stack variable, also triggered
overflow in some cases.
Uncalled in release mode, but can crash debug builds.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-25 17:58:18 +01:00
Joshua Ashton
bc1b18dc02
vkd3d: Add some missing flags in debug_vk helpers
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-03-22 14:29:45 +01:00
Joshua Ashton
8c9527cdf7
vkd3d: Refactor SetName implementation
...
As per MSDN, SetName is just a wrapper around SetPrivateData and a specific GUID.
Some apps and tools will use this to retrieve their name back.
So instead, just forward the name to Vulkan in the SetPrivateData call.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-02-25 21:51:43 +01:00
Hans-Kristian Arntzen
83861cceed
vkd3d: Allow RTAS initial resource state.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-02-25 16:14:16 +01:00
Joshua Ashton
fccbd3b5e2
vkd3d: Eliminate wchar_size, use UTF-16 string literals
...
Achieves this with C standard stuff alone, and no compiler hacks.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-02-09 11:26:28 +01:00
Joshua Ashton
51bf939743
vkd3d: Implement DXGI_FORMAT_B4G4R4A4_UNORM
...
Uses VK_EXT_4444_formats.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-02-04 12:04:10 +01:00
Philip Rebohle
037efbdcda
vkd3d: Add mapping for PACK16 formats.
...
Dirt 5 fails with an error message otherwise.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-01-08 18:37:26 +01:00
Joshua Ashton
a991fddeeb
build: Use `-fvisibility=hidden` and define exports manually
...
When building natively on Windows we use dllexport/dllimport for vkd3d/vkd3d_utils public exports.
When building natively on Linux we simply make those visibility default.
Nothing changes for standalone here.
Closes #152
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-05 10:44:10 +02:00
Hans-Kristian Arntzen
00618cb2c1
vkd3d: Load VK_LAYER_KHRONOS_validation if we enable debug mode.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-30 17:36:53 +02:00
Philip Rebohle
abb8d32642
vkd3d: Add DXGI_FORMAT_R9G9B9E5_SHAREDEXP.
...
Needed by Battlefield 1.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-07-20 19:42:44 +02:00
Hans-Kristian Arntzen
7bccab7427
debug: Re-introduce different debug channels.
...
vkd3d-shader is currently kinda buggy and crashes when you try to trace
DXBC. This used to never be run since it was guarded by
VKD3D_SHADER_DEBUG, but with the move to a static build we merged all
debug logging under VKD3D_DEBUG. Reintroduce different debug channels in
a way that is compatible with a statically linked vkd3d.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-10 14:18:15 +02:00
Joshua Ashton
dff27c9e9c
vkd3d: Load INSTANCE_EXT procs into device table
...
We need these for the upcoming swapchain factory implementation
for standalone D3D12.
They're also probably good to have around in future for the
d3d12 device.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-06 19:29:30 +02:00
Joshua Ashton
ba3dabe3bb
vkd3d: Add debug_dxgi_format helper
...
DXGI_FORMAT -> string
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-06 19:29:30 +02:00
Joshua Ashton
08544fb938
vkd3d: Use CONST_VTBL instead of const for vtable decls
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-03 16:56:10 +02:00
Joshua Ashton
287ceb207d
vkd3d: Refactor platform-specific code
...
This commit moves the module handling code which was previously dumped in device.c and the code to retrieve the current executable path to its own file.
This also eliminates HAVE_DECL_PROGRAM_INVOCATION_NAME from config.h
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-16 11:07:50 +02:00
Joshua Ashton
f3ec53cb5d
vkd3d: Implement vkd3d_get_program_name for Win32
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-16 11:07:50 +02:00
Joshua Ashton
b9909854fe
vkd3d: Make nameless unions really nameless
...
This makes it consistent across tests and vkd3d.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-15 19:59:52 +02:00
Hans-Kristian Arntzen
cae30f8602
utils: Add a max_elements parameter to wchar conversion.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-06-11 13:02:50 +02:00
Hans-Kristian Arntzen
9534c1a345
vkd3d: Move to VK_EXT_debug_utils.
...
debug_marker/debug_report are both deprecated in favor of debug_utils and vkd3d was using marker in a
buggy way anways, as debug_marker requires debug_report to work, but it was
only conditionally enabled.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-06-11 13:02:50 +02:00
Philip Rebohle
fe13c017ea
vkd3d: Move is_power_of_two to common header.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-05-07 15:24:35 +02:00
Philip Rebohle
65f2e03dd0
vkd3d: Introduce vkd3d_get_typeless_format helper.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-22 15:18:09 +02:00
Philip Rebohle
20aa3c3c26
vkd3d: Make ID3DBlob implementation more accessible.
...
We're going to need this to implement other parts of the
API, so it should be in common code.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-08 14:23:28 +02:00
Hans-Kristian Arntzen
92724ce15c
vkd3d: Attempt to create a Vulkan 1.1 instance and device.
...
Need this to support subgroup operations for SM 6.0.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-03-05 11:03:01 +01:00
Hans-Kristian Arntzen
484ac51267
vkd3d: Add simple pthread wrapper for MSVC.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-02-24 11:53:29 +01:00
Philip Rebohle
207ca12725
vkd3d: Re-implement d3d12_command_list_ClearUnorderedAccessViewUint().
...
Addresses the following limitations of the previous implementation:
- Only R32_{UINT,TYPELESS} were supported for buffers.
- Clearing an image UAV did not behave correctly for images with non-UINT formats.
- Due to the use of transfer operations, extra memory barriers were needed.
If necessary, this will create a temporary view with a bit-compatible
UINT format for the resource in order to perform a bit-exact clear.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-25 16:07:04 +01:00
Henri Verbeet
da68980fdc
vkd3d: Properly check for program_invocation_name.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-15 17:42:03 +01:00
Rémi Bernon
7ec32ebfc5
vkd3d: Introduce vkd3d_format_copy_data().
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-18 18:06:08 +02:00
Józef Kucia
8b49b6e057
build: Enable -Wimplicit-fallthrough.
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-06 17:05:04 +02:00
Józef Kucia
0184917520
vkd3d: Add support for VK_KHR_image_format_list.
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-06 17:04:54 +02:00
Józef Kucia
0d851513dc
vkd3d: Get rid of dxgi_format_is_typeless().
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-31 08:31:56 +02:00
Jactry Zeng
9d138ee135
vkd3d: Handle SINT and UINT formats in ClearRenderTargetView().
...
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-31 08:31:53 +02:00
Józef Kucia
69e73a6a8f
vkd3d: Implement D3D12_FEATURE_FORMAT_INFO.
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-28 08:10:53 +02:00
Józef Kucia
3d8b68e611
vkd3d: Add DXGI_FORMAT_R32G32B32_TYPELESS.
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-28 08:10:51 +02:00
Józef Kucia
3d681737c9
vkd3d: Try to guess application name.
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-18 16:40:41 +02:00
Józef Kucia
5f4b2266b9
vkd3d: Fix debug_d3d12_shader_component_mapping().
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-10 12:24:42 +02:00
Józef Kucia
e01eae5b8a
vkd3d: Use D32_SFLOAT_S8_UINT when D24_UNORM_S8_UINT is not supported.
...
Fixes rendering in UE4 Infiltrator Demo on AMD.
Adjustments for depth bias aren't implemented yet.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-09 08:21:04 -05:00