Commit Graph

2757 Commits

Author SHA1 Message Date
Hans-Kristian Arntzen e9681095e4 dxil-spirv: Update submodule.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-27 17:18:18 +02:00
Hans-Kristian Arntzen 8800ae7323 vkd3d-shader: Add declspec hidden to shader dumping entry points.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-27 11:14:49 +02:00
Hans-Kristian Arntzen 7083b30fd5 vkd3d-shader: Dump DXIL blobs to .dxil.
Makes it easier to extract all DXIL shaders when debugging.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-27 11:14:49 +02:00
Hans-Kristian Arntzen 376a05e722 dxil-spirv: Update submodule.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-24 16:54:37 +02:00
Philip Rebohle fa3085400d vkd3d: Handle pRegion == NULL in DiscardSubresource.
Fixes a crash in Shadow of the Tomb Raider.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-07-23 16:23:31 +02:00
Philip Rebohle 54f23f18b9 meson: Drop d3d12_invalid_usage target.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-07-23 15:48:12 +02:00
telans 8b6b3f6942 meson: install headers, pkgconfig files 2020-07-22 12:00:06 +02:00
Hans-Kristian Arntzen 4611c9a96f vkd3d: Fix warnings in calibrated timestamp implementation.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-22 10:52:03 +02:00
Philip Rebohle 1a015e134b programs: Fix building vkd3d-compiler.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-07-20 18:49:17 +01:00
Philip Rebohle abb8d32642 vkd3d: Add DXGI_FORMAT_R9G9B9E5_SHAREDEXP.
Needed by Battlefield 1.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-07-20 19:42:44 +02:00
Hans-Kristian Arntzen d2d71bffd1 README: Update notes about profiling.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-20 16:39:15 +02:00
Hans-Kristian Arntzen fbfbab7f31 programs: Add a simple Python tool to inspect profiling blocks.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-20 16:39:15 +02:00
Hans-Kristian Arntzen 7df9a48528 vkd3d: Add some other interesting profiling regions.
Useful to measure submission times, as well as time spent acquiring the
Vulkan queues. This correlates 1:1 with swapchain as well, so it's
useful when we want to get some "X / frame" metrics.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-20 16:39:15 +02:00
Hans-Kristian Arntzen 99b0421c32 meson: Add build option to enable a profiled build.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-20 16:39:15 +02:00
Hans-Kristian Arntzen 6a60834379 vkd3d: Make profiled vtable for ID3D12GraphicsCommandList4.
Similar to ID3D12Device profiled vtable, disgusting, but it should do
the trick.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-20 16:39:15 +02:00
Hans-Kristian Arntzen 37e4ce7ce7 vkd3d: Make a profiled vtable for ID3D12Device.
There are two advantages of doing it like this:
- When profiling is not enabled, we get no overhead for device calls.
- Avoids cluttering up the main implementation.

Disadvantage is that rolling inherited vtables like this is quite
disgusting, but this is C, what you gonna do ...

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-20 16:39:15 +02:00
Hans-Kristian Arntzen 9a1943d57b vkd3d: Init profiling when we create an instance.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-20 16:39:15 +02:00
Hans-Kristian Arntzen e3c1b66aed common: Add a simple profiling module.
Works by mapping a memory block on disk, and then we simply increment
u64s. The caller code only needs to use VKD3D_REGION_{DECL,BEGIN,END}
macros.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-20 16:39:15 +02:00
Joshua Ashton b38a18dbd8 vkd3d: Move copy descriptors implementation into a new func
Calling this from CopyDescriptorsSimple on its own is a bad idea given its __stdcall and GCC doesn't like optimizing that.

