Philip Rebohle
7185e9776d
vkd3d: Introduce vkd3d_queue_add_wait.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-15 12:52:00 +01:00
Philip Rebohle
724257c0d8
vkd3d: Add multi_queue config flag.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-15 12:52:00 +01:00
Philip Rebohle
859aa3fd5a
vkd3d: Use VK_SHARING_MODE_CONCURRENT if multi-queue is enabled.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-15 12:52:00 +01:00
Philip Rebohle
1e3c91579e
vkd3d: Create one vkd3d queue per Vulkan device queue.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-15 12:52:00 +01:00
Philip Rebohle
3cd93781ff
vkd3d: Create multiple queues per queue family if possible.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-15 12:52:00 +01:00
Philip Rebohle
6967b1e92b
vkd3d: Wait for queue idle before destroying vkd3d queue.
...
Fixes a potential issue where we may destroy objects that
are still in use by the GPU.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-15 12:52:00 +01:00
Philip Rebohle
b0309f6f90
vkd3d: Introduce d3d12_device_allocate_vkd3d_queue.
...
Replaces d3d12_device_get_vkd3d_queue when mapping D3D12
command queues to Vulkan device queues.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-15 12:52:00 +01:00
Philip Rebohle
7359686609
vkd3d: Introduce d3d12_device_get_vkd3d_queue_family.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-15 12:52:00 +01:00
Philip Rebohle
4c0a0b0467
vkd3d: Introduce vkd3d_queue_family_info.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-15 12:52:00 +01:00
Hans-Kristian Arntzen
b4f48bf2d6
meta: Update README with new VKD3D_CONFIG flags.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-13 06:26:27 +00:00
Hans-Kristian Arntzen
b44bfa7066
vkd3d: Remove obsolete comment.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-13 06:26:27 +00:00
Hans-Kristian Arntzen
43370c6426
vkd3d: Only enable DXR if requested.
...
The implemnentation is not complete enough to safely enable it, since
some games will try to create RTPSOs by default, leading to crashes.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-12 12:20:10 +01:00
Hans-Kristian Arntzen
58615cd5dc
vkd3d: Allow devices with recursion of 1 to be accepted.
...
We can fail RTPSOs later if they for whatever reason use recursion.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-12 12:20:10 +01:00
Hans-Kristian Arntzen
d9be9b57f2
vkd3d: Actually use RGBA16 formats for RT VBO.
...
It's really supposed to load 4 components and ignore. RGB16 is not
mandatory, so just use the "expected" formats after all.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-12 12:20:10 +01:00
Hans-Kristian Arntzen
2b6658da67
vkd3d: Enable RT tier 1.0 if possible.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-12 12:20:10 +01:00
Hans-Kristian Arntzen
3adc385167
dxil-spirv: Update submodule.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-12 12:20:10 +01:00
Hans-Kristian Arntzen
c5c45b851f
vkd3d-shader: Add missing stage conversion for RT.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-12 12:20:10 +01:00
Hans-Kristian Arntzen
4f2776ff93
vkd3d-shader: Dump RT export SPIR-V.
...
Need one unique blob per export.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-12 12:20:10 +01:00
Hans-Kristian Arntzen
3358fca922
vkd3d: Implement local root signature association.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-12 12:20:10 +01:00
Hans-Kristian Arntzen
028b87ab61
vkd3d: Fix some trivial bugs with local root signatures.
...
Did not properly allocate bindings.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-12 12:20:10 +01:00
Hans-Kristian Arntzen
4f40a5a6d2
tests: Tests multiple local root signatures.
...
Runtime behavior here is extremely weird and contradicts spec wording in
many ways:
- Default local root signatures can override explicit ones.
- Runtime silently fails if the associated subobject is not part of the
PSO array.
- Order of default local root signatures doesn't appear to matter at
all.
All in all, very confusing, and there is zero help from validation
layer, so we'll have to deduce this from whatever applications want.
Hopefully they are somewhat sane, and don't try to rely on very awkward
matching rules.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-11 13:57:55 +01:00
Philip Rebohle
85f15916c4
vkd3d: Optimize unmapping adjacent resource regions.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-11 13:57:45 +01:00
Philip Rebohle
2ef8106136
vkd3d: Optimize sparse binding for buffers and full subresources.
...
Compacts ranges and only issues one bind for buffer ranges and
full subresource updates, rather than one bind per tile.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-10 13:18:44 +01:00
Philip Rebohle
ead9f2d620
vkd3d: Store subresource index in d3d12_sparse_image_region.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-10 13:18:44 +01:00
Hans-Kristian Arntzen
ff78b2df1c
vkd3d: Dump DXIL when parsing entry points as well.
...
Parse can fail, and it's is useful to debug that.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-10 13:08:25 +01:00
Hans-Kristian Arntzen
73d55ec65a
dxil-spirv: Update submodule.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-10 13:08:25 +01:00
Hans-Kristian Arntzen
cd876284e0
vkd3d: Fix some const warnings on MSVC.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-10 10:48:01 +00:00
Hans-Kristian Arntzen
ce62d3d700
vkd3d: Fix MSVC build errors.
...
args... is a GNU extension.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-10 10:48:01 +00:00
Hans-Kristian Arntzen
369f48e499
tests: Add test for RTAS update.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-10 11:46:22 +01:00
Hans-Kristian Arntzen
0bf3a1d441
vkd3d-shader: Recognize recent descriptor range flag.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-10 11:46:05 +01:00
Hans-Kristian Arntzen
56e7cbec80
test: Test CBV table hoisting.
...
Adds some spicy edge cases with array size of 1 w/ nonuniform access, etc.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-10 11:46:05 +01:00
Hans-Kristian Arntzen
13d132f1c4
vkd3d: Add support for hoisting CBV descriptors to push descriptors.
...
Bindless CBV is *pretty* bad on NVIDIA, so add a code path which can
promote descriptor table CBVs into push descriptors.
We can safely do this with Root Signature 1.1 STATIC or
the somewhat obscure STATIC_KEEPING_BUFFER_BOUNDS_CHECKS.
With VOLATILE, which basically all titles are using,
we can still force this behavior through a config flag,
but this is an incorrect speed hack. It works in most
titles however, since bindless CBV is exceptionally rare.
We only hoist descriptors when the root signature range has 1 descriptor
anyway, so we should avoid any reasonable bindless scenario.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-10 11:46:05 +01:00
Hans-Kristian Arntzen
d758a6e296
vkd3d: Convert Root Signatures to 1.1.
...
We will be able make use of the use STATIC vs VOLATILE flags.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-10 11:46:05 +01:00
Hans-Kristian Arntzen
c409d0f30a
vkd3d: Optimize R32UI texel buffer creation.
...
There is no need to scan through the Vulkan format list,
especially since texel buffer creation happens in the hot path
in cases where we know we need to create R32UI texel buffer views.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-10 11:46:05 +01:00
Hans-Kristian Arntzen
3e876c2857
vkd3d: Log VKD3D_CONFIG with INFO.
...
Useful to make sure we actually passed it correctly ...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-10 11:46:05 +01:00
Hans-Kristian Arntzen
c351dfc8d3
vkd3d: Remove dead code from d3d12_command_list.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-05 15:49:28 +01:00
Joshua Ashton
ce9ae01c79
build: Warn about VLA usage
...
Using consts for array sizes is a C++-ism, and in GCC in C-mode it won't fold literal constants, and will instead prefer to make a VLA.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-03-04 15:50:28 +00:00
Hans-Kristian Arntzen
38bb845800
tests: Refactor raytracing test to be a bit more extensible.
...
Fixes a lot of the worst hardcoding, test different IBO / VBO formats.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-04 16:30:29 +01:00
Hans-Kristian Arntzen
f2c5a6561c
tests: Test RTAS clone and compact.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-04 16:30:29 +01:00
Hans-Kristian Arntzen
b34af6a7fa
vkd3d: Convert RT vertex format correctly.
...
Context sensitive formats, oh boy!
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-04 16:30:29 +01:00
Hans-Kristian Arntzen
686a3efc08
vkd3d: Verify VBO RTAS support when checking RT tier.
...
Format conventions for RT are ... special.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-04 16:30:29 +01:00
Hans-Kristian Arntzen
b5d433baaa
vkd3d: Implement RTAS clone and compact copy operations.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-04 16:30:29 +01:00
Philip Rebohle
39513d6503
vkd3d: Silence log spam around Min LOD Clamp.
...
This seriously hurts performance in AC:Valhalla.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-04 13:37:05 +01:00
Philip Rebohle
5e94183975
vkd3d-shader: Do not insert branch to loop header if outside of block.
...
Fixes invalid SPIR-V in case there is an unconditional break right
before the loop ends.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-04 13:36:31 +01:00
Philip Rebohle
ba8e306452
vkd3d-shader: Ignore break instructions if there is no active block.
...
This can happen if a continue statement is immediately followed
by a break instruction in a switch case.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-04 13:36:31 +01:00
Joshua Ashton
96888b0663
build: Use --file-alignment=4096 with MinGW
...
Avoids a copy in the Wine loader as well as enables debug symbols to work in perf.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-03-03 19:22:44 +01:00
Joshua Ashton
47606f4339
build: Rename vkd3d_msvc and vkd3d_clang
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-03-03 19:22:44 +01:00
Hans-Kristian Arntzen
031ad9e139
vkd3d: Track dynamic pipeline stack size
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-03 19:19:47 +01:00
Hans-Kristian Arntzen
600a296ca7
dxil-spirv: Update submodule.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-03 19:19:47 +01:00
Hans-Kristian Arntzen
9588ec082e
vkd3d: Fix warnings when AS is used without support.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-03 19:19:47 +01:00