Hans-Kristian Arntzen
0801b0d55f
vkd3d-shader: Hook up typed uav read without format on DXIL.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-21 14:34:37 +02:00
Hans-Kristian Arntzen
216f04d8f1
vkd3d-shader: Hook up new SSBO path for DXIL.
...
Update dxil-spirv submodule.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-21 14:34:37 +02:00
Hans-Kristian Arntzen
463d398c74
tests: Don't crash in buffer_feedback test.
...
With SSBOs enabled, sparse feedback won't work.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-21 14:34:37 +02:00
Hans-Kristian Arntzen
5b115b1f89
tests: Don't return garbage in create_*_state on failure.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-21 14:34:37 +02:00
Hans-Kristian Arntzen
50ffdb1850
vkd3d-shader: Don't warn about not finding a RAW_SSBO binding.
...
This is expected if host implementation does not support RAW_SSBO
alignment.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-21 14:34:37 +02:00
Joshua Ashton
1e828e4d1d
demos: Fix compiling demos on Linux
...
These failed to compile previously due to us removing INITIAL_STATE_TRANSITION and deprecating PRESENT_STATE_TRANSITION.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-21 14:27:16 +02:00
Joshua Ashton
aadf3e15f9
vkd3d-shader: Hook up EMIT_THEN_CUT_STREAM
...
Still needs work to handle emitting a specific stream.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-21 11:49:31 +02:00
Joshua Ashton
b70182420a
vkd3d-shader: Implement EMIT_THEN_CUT
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-21 11:49:31 +02:00
Joshua Ashton
31901597d9
vkd3d-shader: Implement EVAL_SNAPPED
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-21 11:49:31 +02:00
Joshua Ashton
1673d14841
vkd3d-shader: Implement UMUL
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-21 11:49:31 +02:00
Joshua Ashton
7c693fe26f
vkd3d-shader: Implement UMAD
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-21 11:49:31 +02:00
Philip Rebohle
a64a34eb9d
vkd3d-shader: Implement coherent qualifier for UAVs.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-20 14:44:55 +02:00
Joshua Ashton
36f6715b38
vkd3d-shader: Rename TEXKILL to DISCARD
...
TEXKILL is the old D3D9 style naming that comes with funky .w implications.
Calling DXBC's discard texkill is misleading.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-19 19:12:48 +02:00
Joshua Ashton
69bfad91a8
vkd3d-shader: Remove d3d9 clutter
...
All of this is entirely unused and just cluttering up.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-19 19:12:48 +02:00
Joshua Ashton
b65f6ad02c
vkd3d-shader: Add missing opcodes
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-19 17:27:07 +02:00
Philip Rebohle
f9c712ded0
vkd3d: Fix descriptor layout mismatch for ClearUAV.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-16 17:38:58 +02:00
Philip Rebohle
544a6184e9
vkd3d: Enable raw SSBOs for root descriptors on supported hardware.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-16 16:20:26 +02:00
Philip Rebohle
4841630876
vkd3d: Store descriptor type with root descriptors.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-16 16:20:26 +02:00
Hans-Kristian Arntzen
1c76072819
vkd3d: Use EXTENDED_USAGE_BIT on mutable format images.
...
If the image itself is sRGB or some other format that does not support
STORAGE, we need this flag.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-16 13:25:59 +01:00
Hans-Kristian Arntzen
5b44ffa831
swapchain: Fix warnings.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-16 13:25:59 +01:00
Hans-Kristian Arntzen
69f54ae049
swapchain: Handle maxImageExtent of 0.
...
This can happen on Windows when windows are minimized.
Might not happen in winevulkan, but Vulkan spec outlines this Win32 case
explicitly and it happens on native Windows.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-16 13:25:59 +01:00
Hans-Kristian Arntzen
65031753ae
swapchain: Blit to screen with render pass.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-16 13:25:59 +01:00
Hans-Kristian Arntzen
09b0675b53
swapchain: Handle VK_SUBOPTIMAL_KHR.
...
It is considered a "success", in that fences must be signalled, so make
sure we wait and reset it so we don't risk calling vkAcquireNextImageKHR
later with an already signalled fence.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-16 13:25:59 +01:00
Hans-Kristian Arntzen
9b25141bb8
swapchain: Only support user images.
...
Only way to implement a D3D12 swapchain.
For now, disable compute paths, we'll introduce it properly after refactor.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-16 13:25:59 +01:00
Hans-Kristian Arntzen
4f0bc383b7
swapchain: Make use of initial image transition.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-16 13:25:59 +01:00
Hans-Kristian Arntzen
d7e9713c4c
vkd3d: Add external API to perform initial transition.
...
Relevant for swapchain since a swapchain resource can be presented right
away without ever having been touched by an API call.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-16 13:25:59 +01:00
Hans-Kristian Arntzen
a8ef7384b4
vkd3d: Remove support for obsolete PRESENT_STATE_TRANSITION.
...
It is broken by design and won't be needed by a swapchain
implementation which uses user buffers.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-16 13:25:59 +01:00
Philip Rebohle
677e55c6f9
vkd3d: Store UAV counter address in d3d12_desc.
...
May improve performance since the UAV counter buffer is
stored in uncached memory.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-16 14:24:36 +02:00
Philip Rebohle
991d40006b
vkd3d: Fix maximum workgroup count for clearing buffer UAVs.
...
Buffer views do not necessarily cover the entire resource, so we
should not spawn more workgroups than necessary to clear the view.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-16 14:24:36 +02:00
Philip Rebohle
6401cc353e
vkd3d: Support raw buffer views in ClearUnorderedAccessView*.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-16 14:24:36 +02:00
Philip Rebohle
3e1445eacb
vkd3d: Add meta pipeline to clear raw storage buffers.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-16 14:24:36 +02:00
Philip Rebohle
290f44254a
vkd3d: Implement descriptor updates for SSBOs.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-16 14:24:36 +02:00
Philip Rebohle
993cdd254e
vkd3d: Emit resource declarations for raw SSBOs.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-16 14:24:36 +02:00
Philip Rebohle
3eac9f9c7d
vkd3d: Introduce vkd3d_bindless_set_flag.
...
This will allow us to use the same bindless descriptor set for
different types of descriptor ranges.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-16 14:24:36 +02:00
Philip Rebohle
c097c00167
vkd3d: Explicitly set descriptor types for bindless sets.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-16 14:24:36 +02:00
Philip Rebohle
d3abc66399
vkd3d: Do not store UAV counter info in vkd3d_view.
...
We won't necessarily have a view once we support raw SSBOs.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-16 14:24:36 +02:00
Philip Rebohle
07e6687f6a
vkd3d: Rework descriptor set lookup.
...
This is no longer performance-critical, so in order to simplify changing
the binding model, remove hard-coded descriptor set numbers and instead
look them up based on the requested descriptor properties.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-16 14:24:36 +02:00
Philip Rebohle
bffadd1f23
vkd3d: Rename vk_cbv_info -> buffer.
...
This will no longer be exclusive to constant buffer views.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-16 14:24:36 +02:00
Philip Rebohle
6461ab8272
vkd3d-shader: Implement bufinfo instruction on SSBOs.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-16 14:24:36 +02:00
Philip Rebohle
89dbd9254f
vkd3d-shader: Implement atomic operations on SSBOs.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-16 14:24:36 +02:00
Philip Rebohle
f12f15ff38
vkd3d-shader: Implement raw and structured stores to SSBOs.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-16 14:24:36 +02:00
Philip Rebohle
2d2dc323d5
vkd3d-shader: Implement raw and structured loads from SSBOs.
2020-10-16 14:24:36 +02:00
Philip Rebohle
367cda017f
vkd3d-shader: Implement resource declarations with raw SSBOs.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-16 14:24:36 +02:00
Philip Rebohle
b82bbe265e
vkd3d: Pass storage buffer alignment to shader compiler.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-16 14:24:36 +02:00
Hans-Kristian Arntzen
3a4e555e9c
vkd3d: Track if we have a valid index buffer bound.
...
Ignore any indexed draw calls which uses a NULL index buffer.
This is not fully correct, but there is no easy way to emulate D3D12
behavior exactly.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-16 12:27:20 +02:00
Hans-Kristian Arntzen
9a8d2a1ac5
tests: Add a test for rendering with NULL index buffer.
...
This is well-defined in D3D12 for some reason.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-16 12:27:20 +02:00
Hans-Kristian Arntzen
de3f572c8b
tests: Add test for bindless bufinfo/resinfo.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-16 11:43:35 +02:00
Hans-Kristian Arntzen
f1818c267f
vkd3d: Fix menu regression in RE2.
...
If rendering to A8 format, do not apply output swizzle in non-PS stages.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-14 10:46:46 +02:00
Hans-Kristian Arntzen
f0f1ca161f
vkd3d: Always pass down compiler args.
...
Needed for all stages since typed UAV read can happen in all stages.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-12 14:55:24 +02:00
Hans-Kristian Arntzen
202a3257d7
vkd3d: Make use of StorageImageReadWithoutFormat if supported.
...
Death Stranding makes use of typed load from RGB10A2.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-12 14:55:24 +02:00