Commit Graph

831 Commits

Author SHA1 Message Date
Józef Kucia cf23d71d5d vkd3d: Avoid copying root descriptors.
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-10-11 18:37:31 +02:00
Józef Kucia 604fd99637 vkd3d: Prepare descriptors once for all descriptor tables.
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-10-11 18:37:29 +02:00
Józef Kucia 3b0d20c474 vkd3d: Simplify d3d12_command_list_set_root_descriptor().
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-10-11 18:37:27 +02:00
Józef Kucia 7652a6e62c vkd3d: Simplify d3d12_command_list_set_root_cbv().
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-10-11 18:37:25 +02:00
Józef Kucia 07d115b1d4 vkd3d: Fix race condition while dumping DXBC shaders.
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-10-08 22:25:04 +02:00
Józef Kucia c296cbe30b vkd3d: Implement D3D12_FEATURE_SHADER_MODEL.
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-10-08 22:25:04 +02:00
Józef Kucia fa6304ee04 vkd3d: Ignore D3D_PRIMITIVE_TOPOLOGY_UNDEFINED.
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-10-08 22:25:04 +02:00
Józef Kucia 39886b2386 vkd3d: Downgrade FIXME() in d3d12_command_list_IASetIndexBuffer().
An app calls IASetIndexBuffer() with DXGI_FORMAT_UNKNOWN.

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-10-08 22:25:04 +02:00
Józef Kucia 1f4e6dc603 vkd3d-shader: Implement SV_SampleIndex.
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-10-08 22:25:04 +02:00
Józef Kucia 4068243279 vkd3d-shader: Bump SPIR-V generator version.
In preparation for the next release.

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-10-02 19:36:32 -07:00
Józef Kucia f7bb28dc2b vkd3d: Do not enable shaderTessellationAndGeometryPointSize feature.
We don't want to write PointSize in tessellation and geometry shaders.

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-10-01 18:36:43 -07:00
Józef Kucia 0463588591 vkd3d: Allocate memory for resource if heap memory cannot be used.
Anvil has additional restrictions for index and vertex buffers.

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-10-01 18:36:34 -07:00
Józef Kucia f1c967ab38 vkd3d: Fix potential memory leak in vkd3d_create_vk_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-09-28 20:57:34 +02:00
Józef Kucia 6f73364634 vkd3d: Add requirements for maxPerStageDescriptorUniformBuffers.
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-09-28 20:33:07 +02:00
Józef Kucia 03b9f4ff5a vkd3d: Implement d3d12_command_list_OMSetBlendFactor().
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-09-28 20:33:03 +02:00
Józef Kucia fe3ad21949 vkd3d: Fix 2D array depth stencil views.
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-09-28 20:33:00 +02:00
Józef Kucia d11b9618e0 vkd3d-shader: Use TRACE() for skipped DXBC chunks.
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-09-28 20:32:58 +02:00
Józef Kucia a4cd1b255f vkd3d-shader: Translate gather4_po_c 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-09-28 01:12:44 +02:00
Józef Kucia b66d4ed521 vkd3d-shader: Translate retc 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-09-28 01:12:43 +02:00
Józef Kucia 99939f626b vkd3d-shader: Use vkd3d_dxbc_compiler_emit_conditional_branch() in more places.
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-09-28 01:12:41 +02:00
Józef Kucia 2e65b78102 vkd3d: Fix shader stage bits for pipeline barriers.
The Vulkan spec says:

