Commit Graph

275 Commits

Author SHA1 Message Date
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
Józef Kucia f3d297574a libs/vkd3d: Implement d3d12_device_CreateSampler(). 2017-07-12 13:10:44 +02:00
Józef Kucia 84889646f6 Update license to LGPL v2.1. 2017-06-16 22:11:21 +02:00
Henri Verbeet f252d6cd31 libs/vkd3d: Implement d3d12_device_CreateDepthStencilView(). 2016-11-10 16:42:24 +01:00
Józef Kucia 4aab207b56 libs/vkd3d: Fix initial state transtion for swapchain images. 2016-10-25 13:23:18 +02:00
Józef Kucia b9da47ebe2 libs/vkd3d: Implement naive initial state transition.
This is not a complete solution yet. In order to allow recording
multiple command list and executing them in any order we have to fix up
the current image layout when submitting a command list instead of when
a command list is being recorded.
2016-10-25 13:23:18 +02:00
Józef Kucia b011f0b972 libs/vkd3d: Introduce resource flags. 2016-10-25 13:23:18 +02:00
Józef Kucia eea8617b9b libs/vkd3d: GPU virtual address for texture resources is always 0. 2016-10-24 13:20:09 +02:00
Józef Kucia a5fbcb28f0 libs/vkd3d: Set initial image layout to VK_IMAGE_LAYOUT_UNDEFINED for CPU inaccessible images. 2016-10-24 13:20:09 +02:00
Józef Kucia e19e428ed0 libs/vkd3d: Check if device memory is CPU accessible in d3d12_resource_Map(). 2016-10-24 13:20:09 +02:00
Józef Kucia 3161f346b6 libs/vkd3d: Try to allocate coherent host visible memory for CUSTOM heap. 2016-10-24 13:20:09 +02:00
Józef Kucia 33ef8688ab libs/vkd3d: Initialize "resource->external" before possible call to d3d12_resource_destroy(). 2016-10-20 16:38:04 +02:00
Józef Kucia 384bb26ea5 libs/vkd3d: Naming conventions. 2016-10-20 16:38:04 +02:00
Józef Kucia 69cd100d48 libs/vkd3d: Validate initial resource state. 2016-10-19 13:10:12 +02:00
Józef Kucia f601cbc04a libs/vkd3d: Validate "optimized_clear_value" for buffer resources. 2016-10-19 13:10:12 +02:00
Henri Verbeet 2a49173b60 libs/vkd3d: Export a function to create a d3d12 resource from a Vulkan image. 2016-10-19 09:59:42 +02:00
Józef Kucia 5f187d9e68 libs/vkd3d: Improve diagnostic message for device memory allocation failures. 2016-10-17 14:24:22 +02:00
Józef Kucia 6b681a4037 libs/vkd3d: Return E_INVALIDARG in d3d12_resource_Map() for textures. 2016-10-17 14:24:22 +02:00
Józef Kucia e3fb82d544 libs/vkd3d: Forbid creating textures on UPLOAD/READBACK heaps. 2016-10-17 14:24:22 +02:00
Józef Kucia fc1c9d914d libs/vkd3d: Validate initial resource state for UPLOAD/READBACK heaps. 2016-10-17 14:24:22 +02:00
Józef Kucia a1082ec954 libs/vkd3d: Use "< 0" to test VkResult for errors.
For consistency.
2016-10-11 13:43:04 +02:00
Józef Kucia 59d466af2d libs/vkd3d: Use PRIx64 to print 64-bit integers. 2016-10-10 11:22:50 +02:00
Józef Kucia 99efb9abe3 libs/vkd3d: Get rid of vk_format_from_dxgi_format().
Use vkd3d_get_format() instead.
2016-10-08 14:31:57 +02:00
Henri Verbeet 1b8be72657 libs/vkd3d: Implement d3d12_device_CreateRenderTargetView(). 2016-09-30 13:34:17 +02:00
Henri Verbeet 3cc207c28e libs/vkd3d: Implement d3d12_descriptor_heap_GetCPUDescriptorHandleForHeapStart(). 2016-09-30 13:34:00 +02:00
Henri Verbeet 9262f87249 libs/vkd3d: Allocate CPU memory for descriptors. 2016-09-30 13:33:28 +02:00
Henri Verbeet 5f91e2ded9 libs/vkd3d: Implement d3d12_resource_GetGPUVirtualAddress(). 2016-09-28 15:05:13 +02:00
Józef Kucia 2976d7798d libs/vkd3d: Implement d3d12_resource_Unmap() for committed buffers. 2016-09-28 09:42:49 +02:00
Józef Kucia c078e79235 libs/vkd3d: Implement d3d12_resource_Map() for committed buffers. 2016-09-28 09:42:49 +02:00
Józef Kucia fc1492766e libs/vkd3d: Implement committed buffer resources. 2016-09-27 12:13:37 +02:00
Józef Kucia fec147c2cb libs/vkd3d: Implement committed texture resources. 2016-09-27 12:13:37 +02:00
Józef Kucia 13ccddd6e4 libs/vkd3d: Add ID3D12DescriptorHeap interface stub. 2016-09-26 11:22:33 +02:00
Józef Kucia 4175bec471 libs/vkd3d: Add ID3D12Resource interface stub. 2016-09-26 11:22:33 +02:00