Commit Graph

2477 Commits

Author SHA1 Message Date
Joshua Ashton 1c82616717 vkd3d: Correctly handle output + fix NULL old targets for fullscreen
The output here is actually for secure presentation and restricting a swapchain to a certain output.

Correctly handle NULL (desktop) targets that we used to have.

Fixes crashes with titles that use fullscreen via an initial fullscreen desc.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-06 23:57:54 +01:00
Hans-Kristian Arntzen cb1da02af9 vkd3d: Fix some warnings.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-06 21:32:16 +02:00
Hans-Kristian Arntzen c3392dad97 vkd3d: Fix automake build.
Missing IDL header.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-06 21:32:16 +02:00
Hans-Kristian Arntzen a6d8ea4800 vkd3d: Update clone link in README.md.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-06 21:32:06 +02:00
Hans-Kristian Arntzen 1ea32a66ce vkd3d: Update README.md.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-06 20:32:00 +02:00
Joshua Ashton 5e5eee368c subprojects: Update dxil-spirv to fix Windows builds 2020-07-06 18:56:54 +01:00
Joshua Ashton 7204c8d76f d3d12: Add standalone d3d12 library
When building for Windows, specify `-Denable_standalone_d3d12=True` in Meson to enable.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-06 19:29:30 +02:00
Joshua Ashton aa3b7c3b26 vkd3d: Use newer ID3D12Device funcs for COM
Fixes warnings under MSVC and MinGW.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-06 19:29:30 +02:00
Joshua Ashton 9c105a78a9 vkd3d: Implement swapchain and swapchain factory
Needed for standalone D3D12.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-06 19:29:30 +02:00
Joshua Ashton cbebf9efed build: Add build_standalone_d3d12 option
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-06 19:29:30 +02:00
Joshua Ashton 3d52186d3a build: Move build options to top of build script
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-06 19:29:30 +02:00
Joshua Ashton cb4fcd5a98 include: Replace MinGW hack with Win32 platform header
Replace this hack with a more versatile one that works for multiple compilation objects.

Consolidates this hack across all the code bases (soon to be used in a D3D12 standalone patch)

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-06 19:29:30 +02:00
Joshua Ashton e24914b11f include: Pull in Win32 Vulkan exts when building for Win32
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-06 19:29:30 +02:00
Joshua Ashton dff27c9e9c vkd3d: Load INSTANCE_EXT procs into device table
We need these for the upcoming swapchain factory implementation
for standalone D3D12.

They're also probably good to have around in future for the
d3d12 device.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-06 19:29:30 +02:00
Joshua Ashton ba3dabe3bb vkd3d: Add debug_dxgi_format helper
DXGI_FORMAT -> string

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-06 19:29:30 +02:00
Hans-Kristian Arntzen d6b6da6206 Revert "vkd3d: Add support for serializing root signature version 1.1"
This reverts commit 0384362065.

It is not allowed to use RS 1.1 serialization for the non-versioned
entry point. RS 1.1 serialization must use the versioned entry point.

Reverting this fixes the relevant test case in d3d12.c:12522.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-06 17:41:03 +01:00
Joshua Ashton 10f7ec4ad8 build: Remove -Wno-incompatible-pointer-types
No longer needed with recent changes.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-03 16:56:10 +02:00
Joshua Ashton 19c910904b vkd3d-shader: Use uint32 for immediate constants
DWORD and uint32_t are different types on Windows.
Fixes warnings.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-03 16:56:10 +02:00
Joshua Ashton 77679e8b32 vkd3d-shader: Split read_dword into read_uint32
On Windows, DWORD is unsigned long, which means it's technically a different pointer type.

