vk: Enable descriptor indexing extension if supported

This commit is contained in:
kd-11 2021-09-22 22:31:06 +03:00 committed by kd-11
parent 7b9fb7ad9c
commit 62979c7bd9
2 changed files with 13 additions and 0 deletions

View File

@ -56,6 +56,7 @@ namespace vk
stencil_export_support = device_extensions.is_supported(VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME); stencil_export_support = device_extensions.is_supported(VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME);
conditional_render_support = device_extensions.is_supported(VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME); conditional_render_support = device_extensions.is_supported(VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME);
descriptor_indexing_support = device_extensions.is_supported(VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME);
external_memory_host_support = device_extensions.is_supported(VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME); external_memory_host_support = device_extensions.is_supported(VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME);
sampler_mirror_clamped_support = device_extensions.is_supported(VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME); sampler_mirror_clamped_support = device_extensions.is_supported(VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME);
unrestricted_depth_range_support = device_extensions.is_supported(VK_EXT_DEPTH_RANGE_UNRESTRICTED_EXTENSION_NAME); unrestricted_depth_range_support = device_extensions.is_supported(VK_EXT_DEPTH_RANGE_UNRESTRICTED_EXTENSION_NAME);
@ -323,6 +324,11 @@ namespace vk
requested_extensions.push_back(VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME); requested_extensions.push_back(VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME);
} }
if (pgpu->descriptor_indexing_support)
{
requested_extensions.push_back(VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME);
}
enabled_features.robustBufferAccess = VK_TRUE; enabled_features.robustBufferAccess = VK_TRUE;
enabled_features.fullDrawIndexUint32 = VK_TRUE; enabled_features.fullDrawIndexUint32 = VK_TRUE;
enabled_features.independentBlend = VK_TRUE; enabled_features.independentBlend = VK_TRUE;
@ -659,6 +665,11 @@ namespace vk
return g_cfg.video.renderdoc_compatiblity && pgpu->debug_utils_support; return g_cfg.video.renderdoc_compatiblity && pgpu->debug_utils_support;
} }
bool render_device::get_descriptor_indexing_support() const
{
return pgpu->descriptor_indexing_support;
}
mem_allocator_base* render_device::get_allocator() const mem_allocator_base* render_device::get_allocator() const
{ {
return m_allocator.get(); return m_allocator.get();

View File

@ -59,6 +59,7 @@ namespace vk
bool surface_capabilities_2_support = false; bool surface_capabilities_2_support = false;
bool debug_utils_support = false; bool debug_utils_support = false;
bool sampler_mirror_clamped_support = false; bool sampler_mirror_clamped_support = false;
bool descriptor_indexing_support = false;
friend class render_device; friend class render_device;
private: private:
@ -141,6 +142,7 @@ namespace vk
bool get_external_memory_host_support() const; bool get_external_memory_host_support() const;
bool get_surface_capabilities_2_support() const; bool get_surface_capabilities_2_support() const;
bool get_debug_utils_support() const; bool get_debug_utils_support() const;
bool get_descriptor_indexing_support() const;
VkQueue get_present_queue() const; VkQueue get_present_queue() const;
VkQueue get_graphics_queue() const; VkQueue get_graphics_queue() const;