Georg Lehmann
24100cac07
vkd3d: Add Win32 PTHREAD_MUTEX_INITIALIZER.
...
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2020-11-18 18:29:48 +00:00
Hans-Kristian Arntzen
d0328e8760
vkd3d: Fix uninitialized variable in initial WSI transition.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-18 16:40:17 +01:00
Hans-Kristian Arntzen
9617a0f598
vkd3d: Disable RAW_VA root CBVs on NVIDIA.
...
BDA cannot map to their hardware, and we observe a large performance
loss in games which use root CBVs. For this reason, fall back to push
descriptors here.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-18 15:49:31 +01:00
Hans-Kristian Arntzen
52ee2edc3d
vkd3d: Separate root VA use for CBV and SRV/UAV.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-18 15:49:31 +01:00
Philip Rebohle
5a288b7d0f
tests: Adjust todos in some query tests.
...
Query init changes broke unissued timestamp queries, but
test_resolve_query_data_in_reordered_command_list passes.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-18 15:45:28 +01:00
Philip Rebohle
215989f6d5
vkd3d: Rework query pool initialization.
...
Ensures that queries are always available and initialized
in the correct order on the GPU timeline.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-18 15:45:28 +01:00
Philip Rebohle
bb9d0f2741
vkd3d: Rework initial transitions to allow for different types.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-18 15:45:28 +01:00
Philip Rebohle
10e82fa7a0
tests: Add missing UAV barriers in test_cs_uav_store.
...
Fixes some random test failures.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-18 15:05:29 +01:00
Hans-Kristian Arntzen
27f91b99b0
vkd3d-shader: Add debug log callback to DXIL.
...
Allows us to capture dxil compiler messages in log.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-18 14:37:58 +01:00
Joshua Ashton
a950191008
vkd3d: Implement singleton devices.
...
Matches D3D12 behaviour.
Co-authored-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-18 12:39:14 +01:00
Philip Rebohle
1563b80852
include: Fix various issues with atomic CAS.
...
- fail/success memory orders exist for a reason, we can't
e.g. do release on fail since it's a read-only operation
- silence some warnings about pointer->integer casts
- fix linker errors on mingw by marking functions as static
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-18 12:39:14 +01:00
Hans-Kristian Arntzen
f54ac3b9c5
vkd3d: Add app detection for buggy game: ds.exe.
...
Game renders the map with wrong descriptor type, which means we must
implement everything as texel buffers to make this work.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-18 12:27:19 +01:00
Hans-Kristian Arntzen
6f8ae20015
vkd3d: Add VKD3D_CONFIG option to disable bindless SSBO.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-18 12:27:19 +01:00
Hans-Kristian Arntzen
d947c17fc2
meta: Add missing VKD3D_DEBUG level to README.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-18 12:27:19 +01:00
Philip Rebohle
bab9b0af92
vkd3d: Support offset buffers for raw/structured texel buffers.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Co-authored-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-18 12:27:19 +01:00
Hans-Kristian Arntzen
3e15a3f06a
vkd3d: Remove manual tracking of host barriers.
...
Just emit host barrier on submit unconditionally.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-17 16:34:03 +01:00
Hans-Kristian Arntzen
0f25b827e0
vkd3d: Use pipeline barrier command buffers for queue serialization.
...
We have observed a lot of large GPU bubbles when using back-to-back
timeline semaphores to synchronize GPU submissions. Use prebaked
pipeline barrier command buffers instead.
To resolve queue sparse serialization, use two binary semaphore pairs to
resolve this. There is no need to use timeline semaphores in this case.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-17 16:34:03 +01:00
Philip Rebohle
8fe83f5e9c
vkd3d-shader: Correctly handle bit shifts greater than 31 bits.
...
This is undefined behaviour in SPIR-V, but well-defined in
DXBC, so we should explicitly 'and' the shift amount with 31.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-17 15:26:36 +01:00
Hans-Kristian Arntzen
0749f46d8e
vkd3d: Re-enable wave ops.
...
dxil-spirv update fixed the issue for me.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-17 10:49:40 +01:00
Hans-Kristian Arntzen
de4293f990
vkd3d: Use SHADER_READ for CBV visibility when using ROOT_VA CBV.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-16 17:01:58 +01:00
Hans-Kristian Arntzen
30c417bdbf
dxil-spirv: Update submodule.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-16 16:55:55 +01:00
Joshua Ashton
4d95cafe10
vkd3d: Implement compare exchange atomics
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-16 09:33:26 +01:00
Joshua Ashton
1e810e8f9e
vkd3d: Use consistent comment style in atomic header
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-16 09:33:26 +01:00
Joshua Ashton
093f0eb053
vkd3d: Implement 64-bit and pointer atomics
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-16 09:33:26 +01:00
Joshua Ashton
71328b9be7
vkd3d: Handle reserved resources in host barrier code
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-16 09:25:50 +01:00
Joshua Ashton
08135f7746
vkd3d: Fix validation spam for null descriptor buffers
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-16 09:25:17 +01:00
Hans-Kristian Arntzen
412ec7ac2f
vkd3d: Enable root descriptor BDA support.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-13 17:10:48 +01:00
Hans-Kristian Arntzen
a1d851e717
vkd3d-shader: Do not require Int64 to use root descriptors.
...
Can just use uvec2. Also improves performance on ACO since ACO cannot
promote uint64_t to SGPR yet, u32x2 however, works fine and can be
bitcast to pointer as well.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-13 17:10:48 +01:00
Hans-Kristian Arntzen
009b3a69e0
vkd3d-shader: Update dxil-spirv with BDA root descriptor support.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-13 17:10:48 +01:00
Hans-Kristian Arntzen
74a654e273
vkd3d: Disable waveops for time being.
...
The fix which enabled waveops detection broke HZD, since we never tested
with that feature enabled.
Keep it disabled until we can figure out what is going on.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-13 12:58:22 +01:00
Philip Rebohle
3da44beb5d
vkd3d: Change USE_PUSH_DESCRIPTORS to USE_ROOT_DESCRIPTOR_SET for clarity.
...
USE_PUSH_DESCRIPTORS may be misleading since it would be set even when
we're not using push descriptors at all due to root descriptors being
passed in via VAs. Instead, make the flag represent whether or not we
use a regular descriptor set for root parameters.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-12 15:21:56 +01:00
Philip Rebohle
baf265c666
vkd3d: Update root descriptor VAs as necessary.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-12 15:21:56 +01:00
Philip Rebohle
8999093c54
vkd3d: Add new field to store root descriptor VA.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-12 15:21:56 +01:00
Philip Rebohle
677422993e
vkd3d: Add root descriptor VAs to push constant range.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-12 15:21:56 +01:00
Philip Rebohle
cd01371756
vkd3d: Always enable BUFFER_DEVICE_ADDRESS usage for buffers.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-12 15:21:56 +01:00
Philip Rebohle
c11b58418a
vkd3d-shader: Support physical storage buffer root SRVs/UAVs.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-12 15:21:56 +01:00
Philip Rebohle
4313eaa59c
vkd3d-shader: Support physical storage buffer root CBVs.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-12 15:21:56 +01:00
Philip Rebohle
5d2b0e6632
vkd3d-shader: Add loadv/storev helpers for aligned memory access.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-12 15:21:56 +01:00
Philip Rebohle
6c9d0cea69
vkd3d-shader: Rename descriptor_table_var_id -> root_parameter_var_id.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-12 15:21:56 +01:00
Philip Rebohle
4b3cec53fc
vkd3d-shader: Declare push constants for root descriptor VAs.
...
We'll always place them at the beginning of the push constant
buffer in order to avoid potential alignment issues.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-12 15:21:56 +01:00
Philip Rebohle
2689c9e0a3
vkd3d-shader: Enable Int64 capability as necessary.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-12 15:21:56 +01:00
Philip Rebohle
f69564c6c1
vkd3d-shader: Implement buffer reference type declarations.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-12 15:21:56 +01:00
Philip Rebohle
b536723f5a
vkd3d: Fix shader model-related feature detection.
...
We need to know the supported shader model to detect support
for certain features like wave ops correctly.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-11 10:41:11 +01:00
Joshua Ashton
d4d14dfca0
vkd3d: Ignore DXGI_PRESENT_ALLOW_TEARING
...
Fixes warning spam in Horizon Zero Dawn.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-09 15:34:08 +01:00
Joshua Ashton
536ed0427a
vkd3d: Create user buffers for degenerate surfaces
...
Previously this would make the user buffer count == 0, which obviously makes apps and assertions not happy.
Fixes a crash in Horizon Zero Dawn when minimized (therefore having a degenerate surface region)
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-09 15:34:08 +01:00
Joshua Ashton
c77428ba44
vkd3d: Implement DXGI_PRESENT_TEST
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-09 15:34:08 +01:00
Alexander Gabello
da4a96a25b
vkd3d: Free string after PIX decoding
...
Signed-off-by: Alexander Gabello <alexandergabello@mail.weber.edu>
2020-11-09 10:55:05 +01:00
Hans-Kristian Arntzen
60ac9b4d51
Mark version 2.0.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-06 17:13:19 +01:00
Philip Rebohle
432ba00e3c
vkd3d: Only care about DSV mismatch if pipeline actually uses it.
...
Avoids some unnecessary late compiles in Monster Hunter World.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-06 16:36:27 +01:00
Philip Rebohle
58548a3db2
vkd3d: Fix image memory barrier after fragment shader-based copy.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-06 16:07:47 +01:00