Hans-Kristian Arntzen
b6e5760b6e
d3d12: Use CreateDXGIFactory1 instead of 2.
...
MinGW-w64 somehow does not export 32-bit symbols of DXGIFactory2.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-07 16:31:29 +01:00
Joshua Ashton
9625096577
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-07 01:42:34 +02: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
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
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
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
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
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
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
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
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
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
Joshua Ashton
ce7eba6210
vkd3d-shader: Fix incorrect type enum in global binding
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-26 15:42:41 +02:00
Joshua Ashton
0b6d460813
vkd3d-shader: Fix wrong enum for {CLIP,CULL}_DISTANCE
...
The wrong enum was used here... It was just returning the same thing
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-26 15:42:41 +02:00
Krzysztof Bogacki
c11d3eed17
vkd3d: Remove SPIRV-Tools-based debugging code
...
Signed-off-by: Krzysztof Bogacki <krzysztof.bogacki@leancode.pl>
2020-06-26 13:43:08 +02:00
Joshua Ashton
5f4c383c1a
vkd3d: Remove _spv suffix from prebuilt shaders
...
Matches what we build from glslang in Meson now.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-25 13:51:06 +02:00
Joshua Ashton
f3f0887c43
vkd3d: Compile glsl shaders at compile time
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-25 13:51:06 +02:00
Joshua Ashton
61dcb5d0dd
vkd3d: Move shader contents out of header
...
This way we can use a glsl generator on them in future in Meson.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-25 13:51:06 +02:00
Joshua Ashton
a46fb17973
vkd3d: Make enqueued_fence_count a uint32_t
...
Fixes atomic usage with it.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-24 21:13:35 +02:00
Joshua Ashton
45d4296a54
vkd3d: Rename vkd3d_uint32_atomic to vkd3d_atomic_uint32
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-24 21:13:35 +02:00
Joshua Ashton
033f76e3ae
vkd3d: Define our own memory orders
...
We shouldn't potentially override stuff in the std library and this allows us to map directly to __ATOMIC_* memory orders which is more correct.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-24 21:13:35 +02:00
Joshua Ashton
161dc007c5
build: Link dxil-spirv statically
...
Don't need to link this in any fancy way
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-24 15:18:56 +02:00
Joshua Ashton
22545c189a
vkd3d-shader: Build statically
...
We don't need this to be another random so floating around...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-24 15:18:56 +02:00
Joshua Ashton
4521b253dd
vkd3d: Toss VKD3D_DEBUG_ENV_NAME
...
Creates linking problems if we want to build vkd3d-shader statically given this links back to something in vkd3d-common.
We don't need this distinction anyways...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-24 15:18:56 +02:00
Hans-Kristian Arntzen
24be81fdfb
vkd3d/meta: Initialize flags variable.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-06-24 12:43:19 +02:00
Joshua Ashton
8c216e637c
build: Add Meson build system
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-23 14:55:43 +02:00
Joshua Ashton
da2c9a1043
vkd3d: Eliminate HAVE_SPIRV_UNIFIED1_SPIRV_H and HAVE_SPIRV_UNIFIED1_GLSL_STD_450_H
...
These are submodules now.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-23 14:55:43 +02:00
Joshua Ashton
bfd7127284
vkd3d-shader: Don't use return value semantics in void functions
...
Fixes warnings in MSVC.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-16 12:13:54 +02:00
Joshua Ashton
287ceb207d
vkd3d: Refactor platform-specific code
...
This commit moves the module handling code which was previously dumped in device.c and the code to retrieve the current executable path to its own file.
This also eliminates HAVE_DECL_PROGRAM_INVOCATION_NAME from config.h
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-16 11:07:50 +02:00
Joshua Ashton
f3ec53cb5d
vkd3d: Implement vkd3d_get_program_name for Win32
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-16 11:07:50 +02:00