Also marked it as inline given it can easily be optimized greatly contextually for CopyDescriptorsSimple

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-17 14:02:18 +02:00
Philip Rebohle 79ee5ccf60 tests: Add test for GetClockCalibration.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-07-17 11:49:38 +02:00
Philip Rebohle 62990c3514 tests: Introduce vkd3d_sleep.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-07-17 11:49:38 +02:00
Philip Rebohle 2729c4ad41 vkd3d: Implement GetClockCalibration.
Manually uses QPC if the Vulkan implementation does not support
the QPC domain by itself.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-07-17 11:49:38 +02:00
Philip Rebohle 1af4c6c719 vkd3d: Enable VK_EXT_calibrated_timestamps if available.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-07-17 11:49:38 +02:00
Philip Rebohle e7d8f1c020 tests: Add test for DiscardResource.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-07-16 16:53:17 +02:00
Philip Rebohle c3d5a60e01 vkd3d: Implement DiscardResource.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-07-16 16:53:17 +02:00
Philip Rebohle ef2eacefee vkd3d: Rework d3d12_command_list_find_attachment.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-07-16 16:53:17 +02:00
Philip Rebohle 37e7fbd5c5 vkd3d: Rework d3d12_get_view_rect.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-07-16 16:53:17 +02:00
Philip Rebohle b212b3fb9c vkd3d: Introduce d3d12_resource_get_vk_subresource.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-07-16 16:53:17 +02:00
Philip Rebohle def7cf409a vkd3d: Introduce discard mask for deferred clear operations.
Allows us to skip clears while still initializing the image.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-07-16 16:53:17 +02:00
Joshua Ashton 583253b0c4 meta: Update readme for cross building
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-16 14:08:11 +02:00
Joshua Ashton cbf75e4fcf build: Add cross-build support to package-release.sh
This also makes that the default behaviour, which is what we want for end users.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-16 14:08:11 +02:00
Hans-Kristian Arntzen 96402f1164 vkd3d: Fix straggling warnings for MSVC.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-16 13:00:09 +02:00
Hans-Kristian Arntzen 812634b68b meson: Disable the more useless warnings in MSVC.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-16 13:00:09 +02:00
Thomas Crider 4e9b341d45 vkd3d-utils: vkd3d-utils needs pthread libraries, otherwise it causes compilation of vkd3d-common to fail
Details:

libtool: link: gcc -shared  -fPIC -DPIC  libs/vkd3d-utils/.libs/vkd3d_utils_main.o  -Wl,--whole-archive ./.libs/libvkd3d-common.a -Wl,--no-whole-archive  -Wl,-rpath -Wl,/home/vagrant/build-Proton-5.12-GE-1/obj-vkd3d32/.libs -Wl,-rpath -Wl,/home/vagrant/build-Proton-5.12-GE-1/obj-tools32/lib -L/home/vagrant/build-Proton-5.12-GE-1/obj-tools32/lib ./.libs/libvkd3d.so -lm  -Wl,--no-undefined -g -O2 -march=nocona -mtune=core-avx2 -mfpmath=sse -Wl,--version-script=/home/vagrant/proton/vkd3d/libs/vkd3d-utils/vkd3d_utils.map   -Wl,-soname -Wl,libvkd3d-utils.so.1 -o .libs/libvkd3d-utils.so.1.0.1

./.libs/libvkd3d-common.a(debug.o): In function `vkd3d_dbg_get_level':
debug.c:(.text+0x16b): undefined reference to `pthread_once'
./.libs/libvkd3d-common.a(debug.o): In function `vkd3d_dbg_printf':
debug.c:(.text+0x1d6): undefined reference to `pthread_once'

Signed-off-by: Thomas Crider <gloriouseggroll@gmail.com>
2020-07-15 23:22:17 +02:00
Hans-Kristian Arntzen debb93f38a dxil-spirv: Update submodule.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-15 00:25:38 +02:00
Andrew Eikum 88e6c9b2dd build: Drop minimum meson version
Debian 10 ships 0.49.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
2020-07-15 00:21:52 +02:00
Hans-Kristian Arntzen dd6656fbe9 vkd3d: Avoid redundant pipeline binds.
When we're using extended dynamic state, we will often end up with dummy
pipeline binds, which we should try to avoid if we can.
Also avoids having to rebind dynamic state redundantly.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen 84d9e4b0db vkd3d: Emit vertex buffer sizes even when not using dynamic stride.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen 0f91099dd4 vkd3d: Refactor dynamic state to be per-pipeline.
Cleans up dynamic state such that we do not have to keep dynamic state
create infos around.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen 69fdd87aa0 vkd3d: Add more debug logging when we fall back.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen d8ba75e160 vkd3d: Use strip type by default when using primitive restart.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen 0e9a1555c1 vkd3d: Add dynamic state information to vkd3d_pipeline_key.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen e9dcdc1308 vkd3d: Move vkd3d_pipeline_key to private header.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen 5968d28e75 vkd3d: Refactor out dynamic stride checks to its own function.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen 10d6823e34 vkd3d: Do not attempt to create a pipeline with invalid DS format.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen 2e57b3d27e vkd3d: Do not attempt to create pipelines with unknown topology type.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen 6967576904 vkd3d: Statically deduce patch vertex count for HS.
Fall back when there is a mismatch, which can happen if application does
not declare inputs to hull shader (unlikely).

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen 7b0345a149 vkd3d-shader: Add way to scan for expected patch vertex count from HS.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen 084a3e6928 vkd3d: Validate minimum vertex buffer stride when using dynamic stride.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen c8bbed15d7 vkd3d: Implement 32-bit bitmask iteration.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00