Hans-Kristian Arntzen
7b0345a149
vkd3d-shader: Add way to scan for expected patch vertex count from HS.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen
c8bbed15d7
vkd3d: Implement 32-bit bitmask iteration.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen
66b252e08f
vkd3d: Remove reliance on HAVE_BUILTIN_CTZLL.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen
1f2499f64a
vkd3d: Add 32-bit bitmask iteration with scanning.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen
8743577ca5
vkd3d: Add MSVC path for pthread_once_t.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-10 16:09:00 +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
Hans-Kristian Arntzen
0c59c30e08
vkd3d: Fix tzcnt64 on MSVC 32-bit and 64-bit.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-07 16:31:29 +01:00
Joshua Ashton
9c105a78a9
vkd3d: Implement swapchain and swapchain factory
...
Needed for standalone D3D12.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-06 19:29:30 +02:00
Joshua Ashton
cb4fcd5a98
include: Replace MinGW hack with Win32 platform header
...
Replace this hack with a more versatile one that works for multiple compilation objects.
Consolidates this hack across all the code bases (soon to be used in a D3D12 standalone patch)
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-06 19:29:30 +02:00
Joshua Ashton
e24914b11f
include: Pull in Win32 Vulkan exts when building for Win32
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-06 19:29:30 +02:00
Joshua Ashton
fdcf33ff47
vkd3d-shader: Fix incorrect enum being used for tesselator partitioning
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-26 15:42:41 +02:00
Joshua Ashton
d709fd3306
vkd3d: Add vkd3d_atomic_uint32_{dec, inc}rement helper
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-24 21:13:35 +02:00
Joshua Ashton
45d4296a54
vkd3d: Rename vkd3d_uint32_atomic to vkd3d_atomic_uint32
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-24 21:13:35 +02:00
Joshua Ashton
033f76e3ae
vkd3d: Define our own memory orders
...
We shouldn't potentially override stuff in the std library and this allows us to map directly to __ATOMIC_* memory orders which is more correct.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-24 21:13:35 +02:00
Joshua Ashton
25f6e1d0a9
vkd3d: Use __atomic builtins instead of stdatomic
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-24 21:13:35 +02:00
Joshua Ashton
26c9dc90f4
vkd3d: Implement sequential consistency on MSVC
...
Also optimize and reduce unnecessary barriers.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-24 21:13:35 +02:00
Joshua Ashton
4c819baad3
vkd3d: Use pthread reimplementation only on MSVC
...
We can use pthreads properly under MinGW
2020-06-24 15:27:22 +02:00
Joshua Ashton
fb02f28c41
vkd3d: Don't redefine InterlockedIncrement under MinGW
...
Fixes compiler warnings
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-24 15:27:22 +02:00
Joshua Ashton
4521b253dd
vkd3d: Toss VKD3D_DEBUG_ENV_NAME
...
Creates linking problems if we want to build vkd3d-shader statically given this links back to something in vkd3d-common.
We don't need this distinction anyways...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-24 15:18:56 +02:00
Hans-Kristian Arntzen
2b7ef38248
Revert "vkd3d: make spinlock_t atomic to make clang happy"
...
This reverts commit 7b1dce2667
.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-06-24 13:40:03 +02:00
Georg Lehmann
7b1dce2667
vkd3d: make spinlock_t atomic to make clang happy
...
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2020-06-24 13:26:31 +02:00
Joshua Ashton
8c216e637c
build: Add Meson build system
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-23 14:55:43 +02:00
Joshua Ashton
45f9836c60
vkd3d: Eliminate config.h
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-23 14:55:43 +02:00
Joshua Ashton
1f266cc16b
vkd3d: Eliminate HAVE_PTHREAD_H
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-23 14:55:43 +02:00
Georg Lehmann
a95e56675a
vkd3d: use pause while spinning on x86
...
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2020-06-17 09:49:08 +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
cd5d01d25c
vkd3d: Refactor atomics
...
There is no stdatomic available on MSVC so let's clean things up.
This moves all the atomic helpers to vkd3d_atomic.h and implements all platform's spinlocks in entirely the same way.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-15 20:40:10 +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
cbdf6f88d2
vkd3d: Remove dependency on linking directly against libvulkan.
...
There is no reason to not load Vulkan dynamically, otherwise, we must
have loader dev packages installed, which is not ideal.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-06-15 15:47:18 +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
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
830c1e7a06
include: Fix incorrect UpdateTileMappings declaration.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-30 18:08:25 +02:00
Hans-Kristian Arntzen
6a6aa69abb
include: Add missing DXR constants to IDL.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-04-22 16:28:19 +02:00
Hans-Kristian Arntzen
4595cacc79
vkd3d: Enforce that WCHAR is actually a WCHAR.
...
We will need to receive 2-byte WCHARs from apps.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-04-22 16:26:49 +02:00
Hans-Kristian Arntzen
ca7c027cd1
vkd3d: Replace dummy atomic_fetch_add with atomic loads.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-04-17 15:46:09 +02:00
Philip Rebohle
bfcb41706c
include: Update D3D12 IDL.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-15 14:25:01 +02:00
Philip Rebohle
d65cd725d9
include: Fix typos.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-15 10:35:59 +02:00
Philip Rebohle
561675410b
include: Fix typo.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-14 16:27:08 +02:00
Philip Rebohle
c44b168da2
include: Fix ID3D12Device2 GUID.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-08 14:23:28 +02:00
Philip Rebohle
1b41a77c19
include: Add missing logic ops.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-01 13:54:10 +02:00
Philip Rebohle
ac1942f9ac
include: Fix typos and add D3D12_DEPTH_STENCIL_DESC1.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-01 10:35:40 +02:00
Philip Rebohle
22feb3e8be
include: Update D3D12 IDL.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-30 15:45:05 +02:00
Philip Rebohle
b577b5c329
vkd3d-common: Implement spinlock.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-03-27 13:33:03 +01:00
Philip Rebohle
a9ba32a6c4
vkd3d-shader: Add option to declare bindless CBVs as SSBOs.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-18 14:35:35 +01:00
Philip Rebohle
be5cdd2e55
vkd3d-shader: Optionally declare push constant buffer as UBO.
...
Will be used on implementations that do not support enough
push constants to hold all root signature data.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-16 13:54:12 +01:00
Philip Rebohle
aff849e7f4
vkd3d: Add helpers to iterate over 64-bit masks.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 11:44:45 +01:00
Philip Rebohle
1c9b07e8b3
vkd3d-shader: Scan multi-register descriptor ranges properly.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 10:55:24 +01:00
Philip Rebohle
ade87e6c47
vkd3d-shader: Add push constants for descriptor table offsets.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 10:55:24 +01:00
Philip Rebohle
34e128897d
vkd3d-shader: Pass more info from root signature to shader compiler.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 10:55:24 +01:00
Philip Rebohle
324da790db
vkd3d-shader: Simplify UAV counter interface declaration.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-02 12:16:30 +01:00