Commit Graph

139 Commits

Author SHA1 Message Date
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 8cb004bdc4 libs/vkd3d: Create single default sampler per device. 2017-09-21 15:12:13 +02:00
Józef Kucia eb8eba02bd libs/vkd3d: Implement d3d12_command_list_SetComputeRootShaderResourceView(). 2017-09-19 17:29:20 +02:00
Józef Kucia 90cf804d9b libs/vkd3d: Use Vulkan pipeline cache for graphics pipelines. 2017-09-19 10:58:04 +02:00
Józef Kucia acfd64c20e libs/vkd3d: Avoid copying descriptors for dirty root descriptor tables. 2017-09-18 15:40:42 +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 8e802ed0af libs/vkd3d: Update descriptor table ranges only with matching descriptor types. 2017-09-11 22:35:16 +02:00
Józef Kucia 32966338df libs/vkd3d: Get rid of UAV counter count from d3d12_pipeline_state. 2017-09-08 15:30:48 +02:00
Józef Kucia 9afaed918d libs/vkd3d: Bind descriptor set for UAV counters. 2017-09-08 15:04:30 +02:00
Józef Kucia 19dc6c412e libs/vkd3d: Constify root signature pointers. 2017-09-08 15:04:30 +02:00
Józef Kucia 0d28036d2a libs/vkd3d: Add UAV counter support for compute pipelines.
UAV counter descriptors are stored in a separate VkDescriptorSet.
A VkPipelineLayout created for compute pipeline is compatible for all
other descriptor sets with the VkPipelineLayout created for the root
signature. This ensures that only UAV counter bindings in the last
descriptor set may be disturbed when switching between pipelines with
compatible root signatures.

The implementation of vkd3d_popcount() is based on
https://graphics.stanford.edu/~seander/bithacks.html
2017-09-08 15:04:30 +02:00
Józef Kucia efdf2ec691 libs/vkd3d-shader: Rename vkd3d_shader_push_constant to vkd3d_shader_push_constant_buffer.
This should be clearer. Multiple constant buffers can be assigned to
a single push constant range.
2017-09-07 17:15:54 +02:00
Józef Kucia bd0c886281 libs/vkd3d: Store push constant ranges in root signatures.
In prep for UAV counters support.
2017-09-07 17:15:54 +02:00
Józef Kucia 22b019137b libs/vkd3d: Factor out vkd3d_create_descriptor_set_layout() function. 2017-09-07 17:15:53 +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 23150f6050 libs/vkd3d: Update Vulkan descriptor sets just before draw call. 2017-09-05 11:53:55 +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 62bd4e6e63 libs/vkd3d: Add support for OffsetInDescriptorsFromTableStart. 2017-08-31 11:21:34 +02:00
Józef Kucia d8847aa462 libs/vkd3d: Fix texture region copying for miplevels other than 0. 2017-08-31 09:42:50 +02:00
Józef Kucia 0dca9909d9 libs/vkd3d: Copy single layer for array textures in d3d12_command_list_CopyTextureRegion(). 2017-08-31 09:42:50 +02:00
Józef Kucia f3862db04d libs/vkd3d: Use VK_PIPELINE_BIND_POINT_RANGE_SIZE. 2017-08-31 09:29:02 +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
Henri Verbeet f1aa742569 libs/vkd3d: Support D3D12_FEATURE_D3D12_OPTIONS in d3d12_device_CheckFeatureSupport(). 2017-08-30 18:11:38 +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
Sven Hesse 5b6bd40464 libs/vkd3d: Cache the number of valid bits in queue timestamp queries. 2017-08-29 15:16:41 +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
Henri Verbeet b000952e4f libs/vkd3d: Implement indirect draws. 2017-08-28 19:26:31 +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 79cbc900bc libs/vkd3d: Create Vulkan Query Pools for D3D12 Query Heaps. 2017-08-23 16:18:15 +02:00
Józef Kucia 92bb7969a5 libs/vkd3d: Create push descriptor set only if needed. 2017-08-18 17:08:56 +02:00
Józef Kucia 08284f0f85 libs/vkd3d: Fix draw calls with no framebuffer attachments. 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 f5515c46df libs/vkd3d: Create default sampler for each root signature.
We need a sampler for SpvOpImageFetch aka texelFetch().
2017-08-16 13:11:52 +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 32e69fa945 libs/vkd3d: Use KHR_push_descriptor for root descriptors.
Thanks to KHR_push_descriptor, we do not have to allocate descriptor
sets for subsequent root descriptor parameters updates.
2017-08-11 13:58:04 +02:00
Józef Kucia 4a767a8f11 libs/vkd3d: Enable VK_KHR_get_physical_device_properties2 instance extension.
Required for VK_KHR_push_descriptor. Validation layers complain when
required extensions are not enabled.
2017-08-11 13:58:04 +02:00
Józef Kucia 9b54e0df17 libs/vkd3d: Add VK_KHR_push_descriptor extension. 2017-08-11 13:58:04 +02:00
Józef Kucia 1261c7ea0f libs/vkd3d: Do not update bound descriptor sets. 2017-08-11 13:58:04 +02:00
Józef Kucia 6ae3f1ee29 libs/vkd3d: Introduce vkd3d_pipeline_bindings structure. 2017-08-11 13:58:04 +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 074513dc4d libs/vkd3d: Add support for sampler descriptors in root descriptor tables. 2017-08-04 17:06:33 +02:00
Józef Kucia fa0a2eab21 libs/vkd3d: Store Vulkan bindings for descriptor table root parameters in root signature. 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 573460550e libs/vkd3d: Do not assume CBV root parameter index is equal to Vulkan descriptor binding. 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