Hans-Kristian Arntzen
5872257e31
README: Update to mention VKD3D_SHADER_OVERRIDE.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-09-08 15:03: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
6ba9656b12
tests: Add tests for GetCachedBlob and pipeline libraries.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-09-08 12:31:32 +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
3002d52ed4
include: Define D3D12 error codes as necessary.
...
These are technically supposed to be defined in winerror.h,
but current MinGW headers do not support these yet.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-09-08 12:31:32 +02:00
Philip Rebohle
c06e2bdc83
vkd3d: Introduce vkd3d_wcslen.
...
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
Hans-Kristian Arntzen
254868a326
vkd3d: Enable pthread workaround paths on MinGW as well.
...
winpthread is slow on Wine as it requires OS synchronization
objects, which involves wineserver.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-09-08 09:34:26 +02:00
Hans-Kristian Arntzen
7d8ab2fb06
vkd3d: Replace CS with SRW.
...
On Wine, this is more efficient as it can use futex paths.
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
c4bccbb8ee
dxil-spirv: Update submodule.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-09-04 16:44:31 +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
630b70cbbd
tests: Remove todos from test_write_buffer_immediate.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-08-28 17:27:05 +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
Philip Rebohle
d4bbd4b43e
vkd3d: Add sampler state object to d3d12_device.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-08-26 14:56:17 +02:00
Philip Rebohle
a09a0ed86d
vkd3d: Introduce vkd3d_sampler_state.
...
Manages unique static samplers for now, in order to reduce duplicates.
Can be extended to also manage descriptor pools for static samplers in
the future.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-08-26 14:56:17 +02:00
Hans-Kristian Arntzen
409af5de20
vkd3d-shader: Use per-thread allocators in DXIL.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-08-26 12:39:26 +02:00
Hans-Kristian Arntzen
528d2decad
dxil-spirv: Update submodule.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-08-26 12:39:26 +02:00
Hans-Kristian Arntzen
50eeb42137
dxil-spirv: Update submodule.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-08-25 11:51:34 +02:00
Hans-Kristian Arntzen
d416d65d40
vkd3d: Fallback allocate memory for OpenExistingHeapFrom*.
...
RenderDoc does not support external_memory_host yet, and these heaps are
generally only used for debugging, so we should be able to get away with
this in practice.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-08-25 11:48:41 +02:00
Hans-Kristian Arntzen
23968fc423
vkd3d: Fall back to visible/coherent for host imported memory.
...
On NVIDIA, we can only import as uncached, introduce a fallback for that
scenario.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-08-25 11:48:41 +02:00
Hans-Kristian Arntzen
b5e521fd6a
vkd3d: Validate resource sharing flag.
...
If heap is cross adapter, resource must also be cross adapter.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-08-25 11:48:41 +02:00
Hans-Kristian Arntzen
01a7ec6310
tests: Use fflush()
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-08-25 11:48:41 +02:00
Hans-Kristian Arntzen
6260d18716
vkd3d: Implement OpenExistingHeapFromFileMapping.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-08-25 11:48:41 +02:00
Hans-Kristian Arntzen
0c1b49d681
vkd3d: Implement OpenExistingHeapFromAddress.
...
Refactors out some common code in d3d12_heap_init.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-08-25 11:48:41 +02:00
Hans-Kristian Arntzen
6e2b153235
vkd3d: Add host import to allocate_buffer_memory.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-08-25 11:48:41 +02:00
Hans-Kristian Arntzen
aafc9aec96
vkd3d: Add helper to allocate imported host memory.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-08-25 11:48:41 +02:00
Hans-Kristian Arntzen
95b6596d75
vkd3d: Enable VK_EXT_external_memory_host.
...
Needed for OpenExistingHeapFromAddress and friends.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-08-25 11:48:41 +02:00
Hans-Kristian Arntzen
b2b730ea8b
tests: Add test for open heap from address/file.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-08-25 11:48:41 +02:00
Hans-Kristian Arntzen
e9aab2b8b8
dxil-spirv: Update submodule.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-08-21 11:58:21 +02:00