Hans-Kristian Arntzen
dbbde3c6f1
vkd3d: Remove VKD3D_DESCRIPTOR_FLAG_DEFINED.
...
This is redundant now since this information is carried by set_info_mask.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-01-14 15:34:20 +01:00
Hans-Kristian Arntzen
1bddaa0fff
vkd3d: Allow a heap binding to cover multiple descriptors.
...
This begins the refactor toward letting us to use both texel buffer and
SSBO descriptors for typed buffers, which is a better workaround than
force_bindless_texel_buffers.
In this new approach, we store a mask in metadata instead of
set/binding.
When copying a descriptor, we will iterate over the masks and look up
binding directly from device->bindless_state.set_info[].
The mask is represented in terms of info index rather than set index to
avoid needless lookups. Add some new helpers to make this process
easier.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-01-14 15:34:20 +01:00
Philip Rebohle
f25df5b453
vkd3d: Reset inline queries in BeginQuery.
...
We currently never reset occlusion queries. For some reason,
validation layers do not report this.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-01-14 13:38:21 +01:00
Henri Verbeet
c42f4d11e2
vkd3d-shader: Decorate "precise" arithmetic instructions with SpvDecorationNoContraction.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
2021-01-12 15:22:11 +01:00
Philip Rebohle
29e3d292ae
tests: Mark sparse depth image test as TODO on RADV.
...
Currently, RADV does not support sparse depth images.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-01-11 14:46:07 +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
Hans-Kristian Arntzen
d003424bc8
meta: Bump Meson build version to 2.1.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-14 12:12:12 +01:00
Hans-Kristian Arntzen
793fce068e
meta: Slight modification to CHANGELOG.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-12 16:16:59 +01:00
Philip Rebohle
a3d21494f7
vkd3d: Enable query workaround for AC:Valhalla.
...
Fixes #458 .
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-12-12 13:01:52 +01:00
Philip Rebohle
b8c96d9b30
vkd3d: Add workaround to disable occlusion query optimization.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-12-12 13:01:52 +01:00
Hans-Kristian Arntzen
e99a2c9da7
dxil-spirv: Update submodule.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-12 12:19:10 +01:00
Hans-Kristian Arntzen
49ed5beb63
meta: Add Cyberpunk 2077 to supported list with (huge) caveats.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-11 11:22:45 +01:00
Hans-Kristian Arntzen
9cbd1b2a0d
vkd3d: Add Cyberpunk2077.exe to workaround detection.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-11 11:22:45 +01:00
Hans-Kristian Arntzen
c2f1596b3e
tests: Add test for reading typed R32 buffer as untyped.
...
Invokes undefined behavior that many games rely on by accident.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-11 11:20:55 +01:00
Philip Rebohle
946bcd7922
vkd3d: Do not store counter address in descriptor.
...
Unnecessary because the UAV counter buffer is a host memory
allocation anyway in case of host-only descriptor heaps, so
we will not read from uncached memory.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-12-10 18:14:16 +01:00
Hans-Kristian Arntzen
0cc374e0f8
meta: Add changelog for 2.1.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-09 14:56:24 +01:00
Hans-Kristian Arntzen
8797e15ddd
meta: Add 2.0 change log as a file.
...
Makes it possible to review change logs with Git going forward.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-09 14:56:24 +01:00
Hans-Kristian Arntzen
193abc395b
README: Document how to use VKD3D_DESCRIPTOR_QA_LOG.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-09 14:51:53 +01:00
Hans-Kristian Arntzen
22a907e11a
vkd3d: Add descriptor QA logging.
...
When reading GPU hang dumps, we can figure out what happened to
descriptor types along the way.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-09 14:51:53 +01:00
Philip Rebohle
1d9f28b25f
vkd3d: Add fast path for mutable descriptor copies.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-12-09 14:31:22 +01:00
Philip Rebohle
7d40d8a22e
vkd3d: Rework descriptor copies to copy ranges.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-12-09 14:31:22 +01:00
Hans-Kristian Arntzen
e2185df7de
tests: Remove is_bug for MSAA clear test.
...
Fixed on Mesa master now (FMASK bug).
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-07 20:56:48 +01:00
Hans-Kristian Arntzen
a888d81422
vkd3d: Fix embarassing enum bug.
...
Caused crash when using a driver that did not support
mutable_descriptor_type.
Was using the wrong enum bitfields ... Sigh, type safe enums would be nice.
Regression caused during refactor in review most likely.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-07 20:55:56 +01:00
Hans-Kristian Arntzen
051ba691be
vkd3d: Clarify comment about not using MEMORY_READ/WRITE.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-07 20:45:02 +01:00
Philip Rebohle
c057e881dc
vkd3d: Do not interrupt render pass for occlusion queries.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-12-07 15:18:12 +01:00
Hans-Kristian Arntzen
7711b9ba1a
README: Mention VK_VALVE_mutable_descriptor_type as a key extension.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-07 15:17:08 +01:00
Hans-Kristian Arntzen
aa21d2d03d
vkd3d: Add support for VK_VALVE_mutable_descriptor_type.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-07 15:17:08 +01:00
Hans-Kristian Arntzen
76a7eb7c57
vulkan-headers: Update submodule.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-07 15:17:08 +01:00
Hans-Kristian Arntzen
4fa24bb4ee
tests: Remove old is_bug for conditional rendering.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-07 14:10:51 +01:00
Hans-Kristian Arntzen
8fb88855e5
vkd3d: Hash buffers and views based on format, not vk_format.
...
The creation infos use the format, which potentially contains other
information as well.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-05 15:09:39 +01:00
Hans-Kristian Arntzen
6b363e53d2
vkd3d: Actually compare against hashmap entry and not against itself.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-05 15:09:39 +01:00
Hans-Kristian Arntzen
e6961afca6
vkd3d-shader: Emit typed format for UAVs which use atomics.
...
Mesa will assert if not, and the format must be known here.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-04 16:08:26 +01:00
Philip Rebohle
c4fbe47106
vkd3d: Do not interrupt render pass for timestamp queries.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-12-03 16:54:35 +01:00
Philip Rebohle
e13d69ad27
vkd3d: Batch query pool reset commands if possible.
...
By resetting query pools in advance, we can reduce the number of
stalls between draw calls in passes with occlusion queries, which
is currently causing serious performance issues in some games.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-12-03 16:21:43 +01:00
Philip Rebohle
648e41716b
vkd3d: Add additional command buffer to batch intialization commands.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-12-03 16:21:43 +01:00
Philip Rebohle
d0fc57413e
vkd3d: Merge adjacent query ranges on insertion.
...
Since we'll be inserting lots of single queries, we want to
avoid having to resize the range array since that is an O(n)
operation at worst.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-12-03 16:21:43 +01:00
Philip Rebohle
81e6449f67
vkd3d: Add code to track query ranges used within a command list.
...
Useful to batch vkCmdResetQueryPool calls.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-12-03 16:21:43 +01:00
Hans-Kristian Arntzen
ee4508ba97
vkd3d: Fix sign vs unsigned compare warning.
...
UINT16 promotes to int rather than UINT here.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-03 15:05:13 +01:00
Hans-Kristian Arntzen
f67f55827e
vkd3d: Parse patch version of PACKAGE_NAME as well.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-03 15:05:13 +01:00
Hans-Kristian Arntzen
adf0be5bf1
vkd3d: Lower contention when spinlocking writers.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-02 13:12:56 +01:00
Hans-Kristian Arntzen
b85a345d48
vkd3d: Fix const-ness warning on MSVC.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-02 13:12:56 +01:00
Hans-Kristian Arntzen
5f8659f4bb
vkd3d: Use reader-writer spinlock in view map.
...
The common case is that we find an entry, so taking a writer lock should
be the rare case. We need to optimize for the case where the application
hammers the view map with e.g. buffers.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-02 13:12:56 +01:00
Hans-Kristian Arntzen
b3024365d0
vkd3d: Add a reader-writer spinlock.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-02 13:12:56 +01:00
Hans-Kristian Arntzen
c2c674194d
vkd3d: Add Add/Sub/And atomic u32 intrinsics.
...
Will be used for reader-writer spinlocks.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-02 13:12:56 +01:00
Hans-Kristian Arntzen
f96e60b6ac
vkd3d: Make hashmap compatible with reader-writer locks.
...
Yield insertion when there is a match.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-02 13:12:56 +01:00
Hans-Kristian Arntzen
e0382cc451
vkd3d: Add extra typeless copy usage flags after clearing them.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-27 16:27:39 +01:00
Hans-Kristian Arntzen
f46756ed85
vkd3d: Report if RTV/DSV resource does not set render target usage.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-27 16:27:39 +01:00
Hans-Kristian Arntzen
c38fd9bfc3
vkd3d: Bind WHOLE_SIZE when using null SSBO descriptor.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-27 13:13:39 +01:00
Philip Rebohle
8c0958824a
tests: Remove todo from 64-bit predicate test.
...
This is supported properly now as long as the device supports
buffer_device_address.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-27 12:43:39 +01:00
Philip Rebohle
2ec68af1d5
vkd3d: Add fallback path for predication using indirect draws.
...
Official AMD drivers do not support VK_EXT_conditional_rendering,
so we'll use indirect draws instead to emulate the feature.
This also handles 64-bit predicates in combination with the
Vulkan extension, which was not possible previously.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-27 12:43:39 +01:00