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
Philip Rebohle
82d9ba1ebf
vkd3d: Add meta shader to generate predicated draw/dispatch commands.
...
The idea is to use indirect draws and dispatches to implement
predication. For predicated indirect draws, we'll use indirect
count.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-27 12:43:39 +01:00
Joshua Ashton
e27a153a22
vkd3d-shader: Fix saturates of fp64 types
...
Closes : #419
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-27 11:11:59 +01:00
Hans-Kristian Arntzen
9cd082da69
dxil-spirv: Update submodule.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-25 20:22:37 +01:00
Joshua Ashton
22794c67a4
include: Add missing enum flag operator definitions
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-25 15:58:45 +01:00
Joshua Ashton
3e5a3c835a
include: Fix definition of D3D12_RESOURCE_ALIASING_BARRIER
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-25 15:58:45 +01:00
Joshua Ashton
6b9f7b7339
include: Fix typo in d3d12 header
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-25 15:58:45 +01:00
Joshua Ashton
fcb4764228
include: Update D3D12 headers
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-25 15:58:45 +01:00
Hans-Kristian Arntzen
1ce5ea8073
vkd3d: Fix segfault when freeing pipeline library.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-25 10:26:36 +01:00
Hans-Kristian Arntzen
8a102d6a1c
dxil-spirv: Update submodule.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-24 18:58:06 +01:00
Philip Rebohle
2c9bacd760
vkd3d: Perform binary occlusion query fixup on scratch buffer.
...
Potentially avoids some unnecessary host memory access. Use BDA for
the compute shader so that we can ignore alignment restrictions on
some GPU architectures.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-24 16:45:55 +01:00
Philip Rebohle
78076a9a84
vkd3d: Introduce d3d12_resource_get_va.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-24 16:45:55 +01:00
Philip Rebohle
afb85c79cd
vkd3d: Add code to create, destroy and recycle scratch buffers.
...
Command lists may need to allocate temporary device memory for
certain operations. In order to avoid frequent alloc/free calls,
we'll recycle these scratch buffers until a certain threshold.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-24 16:45:55 +01:00
Hans-Kristian Arntzen
c0b34fdb7b
tests: Add unaligned VBO read test.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-24 15:07:29 +01:00
Hans-Kristian Arntzen
19193bf932
vkd3d: Sanitize VBO strides and VBO offsets.
...
Realign VBO strides and offsets if we have to, for sake of
robustness. Violating these rules is against D3D12 spec, but it does not
cause crashes on native drivers. On RDNA we can hit hangs with unaligned
vertex attributes. It appears that native drivers apply some kind of
fixup here to avoid the crash, even if the result is not what we expect.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-24 15:07:29 +01:00
Hans-Kristian Arntzen
10b503c893
vkd3d: Fallback to NULL VA when binding non-existent VBO.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-24 15:07:29 +01:00
Philip Rebohle
9d57489225
vkd3d-shader: Correctly handle infinity in f32tof16.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-23 15:46:55 +01:00