Let's keep type safety (as much as we can in C) and remove some warnings.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-03 16:56:10 +02:00
Joshua Ashton ec8d14593a build: Remove -Wno-discarded-qualifiers
We don't need this since the CONST_VTBL change.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-03 16:56:10 +02:00
Joshua Ashton 08544fb938 vkd3d: Use CONST_VTBL instead of const for vtable decls
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-03 16:56:10 +02:00
Joshua Ashton b05371432a build: Remove -Wno-missing-braces
Hold over from autotools that isn't needed.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-03 16:56:10 +02:00
Joshua Ashton 12e4014b54 vkd3d-shader: Fix incorrect assertion
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-03 16:56:10 +02:00
Hans-Kristian Arntzen 6e944dab6b vkd3d: Use ptrdiff in utf8 strdup.
max_elements is in number of elements, not bytes.
Fix regression from refactor.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-02 12:28:03 +02:00
Hans-Kristian Arntzen 49190da623 vkd3d: Fix pointer type mismatch.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-02 12:28:03 +02:00
Joshua Ashton ae5da7bda6 build: Add public include dirs to demos
Fixes building on Windows...

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-01 21:31:43 +02:00
Joshua Ashton f232ca1b87 build: Link tests against DXGI on Windows
Fixes compilation

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-01 21:31:43 +02:00
Joshua Ashton a16afe7c8f build: Fix checking for xcb when building on Windows
It goes unused anyway, just makes Meson fail.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-01 21:31:43 +02:00
Joshua Ashton 0384362065 vkd3d: Add support for serializing root signature version 1.1
Make this code more extensible too...

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-01 19:46:09 +02:00
Joshua Ashton 211b9c37b0 meta: Make README markdown and update for Meson
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-01 12:01:26 +02:00
Philip Rebohle ee949c0916 vkd3d: Avoid UAV counter address updates for non-UAV descriptors.
Saves a few CPU cycles. We expect things to explode anyway when
the app uses a non-UAV descriptor as a UAV in the shader.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-06-29 17:18:29 +02:00
Philip Rebohle d524b770bc vkd3d: Do not create view for NULL UAV descriptors if possible.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-06-29 17:18:29 +02:00
Philip Rebohle e50b707709 vkd3d: Do not create view for NULL SRV descriptors if possible.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-06-29 17:18:29 +02:00
Philip Rebohle e10b9a72e2 vkd3d: Handle views being null in non-bindless descriptor updates.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-06-29 17:18:29 +02:00
Philip Rebohle 3434c4ef6f vkd3d: Handle views being null in bindless descriptor updates.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-06-29 17:18:29 +02:00
Philip Rebohle c8e97a581d vkd3d: Use NULL descriptors for constant buffer views.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-06-29 17:18:29 +02:00
Philip Rebohle fbbcb30590 vkd3d: Use NULL descriptors for vertex buffers.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-06-29 17:18:29 +02:00
Philip Rebohle 87bf1e8937 vkd3d: Use NULL descriptors for undefined root descriptors.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-06-29 17:18:29 +02:00
Philip Rebohle d43f70bb1b vkd3d: Enable VK_EXT_robustness2 if available.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-06-29 17:18:29 +02:00
Joshua Ashton 9770eea1f3 build: Add .gitlab-ci
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-29 17:04:56 +02:00
Joshua Ashton 4140ea0d31 build: Add package-release helper
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-29 17:04:56 +02:00
Joshua Ashton bc7aebda33 build: Disable some extra warnings
Disabled -Wmissing-field-initializers and -Wunused-parameters

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-29 17:04:56 +02:00
Joshua Ashton 25b40c5df8 build: Only find demo dependencies if building demos
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-29 17:04:56 +02:00
Joshua Ashton 8af31b5105 vkd3d-shader: Fix potential buffer overrun for image_operands
This would happen if you both sampled with both a texel offset and were LOD masked.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-29 15:26:54 +02:00
Joshua Ashton d1b58f954e vkd3d-shader: Fix buffer overrun for bindless constant loads
Previously, last_index would be 4 by the time it got to the loop if we were bindless -- which corrupted the component_ids that were being written.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-29 15:26:54 +02:00
Joshua Ashton 02fca8d190 build: Enable warning level 2
Equivelant to -Wall -Wextra

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-27 15:23:09 +02:00
Joshua Ashton d70223e57d vkd3d: Cast down tile extents in offsets explicitly
Fixes a signedness comparison warning -- shouldn't be a problem as we aren't going to get images with 2m+ tiles.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-27 15:23:09 +02:00
Joshua Ashton ed6adc3fa2 vkd3d-common: Refactor string loop code
Also fix some bad signed comparison problems.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-27 15:23:09 +02:00
Joshua Ashton 079a012dab build: Use Meson subproject for dxil-spirv
Removes the CMake dependency and solves some trouble building.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-26 18:33:27 +02:00
Joshua Ashton 9564f57a69 vkd3d-shader: Fix incorrect use of static in ext arrays
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-26 15:42:41 +02:00