"Any pipeline stage included in srcStageMask or dstStageMask must be
supported by the capabilities of the queue family..."

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-09-28 01:12:39 +02:00
Józef Kucia 82fdd800e2 vkd3d: Pass VkQueueFamilyProperties to vkd3d_queue_create().
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-09-28 01:12:37 +02:00
Józef Kucia 873a26a061 vkd3d: Simplify error handling in vkd3d_create_vk_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-09-28 01:12:35 +02:00
Józef Kucia b7ed0df1f4 vkd3d: Add WARN() for "out of device memory" errors.
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-09-26 19:27:29 +02:00
Józef Kucia 413c8562b9 vkd3d: Use heap memory for placed resources.
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-09-26 19:27:22 +02:00
Józef Kucia bd0ce54f79 vkd3d: Allocate device memory for heaps.
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-09-26 19:26:33 +02:00
Józef Kucia 0014c4fbf9 vkd3d: Implement d3d12_device_GetResourceAllocationInfo() for textures.
In Vulkan, we have to create an image to get its memory requirements.
It would be very helpful if we could get the memory requirements without
creating a resource.

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-09-26 19:26:24 +02:00
Józef Kucia ded908c515 vkd3d: Pass D3D12_RESOURCE_DESC and VkImage to vkd3d_create_image().
For consistency with vkd3d_create_buffer().

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-09-26 19:26:21 +02:00
Józef Kucia 99e239ad50 vkd3d: Implement d3d12_device_GetResourceAllocationInfo() for buffers.
In Direct3D12, D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT is always used
for buffers. We could try to use a lower alignment when supported by
the Vulkan implementation, but there is no way to get buffer memory
requirements without creating a buffer in Vulkan.

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-09-26 19:26:18 +02:00
Józef Kucia e93fed2c93 vkd3d: Add support for fake placed resources.
Placed resources are not allocated from a given heap yet.

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-09-26 19:26:15 +02:00
Józef Kucia 5319cc2420 vkd3d-shader: Translate gather4_po 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-09-24 19:20:35 +02:00
Józef Kucia a553eb1afe vkd3d-shader: Translate gather4_c 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-09-24 19:20:31 +02:00
Józef Kucia 01ef2ceced vkd3d-shader: Find innermost loops for breakc 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-09-24 19:20:26 +02:00
Józef Kucia 9781b15531 vkd3d-shader: Translate continuec 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-09-24 19:20:16 +02:00
Józef Kucia 79339d153a vkd3d-shader: Translate continue 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-09-24 19:20:12 +02:00
Józef Kucia a970f71581 vkd3d-shader: Translate ineg 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-09-24 19:20:10 +02:00
Józef Kucia 62628dd90d vkd3d-shader: Promote immediate scalar constants to vectors.
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-09-24 19:20:07 +02:00
Józef Kucia be4a775c07 vkd3d: Do not hardcode aspect mask in d3d12_command_list_ClearUnorderedAccessViewUint().
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-09-14 19:17:50 +02:00
Józef Kucia b9d7569b8c vkd3d: Partially implement clears for texture UAVs.
In the long term, we may want to use shaders to clear UAVs.

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-09-13 19:26:23 +02:00
Józef Kucia 0e8fc6e957 vkd3d: Fix leaks if d3d12_device_init_pipeline_cache() fails.
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-09-13 19:26:22 +02:00
Józef Kucia ae5471b978 vkd3d-shader: Implement texel offset for sample 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-09-13 19:26:18 +02:00
Józef Kucia 0b278a7773 vkd3d-shader: Implement texel offsets for ld 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-09-13 19:26:17 +02:00
Józef Kucia 6296758849 vkd3d-shader: Add support for more interpolation modifiers.
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-09-13 19:26:15 +02:00
Józef Kucia 11c00a157c vkd3d: Implement simple pipeline cache.
Ideally, we would like to introduce a Vulkan extension to make vertex
buffer strides and primitive topology dynamic in Vulkan.

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-09-12 23:16:21 +02:00
Józef Kucia e7eb9ca936 vkd3d: Simplify d3d12_device_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-09-12 23:16:19 +02:00
Józef Kucia f3e48a9192 vkd3d: Reset command list state in d3d12_command_list_Reset().
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-09-12 23:16:16 +02:00
Józef Kucia 9fe06825f8 vkd3d: Fix initial pipeline state.
d3d12_command_list_begin_command_buffer() was using the previous initial
pipeline state when called from d3d12_command_list_Reset().

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-09-12 23:16:14 +02:00
Józef Kucia 605cb12eca vkd3d: Set pointer to NULL if heap creation fails.
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-09-12 23:16:12 +02:00
Józef Kucia 150d1f0eb8 vkd3d: Set pointer to NULL if committed resource creation fails.
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-09-12 23:16:08 +02:00
Józef Kucia cb24709980 vkd3d: Factor out d3d12_command_list_create_graphics_pipeline().
In preparation for pipeline cache.

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-09-12 23:16:04 +02:00