Hans-Kristian Arntzen
70af36a6e2
swapchain: Actually use matching mode when going fullscreen.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-05 19:53:05 +02:00
Hans-Kristian Arntzen
d02d95f606
swapchain: Workaround weird behavior with FindClosestMatchingMode.
...
Use a default format if there is no format specified.
Otherwise, the call fails on both Wine and DXVK DXGIs.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-05 19:53:05 +02:00
Hans-Kristian Arntzen
624e42f742
swapchain: Add thread safety.
...
IDXGISwapchain should be thread safe, doesn't cost much to add it.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-05 19:53:05 +02:00
Joshua Ashton
f5b2f45f13
vkd3d: Use already existing format for sparse multi-planar test
...
This was wrong anyway as it assumed depth always.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-05 10:50:28 +02:00
Joshua Ashton
eee64787c7
vkd3d: Keep track of vkd3d_format for resources
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-05 10:50:28 +02:00
Joshua Ashton
a991fddeeb
build: Use `-fvisibility=hidden` and define exports manually
...
When building natively on Windows we use dllexport/dllimport for vkd3d/vkd3d_utils public exports.
When building natively on Linux we simply make those visibility default.
Nothing changes for standalone here.
Closes #152
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-05 10:44:10 +02:00
Joshua Ashton
be2c0c1f1e
include: Remove DECLSPEC_HIDDEN from headers
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-05 10:44:10 +02:00
Joshua Ashton
e09f129064
vkd3d: Use enum for VKD3D_META_COPY_MODE
...
Just some extra type-safety.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-09-30 13:00:32 +02:00
Joshua Ashton
2d3df0838a
vkd3d: Use generated shaders
...
Now we don't have the autotools path, we can use what we make now.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-09-30 13:00:32 +02:00
Joshua Ashton
fa60742114
build: Remove autotools build path
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-09-30 13:00:32 +02:00
Joshua Ashton
3c54cf8ad6
vkd3d: Use VK_NULL_HANDLE instead of NULL for VkPipelineCache
...
Fixes a warning in MSVC.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-09-30 01:44:50 +02:00
Philip Rebohle
759e21d821
vkd3d: Remove d3d12_descriptor_heap_set_index_from_magic.
...
Unused, should have been in previous commit. Whoops.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-09-29 15:15:49 +02:00
Hans-Kristian Arntzen
9d36ab59d6
vkd3d: Add support for a shader debug ring.
...
Will allow replaced shaders to emit debug messages to a buffer.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-09-29 15:00:36 +02:00
Philip Rebohle
29fe4da015
vkd3d: Remove unused fields from d3d12_desc.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-09-29 14:48:26 +02:00
Philip Rebohle
0450ae9f85
vkd3d: Introduce VKD3D_DESCRIPTOR_FLAG_VIEW.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-09-29 14:48:26 +02:00
Philip Rebohle
eb0ada76e8
vkd3d: Remove unused code for descriptor updates.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-09-29 14:48:26 +02:00
Philip Rebohle
3682e4d9f7
vkd3d: Rework UAV descriptor updates.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-09-29 14:48:26 +02:00
Philip Rebohle
3177d80814
vkd3d: Rework SRV descriptor updates.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-09-29 14:48:26 +02:00
Philip Rebohle
c2439d67b8
vkd3d: Rework sampler descriptor updates.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-09-29 14:48:26 +02:00
Philip Rebohle
5c066940a0
vkd3d: Rework CBV descriptor updates.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-09-29 14:48:26 +02:00
Hans-Kristian Arntzen
250357c998
debug: Integrate automatic RenderDoc capturing.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-09-22 12:44:18 +02:00
Hans-Kristian Arntzen
1ce14c2ef3
vkd3d: Remove bindless CBV workaround.
...
Not relevant anymore, and should see good uplift on NV depending on
content.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-09-11 16:54:00 +02:00
Hans-Kristian Arntzen
e823715ac8
vkd3d: Clean up warnings.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-09-11 15:20:52 +02:00
Philip Rebohle
cea17b2440
vkd3d: Don't call vkGetPipelineCacheData on a null handle.
...
On systems without extended dynamic state, or for certain pipelines,
it is possible for vk_pso_cache to be VK_NULL_HANDLE, so we need to
check for this during serialization.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-09-08 18:11:41 +02:00
Hans-Kristian Arntzen
52ecd35dee
vkd3d: Set shader module name to the hash.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-09-08 15:03:41 +02:00
Hans-Kristian Arntzen
adde8947c6
vkd3d: Trace which pipelines are being bound and if they are replaced.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-09-08 15:03:41 +02:00
Hans-Kristian Arntzen
586f002536
vkd3d-shader: Add shader replacement.
...
For debugging purposes, it can be extremely useful to be able to
pinpoint and replace specific shaders for testing hypotheses.
To make this practical, change the shader dumping to use hashes rather
than monotonically incrementing indices.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-09-08 15:03:41 +02:00
Hans-Kristian Arntzen
f473370678
vkd3d-shader: Add hash function for shader blobs.
...
Simple FNV-1.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-09-08 15:03:41 +02:00
Hans-Kristian Arntzen
b93963b6ce
debug: Log thread ID as well.
...
For multi-threaded apps, this is vital to make any sense of the log.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-09-08 15:03:41 +02:00
Philip Rebohle
3a39f38fc5
vkd3d: Advertize support for relevant shader cache features.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-09-08 12:31:32 +02:00
Philip Rebohle
dcb03257f9
vkd3d: Implement pipeline library functionality based on VkPipelineCache.
...
This is used extensively by Horizon Zero Dawn, and allows us
to skip the compile screen after the initial first run.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-09-08 12:31:32 +02:00
Philip Rebohle
92b6e71ce4
vkd3d: Factor out pipeline state struct conversion.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-09-08 12:31:32 +02:00
Philip Rebohle
d4f4e34656
vkd3d: Remove pipeline cache from d3d12_device.
...
Unused now, instead we should implement D3D12 caching primitives
correctly and rely on the Vulkan driver otherwise.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-09-08 12:31:32 +02:00
Philip Rebohle
15ed944e40
vkd3d: Implement ID3D12PipelineState::GetCachedBlob.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-09-08 12:31:32 +02:00
Philip Rebohle
0396ee544c
vkd3d: Implement support for cached PSO pipeline state.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-09-08 12:31:32 +02:00
Philip Rebohle
2b885c4981
vkd3d: Move ID3D12PipelineLibrary imlpementation to separate file.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-09-08 12:31:32 +02:00
Hans-Kristian Arntzen
eb4ce56139
vkd3d: memset instance and device structs.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-09-08 09:34:26 +02:00
Robin Kertels
51d2a3bad2
vkd3d: Set VKD3D_DYNAMIC_STATE_VERTEX_BUFFER when binding a new pipeline
...
... if we have dirty vbo slots left.
Fixes textures when inspecting items in the inventory in RE2 and RE3.
Signed-off-by: Robin Kertels <robin.kertels@gmail.com>
2020-09-06 10:08:33 +02:00
Hans-Kristian Arntzen
ec441808c8
vkd3d: Emit host memory barrier as needed.
...
There is no resource state associated with this, so emit the barrier at
the end of a command buffer based on trivial tracking.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-09-02 14:46:12 +02:00
Hans-Kristian Arntzen
92b4f13f76
vkd3d: Zero out descriptor heaps on allocation.
...
Only bother if nullDescriptors are supported.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-08-31 17:22:17 +02:00
Philip Rebohle
2fd2cb1be2
vkd3d: Implement generic fallback for WriteBufferImmediate.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-08-28 17:27:05 +02:00
Philip Rebohle
c71e70335a
vkd3d: Implement WriteBufferImmediate with AMD_buffer_marker.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-08-28 17:27:05 +02:00
Philip Rebohle
6940716417
vkd3d: Enable VK_AMD_buffer_marker if available.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-08-28 17:27:05 +02:00
Hans-Kristian Arntzen
e3d2484a49
vkd3d: Rewrite timeline semaphore handling.
...
Need to handle large (> 4G) jumps in timeline value, which is not
supported by all implementations.
There is no good way to handle that, so rewrite and clean up timeline
semaphore handling by separating the timeline into a virtual timeline
(which can rewind and jump around arbitrarely) and a physical timeline
which increments by one each time.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-08-28 14:13:47 +02:00
Hans-Kristian Arntzen
2d22317f31
vkd3d: Never attempt to use PCI-pinned memory types.
...
These memory types might end up being used as fallback memory types,
which is problematic due to their tiny sizes, and unexpected performance
behavior. Generally, when we want to fallback, we should cleanly fall
back to system memory rather than a different device local type.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-08-27 12:45:58 +02:00
Hans-Kristian Arntzen
4ec05b99b4
vkd3d: Fix crash in validation layer when freeing static descriptor set.
...
vk_pool cannot be NULL.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-08-27 12:37:45 +02:00
Philip Rebohle
0d0917508b
vkd3d: Remove VKD3D_DESCRIPTOR_POOL_TYPE_IMMUTABLE_SAMPLER.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-08-26 14:56:17 +02:00
Philip Rebohle
17cf1f69d7
vkd3d: Use global descriptor sets for static samplers.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-08-26 14:56:17 +02:00
Philip Rebohle
a862d02c4c
vkd3d: Introduce global descriptor pools for static samplers.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-08-26 14:56:17 +02:00
Philip Rebohle
d4f13b755f
vkd3d: Use new global sampler state for static samplers.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-08-26 14:56:17 +02:00