Hans-Kristian Arntzen
afdbf6edcd
vkd3d: Enable VK_KHR_timeline_semaphore extension.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-03-31 12:51:05 +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
8344e8224e
vkd3d: Only add feature structs to pNext chain if extension is supported.
...
RenderDoc will sometimes report extensions as unsupported, but still
fill out and accept the respective feature structs. Since we assume
extensions to be supported if the feature is enabled, we sometimes
try to use functionality that RenderDoc disables and crash.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-30 11:07:53 +02:00
Philip Rebohle
00d88454ee
vkd3d: Factor out extension enumeration.
...
Besides cleaning up the code, this also allows us to
use information about the available extensions earlier.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-30 11:07:53 +02:00
Philip Rebohle
34f9cae1c6
vkd3d: Disable unused BufferDeviceAddress features.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-30 11:07:53 +02:00
Philip Rebohle
cf759d4d76
vkd3d: Only set memory device address bit if extension is supported.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-30 11:07:53 +02:00
Philip Rebohle
f5dc3fa8c8
vkd3d: Skip redundant descriptor copies.
...
Greatly improves performance in Control.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-30 10:51:14 +02:00
Philip Rebohle
78034ecef1
vkd3d: Simplify checks whether a descriptor has a view.
...
SaVes a few CPU cycles on a potentially very hot code path.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-30 10:51:14 +02:00
Philip Rebohle
1836815222
vkd3d: Rework descriptor magic.
...
Changes the magic to a three-character string with flags
in the highest byte.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-30 10:51:14 +02:00
Philip Rebohle
33a2ace768
vkd3d: Don't copy entire descriptor when destroying view.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-30 10:51:14 +02:00
Philip Rebohle
09b7013f59
vkd3d: Don't use push descriptors if we exceed the device limit.
...
This can in theory happen if we have 32 root descriptors and
bindless UAV counters.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-30 10:47:47 +02:00
Philip Rebohle
29d1a5e089
vkd3d: Remove unused root descriptor count from root signature.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-30 10:47:47 +02:00
Philip Rebohle
643ace438e
vkd3d: Store push descriptor properties in device info struct.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-30 10:47:47 +02:00
Philip Rebohle
a7a27e3c05
vkd3d: Fix descriptor count for UAV counter binding.
...
Copy-paste error that causes us to exceed the push descriptor
limit in some situations.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-30 10:47:47 +02:00
Philip Rebohle
920d029100
vkd3d: Don't require bindless UAV counters for RESOURCE_BINDING_TIER_3.
...
Nvidia does not support VK_KHR_buffer_device_address at the moment.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-28 10:39:14 +01:00
Hans-Kristian Arntzen
671560c4e3
vkd3d-shader: Allow bindless UAV counters in DXIL.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-03-27 15:43:19 +01:00
Hans-Kristian Arntzen
31a2a308ee
vkd3d-shader: Enable physical storage extension in DXIL.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-03-27 15:43:19 +01:00
Hans-Kristian Arntzen
877c3afedd
vkd3d: Fix MSVC build.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-03-27 15:43:19 +01:00
Philip Rebohle
8843739797
vkd3d: Require bindless UAV and UAV counters for BINDING_TIER_3.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-27 15:37:59 +01:00
Philip Rebohle
f8c842f03c
vkd3d: Enable bindless UAV counters if supported.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-27 15:04:23 +01:00
Philip Rebohle
e97c5be394
vkd3d: Enable VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT as necessary.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-27 15:04:23 +01:00
Philip Rebohle
b5b9f464d7
vkd3d: Enable VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT_KHR as necessary.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-27 15:04:23 +01:00
Philip Rebohle
e1ad2f0f03
vkd3d: Set SHADER_DEVICE_ADDRESS_BIT for buffers.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-27 15:04:23 +01:00
Philip Rebohle
74b1831960
vkd3d: Bind UAV counter address buffer if necessary.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-27 15:04:23 +01:00
Philip Rebohle
b64284d40d
vkd3d: Write UAV counter addresses to the address buffer.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-27 15:04:23 +01:00
Philip Rebohle
1b39b107b1
vkd3d: Create buffer for UAV counter addresses.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-27 15:04:23 +01:00
Philip Rebohle
000983aa73
vkd3d: Declare bindless UAV counter binding.
...
We'll add this to the root descriptor set since moving the binding
to one of the bindless sets would be hard to do; we'd need to track
the binding index of each "bindless" binding for set updates etc.
In order to stay within the limit of 8 sets, we also cannot introduce
a separate set for UAV counters (currently there are 6 bindless sets,
the static sampler set, and the root descriptor set).
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-27 15:04:23 +01:00
Philip Rebohle
577efe9040
vkd3d: Optionally enable VK_KHR_buffer_device_address.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-27 15:04:23 +01:00
Philip Rebohle
4d896bf53c
vkd3d-shader: Use correct addressing model for physical storage buffers.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-27 15:04:23 +01:00
Philip Rebohle
aca3e7636e
vkd3d-shader: Implement bindless UAV counter ops.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-27 15:04:23 +01:00
Philip Rebohle
cb9775ca05
vkd3d-shader: Respect bindless flag for UAV counter bindings.
...
Also stores the type ID of the pointer to the UAV counter struct,
since we need to load the pointer before we can access the counter.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-27 15:04:23 +01:00
Philip Rebohle
11a9ac6c19
vkd3d-shader: Emit declarations for bindless UAV counters.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-27 15:04:23 +01:00
Philip Rebohle
facae7690c
vkd3d: Replace descriptor mutex with per-descriptor spinlocks.
...
Greatly improves performance in various games that update or
copy a large number of descriptors per frame due to the high
overhead of pthread_mutex_{un}lock.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-27 13:33:03 +01: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
Hans-Kristian Arntzen
1030989973
vkd3d: Fix integer cast warning in d3d12.c.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-03-26 12:17:55 +01:00
Philip Rebohle
cdc35483c4
vkd3d: Remove default pixel shader.
...
Unnecessary.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-26 12:07:28 +01:00
Philip Rebohle
682838b193
vkd3d: Enable bindless UAV.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-26 12:05:47 +01:00
Philip Rebohle
b6cfef09cb
vkd3d: Explicitly assign UAV counter set.
...
Otherwise, we pass an incorrect set index when using bindless UAVs.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-26 12:05:47 +01:00
Philip Rebohle
4ee06bc5d6
vkd3d: Ignore UAV counters for unbounded UAV ranges.
...
We cannot support that right now.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-26 12:05:47 +01:00
Philip Rebohle
3fa194ce21
vkd3d-shader: Support nonuniform qualifier for bindless UAVs.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-26 12:05:47 +01:00
Philip Rebohle
fb92b7c113
vkd3d-shader: Emit bindless UAV declarations.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-26 12:05:47 +01:00
Philip Rebohle
8dd73f3e45
vkd3d-shader: Explicitly pass flags to get_global_binding.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-26 12:05:47 +01:00
Philip Rebohle
a0c1ce4e55
vkd3d-shader: Explicitly pass image format to get_global_binding.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-26 12:05:47 +01:00
Philip Rebohle
18caa8adc3
vkd3d-shader: Pass resource binding struct to get_global_binding.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-26 12:05:47 +01:00
Philip Rebohle
81ee079449
vkd3d-shader: Move atomic counter declaration.
...
Allows us to have bindless UAVs without a special code path
for bindless UAV counters for now.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-26 12:05:47 +01:00
Philip Rebohle
31518debc2
vkd3d-shader: Always initialize modifer.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-25 19:31:33 +01:00
Hans-Kristian Arntzen
89cefd87d5
vkd3d: Add test for bindless UAV counters.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-03-25 14:42:32 +01:00
Hans-Kristian Arntzen
2d83388313
vkd3d: Add test for bindless UAV.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-03-25 14:42:32 +01:00
Hans-Kristian Arntzen
7c479f6dae
vkd3d: Disable index_buffer_strip_cut spam in normal runtime.
...
Demote this warning to TRACE only.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-03-25 12:54:44 +01:00
Hans-Kristian Arntzen
4939e38c14
vkd3d: Clamp RTV/DSV array sizes to their real array lengths.
...
Avoids overflowing vkCreateFramebuffer later with UINT_MAX layers.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-03-25 11:27:14 +01:00