Commit Graph

82 Commits

Author SHA1 Message Date
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 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 b211df683e libs/vkd3d: Implement copying between depth/stencil and color textures.
This could be implemented more efficiently, but ideally we would get
a Vulkan extension for copying between depth/stencil and color textures.
2017-10-20 18:27:17 +02:00
Józef Kucia a4bd0c1c90 libs/vkd3d: Allocate GPU virtual addresses in d3d12_committed_resource_init(). 2017-10-20 18:27:17 +02:00
Józef Kucia a63b81858c libs/vkd3d: Limit buffer usage flags based on heap type. 2017-10-20 18:27:17 +02:00
Józef Kucia 67aed755ab libs/vkd3d: Implement d3d12_command_list_ClearUnorderedAccessViewUint() for R32_UINT buffer views.
Ideally, we would store additional informations only in CPU descriptors.
2017-10-04 13:55:33 +02:00
Józef Kucia fecc94cebc libs/vkd3d: Add helpers for dereferencing descriptor handles. 2017-10-04 13:55:33 +02:00
Józef Kucia eb8eba02bd libs/vkd3d: Implement d3d12_command_list_SetComputeRootShaderResourceView(). 2017-09-19 17:29:20 +02:00
Józef Kucia 2ea8ffb554 libs/vkd3d: Avoid vkCmdCopyQueryPoolResults() for not issued queries.
The Vulkan spec states:

  * "If the query does not become available in a finite amount of time
    (e.g.  due to not issuing a query since the last reset), a
    VK_ERROR_DEVICE_LOST error may occur."

  * "If queries will never finish (e.g. due to being reset but not
    issued), then vkGetQueryPoolResults may not return in finite time."
