Józef Kucia
fc31637040
libs/vkd3d: Allow library user to enable additional device extensions.
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-24 22:32:14 +01:00
Józef Kucia
4cd36fc553
libs/vkd3d: Implement d3d12_device_GetAdapterLuid().
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-23 21:42:08 +01:00
Józef Kucia
c9c6caae98
libs/vkd3d: Allow library user to enable additional instance extensions.
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-23 21:42:06 +01:00
Józef Kucia
ebca1d3396
libs/vkd3d: Validate signal_event_pfn.
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-19 18:49:58 +01:00
Józef Kucia
6a32ad8913
libs/vkd3d: Rename vkd3d_get_vk_instance() to vkd3d_instance_get_vk_instance().
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-19 18:49:56 +01:00
Józef Kucia
c64181345b
libs/vkd3d: Simplify vkd3d_restrict_format_support_for_feature_level().
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-19 18:49:53 +01:00
Józef Kucia
783a2c2cdf
libs/vkd3d: Use vkGetInstanceProcAddr() to load global Vulkan functions.
...
It's enough to load vkGetInstanceProcAddr() in a platform-specific way.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-18 16:22:01 +01:00
Józef Kucia
10b04414e8
libs/vkd3d: Load libvulkan dynamically.
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-18 16:21:51 +01:00
Józef Kucia
fcc6846559
libs/vkd3d: Allow library user to load libvulkan.
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-18 16:21:44 +01:00
Józef Kucia
8883502121
libs/vkd3d: Introduce function to get Vulkan instance from vkd3d instance.
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-18 16:21:32 +01:00
Józef Kucia
b0aa4ed434
libs/vkd3d: Add simple format support restrictions.
...
In the long term, we may need more complex format support filtering.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-18 16:21:29 +01:00
Józef Kucia
ae014a29c4
libs/vkd3d: Allow library user to select Vulkan physical device.
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-16 20:11:23 +01:00
Józef Kucia
a64dd8be5f
build: Add version name for symbols.
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-16 20:11:19 +01:00
Józef Kucia
55025f7bec
libs/vkd3d: Get rid of vkd3d_get_vk_queue().
...
Replaced by vkd3d_acquire_vk_queue().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-16 20:11:12 +01:00
Józef Kucia
9e8dc13ba3
libs/vkd3d-shader: Fix uninitialized error code in vkd3d_shader_parser_init().
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-16 20:11:08 +01:00
Henri Verbeet
2d8e2fbe86
libs/vkd3d-shader: Validate the DXBC version.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-15 17:51:44 +01:00
Józef Kucia
12ca2bbcf6
libs/vkd3d: Add thread-safe API for accessing Vulkan command queues.
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-15 17:51:39 +01:00
Józef Kucia
d18e986b27
libs/vkd3d: Make GPU VA allocator thread-safe.
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-15 17:51:35 +01:00
Józef Kucia
db2e1d402e
libs/vkd3d: Synchronize access to Vulkan queues.
...
Access to VkQueue must be externally synchronized.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-15 17:51:32 +01:00
Józef Kucia
41715a2f33
build: Use linker version scripts to control visibility.
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-15 17:51:25 +01:00
Józef Kucia
4605d1275c
libs/vkd3d: Validate WCHAR size.
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-12 19:27:06 +01:00
Józef Kucia
0f46ae3e55
libs/vkd3d: Add API for creating vkd3d instances.
...
Makes possible to share a Vulkan instance between multiple devices.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-12 19:27:01 +01:00
Józef Kucia
604056daf4
libs/vkd3d: Allow library user to create internal threads.
...
We want to create Win32 threads when running under Wine.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-12 19:26:58 +01:00
Józef Kucia
38f2d893b1
libs/vkd3d-shader: Translate dcl_input_primitive instructions.
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-11 22:31:52 +01:00
Józef Kucia
31ec7b9160
libs/vkd3d-shader: Translate dcl_output_topology instructions.
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-11 22:31:50 +01:00
Józef Kucia
fb67ccd159
libs/vkd3d-shader: Translate geometry shader emit instructions.
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-11 22:31:48 +01:00
Józef Kucia
374a23bdd8
libs/vkd3d-shader: Introduce separate stream for execution mode declarations.
...
Tessellation and geometry shaders generate a lot of execution mode
declarations.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-11 22:31:47 +01:00
Józef Kucia
4ad1f9683e
libs/vkd3d-shader: Translate dcl_maxout instructions.
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-11 22:31:45 +01:00
Józef Kucia
ee8eb9b4e4
libs/vkd3d: Validate miplevel count while creating resources.
...
vkd3d_log2i() is imported from wined3d.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-11 22:31:33 +01:00
Józef Kucia
5d85da0d84
libs/vkd3d: Release current command allocator in d3d12_command_list_Close().
...
d3d12_command_allocator_free_command_buffer() is not a very accurate name.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-09 20:37:12 +01:00
Józef Kucia
e061e9f3cb
libs/vkd3d: Add more formats.
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-09 20:37:10 +01:00
Józef Kucia
5123feb750
libs/vkd3d: Remove unused prototype for vkEnumerateInstanceLayerProperties().
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-09 20:37:08 +01:00
Józef Kucia
8e3302d532
libs/vkd3d: Fix crash when creating NULL CBVs.
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-09 20:37:04 +01:00
Józef Kucia
f0bc873e7a
libs/vkd3d-shader: Generate valid SPIR-V for unimplemented registers.
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-09 20:37:02 +01:00
Józef Kucia
219b537209
libs/vkd3d-shader: Handle unimplemented registers more gracefully.
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-09 20:36:59 +01:00
Józef Kucia
4ae6285c8e
libs/vkd3d-shader: Fix result type for OpImageSampleDref instructions.
...
Per the SPIR-V spec:
"Result Type must be a scalar of integer type or floating-point type."
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-15 16:27:27 +01:00
Józef Kucia
7ee3a02f92
libs/vkd3d-shader: Avoid theoretical crash in vkd3d_dxbc_compiler_emit_dot().
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-14 13:40:26 +01:00
Józef Kucia
006f36c2ac
libs/vkd3d-shader: Introduce vkd3d_dxbc_compiler_get_constant_uint_vector() helper.
...
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-14 13:40:20 +01:00
Józef Kucia
995e3a2359
libs/vkd3d-utils: Use proper name in libvkd3d-utils.pc.
2017-12-12 13:12:47 +01:00
Józef Kucia
879c9e43d1
libs/vkd3d: Do not export D3D12* functions.
...
Move them to libvkd3d-utils.
2017-12-12 13:12:47 +01:00
Józef Kucia
e0cb3776c1
libs/vkd3d-shader: Fix discard_z instruction.
2017-12-11 12:55:55 +01:00
Józef Kucia
4e121f8b5d
libs/vkd3d-shader: Implement SV_IsFrontFace.
2017-10-31 15:44:44 +01:00
Józef Kucia
79f80df1ee
libs/vkd3d-shader: Translate dcl_input_ps_sgv instructions.
2017-10-31 15:44:44 +01:00
Józef Kucia
7e5dd39f5f
libs/vkd3d: Prefer VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL.
...
Use VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL if depth/stencil
writes are disabled.
2017-10-30 14:04:53 +01:00
Józef Kucia
3340cafdc4
libs/vkd3d-shader: Avoid potential stack smashing.
2017-10-25 22:55:39 +02:00
Józef Kucia
f04389d90b
libs/vkd3d-shader: Use more sensible default descriptor binding assignment.
2017-10-25 14:34:44 +02:00
Józef Kucia
e959686f12
libs/vkd3d-shader: Make sure that OpVariables are first instructions in main function.
...
The SPIR-V spec says:
"All OpVariable instructions in a function must be in the first block
in the function. These instructions, together with any immediately
preceding OpLine instructions, must be the first instructions in that
block."
2017-10-25 09:58:14 +02:00
Józef Kucia
b65c42e6f9
libs/vkd3d-shader: Avoid OpVectorShuffle on scalars.
...
The SPIR-V spec states:
"Vector 1 and Vector 2 must both have vector types, with the same
Component Type as Result Type."
2017-10-24 21:26:48 +02:00
Józef Kucia
2b21fbf6b8
libs/vkd3d: Add VKD3D_SHADER_DUMP_PATH environment variable for dumping shaders.
...
A similar functionality was helpful numerous number of times when
developing libvkd3d-shader.
2017-10-24 15:22:01 +02:00
Józef Kucia
f2b37c732a
libs/vkd3d: Use if-else in d3d12_command_list_get_fb_extent().
2017-10-24 12:10:48 +02:00