Module: vkd3d Branch: master Commit: b8694fd8795606791df81b87eab1a52a74468170 URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/b8694fd8795606791df81b87eab1a5...
Author: Conor McCarthy cmccarthy@codeweavers.com Date: Mon Dec 4 15:59:16 2023 +1000
vkd3d: Co-locate all descriptor-related members.
To optimise cache coherence, because decriptor updates use the most performance-critical code paths.
---
libs/vkd3d/vkd3d_private.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 4c5c039a..bf32d04c 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -1760,6 +1760,19 @@ struct d3d12_device struct vkd3d_desc_object_cache view_desc_cache; struct vkd3d_desc_object_cache cbuffer_desc_cache;
+ VkDescriptorPoolSize vk_pool_sizes[VKD3D_DESCRIPTOR_POOL_COUNT]; + unsigned int vk_pool_count; + struct vkd3d_vk_descriptor_heap_layout vk_descriptor_heap_layouts[VKD3D_SET_INDEX_COUNT]; + bool use_vk_heaps; + + struct d3d12_descriptor_heap **heaps; + size_t heap_capacity; + size_t heap_count; + union vkd3d_thread_handle worker_thread; + struct vkd3d_mutex worker_mutex; + struct vkd3d_cond worker_cond; + bool worker_should_exit; + struct vkd3d_mutex pipeline_cache_mutex; struct vkd3d_render_pass_cache render_pass_cache; VkPipelineCache vk_pipeline_cache; @@ -1800,19 +1813,6 @@ struct d3d12_device const struct vkd3d_format_compatibility_list *format_compatibility_lists; struct vkd3d_null_resources null_resources; struct vkd3d_uav_clear_state uav_clear_state; - - VkDescriptorPoolSize vk_pool_sizes[VKD3D_DESCRIPTOR_POOL_COUNT]; - unsigned int vk_pool_count; - struct vkd3d_vk_descriptor_heap_layout vk_descriptor_heap_layouts[VKD3D_SET_INDEX_COUNT]; - bool use_vk_heaps; - - struct d3d12_descriptor_heap **heaps; - size_t heap_capacity; - size_t heap_count; - union vkd3d_thread_handle worker_thread; - struct vkd3d_mutex worker_mutex; - struct vkd3d_cond worker_cond; - bool worker_should_exit; };
HRESULT d3d12_device_create(struct vkd3d_instance *instance,