2017-09-14 14:57:09 +02:00
Józef Kucia 495bd6fddc libs/vkd3d: Create Vulkan buffer views for UAV counter resources. 2017-09-07 17:15:53 +02:00
Józef Kucia 603a44fb46 libs/vkd3d: Implement d3d12_device_CopyDescriptors().
There is no easy way to duplicate or copy Vulkan views and samplers.
Therefore, we use reference counting for Vulkan views and samplers when
copying them between descriptor heaps.
2017-09-04 18:33:09 +02:00
Józef Kucia a780b7a11c libs/vkd3d: Implement reference counting for Vulkan views and samplers. 2017-09-04 18:33:09 +02:00
Józef Kucia df0e4bf9cd libs/vkd3d: Fix default SRVs for 2D array textures. 2017-09-01 11:27:58 +02:00
Józef Kucia 39a2c0e5f1 libs/vkd3d: Fix width and height for DSV descriptors. 2017-08-31 09:42:50 +02:00
Józef Kucia 7917b84ce9 libs/vkd3d: Fix width and height for RTV descriptors. 2017-08-31 09:42:50 +02:00
Józef Kucia 660ee7b090 libs/vkd3d: Do not use PlaneSlice as layer index. 2017-08-31 09:42:50 +02:00
Józef Kucia 904858f4a9 libs/vkd3d: Introduce d3d12_resource_is_texture() helper function.
Makes some code easier to read.
2017-08-30 18:31:52 +02:00
Józef Kucia 489abe870c libs/vkd3d: Implement d3d12_resource_GetHeapProperties(). 2017-08-30 17:57:23 +02:00
Henri Verbeet 3019a3e8f1 libs/vkd3d: Support both native and Win32 wchar_t. 2017-08-29 16:36:05 +02:00
Henri Verbeet 7e5af314f1 libs/vkd3d: Validation should happen in the d3d12/Vulkan validation layers.
Unless we have tests that say otherwise.
2017-08-28 20:37:17 +02:00
Henri Verbeet e228d776be libs/vkd3d: Fix the d3d12_query_heap_create() argument order. 2017-08-28 20:37:03 +02:00
Józef Kucia d107538df8 libs/vkd3d: Implement UAVs for 2D array textures. 2017-08-28 19:10:23 +02:00
Sven Hesse 988e1a96de libs/vkd3d: Implement EndQuery() for QUERY_TYPE_TIMESTAMP. 2017-08-25 15:16:05 +02:00
Sven Hesse 67587f81e4 libs/vkd3d: Remember the Query Heap creation properties. 2017-08-25 15:16:03 +02:00
Sven Hesse 3a966cf38e libs/vkd3d: Mark D3D12_QUERY_HEAP_TYPE_SO_STATISTICS with a FIXME() 2017-08-23 17:31:12 +02:00
Sven Hesse 79cbc900bc libs/vkd3d: Create Vulkan Query Pools for D3D12 Query Heaps. 2017-08-23 16:18:15 +02:00
Józef Kucia d443e0eb00 libs/vkd3d: Add support for buffer SRVs. 2017-08-22 12:39:56 +02:00
Józef Kucia 694c20b1da libs/vkd3d: Implement structured UAVs. 2017-08-21 16:30:33 +02:00
Józef Kucia 49a877df86 libs/vkd3d: Allow creating UAVs with no desc for textures. 2017-08-21 12:41:07 +02:00
Józef Kucia b3d2b36afb libs/vkd3d: Prohibit compressed formats for buffer views. 2017-08-18 17:08:56 +02:00
Józef Kucia 1d5b8b7d32 libs/vkd3d: Implement depth/stencil resource views. 2017-08-16 17:38:33 +02:00
Józef Kucia dc081f6f9e libs/vkd3d: Set VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT only for typeless formats. 2017-08-15 13:10:05 +02:00
Józef Kucia 0075c87a38 libs/vkd3d: Drop VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT.
We do not use input attachments.
2017-08-09 18:44:16 +02:00
Józef Kucia b0e47baebf libs/vkd3d: Implement d3d12_command_list_Set{Compute,Graphics}RootUnorderedAccessView(). 2017-08-09 18:44:16 +02:00
Józef Kucia 190115d3f8 libs/vkd3d: Implement creating 2D texture UAVs. 2017-08-08 17:09:35 +02:00
Józef Kucia 5825acc3a0 libs/vkd3d: Downgrade some FIXMEs() to WARNs().
These should be performance warnings at most.
2017-08-04 17:06:33 +02:00
Józef Kucia 074513dc4d libs/vkd3d: Add support for sampler descriptors in root descriptor tables. 2017-08-04 17:06:33 +02:00
Józef Kucia 0859b94833 libs/vkd3d: Implement d3d12_device_CreateConstantBufferView(). 2017-08-04 17:06:33 +02:00
Józef Kucia ef0f90c0c7 libs/vkd3d: Factor out vkd3d_create_buffer_view() function. 2017-08-02 15:30:15 +02:00
Józef Kucia de2024d235 libs/vkd3d: Do not try to create buffer views for block-compressed formats. 2017-08-02 15:30:15 +02:00
Sven Hesse 1decba1a99 libs/vkd3d: Add block size information to the texture format array. 2017-08-02 14:03:39 +02:00
Józef Kucia ab63423c80 libs/vkd3d: Factor out vkd3d_create_texture_view() function. 2017-08-01 16:56:44 +02:00
Henri Verbeet 605a02274e libs/vkd3d: Allocate GPU virtual addresses for resources.
Direct3D 12 resources, buffers in particular, are bound to the pipeline
by their GPU virtual address. In Vulkan, these addresses are not visible
to the application. We previously handled this by returning the VkBuffer
handle as virtual address, but this can't work when the application
binds anything other than the resource's base GPU VA. Instead, we
allocate ranges of GPU address space and associate resources with it.

This uses the (naive) approach of simply allocating subsequent ranges,
and never reclaiming them. Eventually we'll have to revisit that.
2017-07-27 16:28:46 +02:00
Henri Verbeet 1acd3d44b1 Implement d3d12_device_CreateQueryHeap(). 2017-07-27 16:28:29 +02:00
Józef Kucia a2e38b5672 libs/vkd3d: Set VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT only if width and height are equal. 2017-07-26 13:45:25 +02:00
Józef Kucia 5ac8dbfc64 libs/vkd3d: Implement d3d12_device_CreateUnorderedAccessView(). 2017-07-25 12:50:14 +02:00
Józef Kucia 593a13402d libs/vkd3d: Add support for static samplers.
We still do not implement any reasonable mapping between D3D registers
and Vulkan bindings.
2017-07-17 16:25:29 +02:00
Józef Kucia 733775fbad libs/vkd3d: Implement d3d12_descriptor_heap_GetGPUDescriptorHandleForHeapStart(). 2017-07-17 16:25:29 +02:00
Józef Kucia 1c79831873 libs/vkd3d: Implement d3d12_device_CreateShaderResourceView(). 2017-07-14 13:44:35 +02:00
Józef Kucia 8bb54c17f3 libs/vkd3d: Simplify d3d12_resource_destroy(). 2017-07-14 13:44:35 +02:00