diff options
author | Bastiaan Olij <mux213@gmail.com> | 2021-03-22 21:04:55 +1100 |
---|---|---|
committer | Bastiaan Olij <mux213@gmail.com> | 2021-03-26 12:06:57 +1100 |
commit | a6c989bc1ba3da2cd7fdf2f51c915b838af4a2aa (patch) | |
tree | a8c3f79436c86a72ae304598de2de679955f1dcd /drivers/vulkan/rendering_device_vulkan.cpp | |
parent | 5953f4d766dcd0f6ad25f223d7405bde096c18ba (diff) |
Obtain supported Vulkan API
Diffstat (limited to 'drivers/vulkan/rendering_device_vulkan.cpp')
-rw-r--r-- | drivers/vulkan/rendering_device_vulkan.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp index 469d80368d..6d5809feaf 100644 --- a/drivers/vulkan/rendering_device_vulkan.cpp +++ b/drivers/vulkan/rendering_device_vulkan.cpp @@ -7834,6 +7834,18 @@ void RenderingDeviceVulkan::_flush(bool p_current_frame) { } void RenderingDeviceVulkan::initialize(VulkanContext *p_context, bool p_local_device) { + // get our device capabilities + { + device_capabilities.version_major = p_context->get_vulkan_major(); + device_capabilities.version_minor = p_context->get_vulkan_minor(); + + // get info about subgroups + VulkanContext::SubgroupCapabilities subgroup_capabilities = p_context->get_subgroup_capabilities(); + device_capabilities.subgroup_size = subgroup_capabilities.size; + device_capabilities.subgroup_in_shaders = subgroup_capabilities.supported_stages_flags_rd(); + device_capabilities.subgroup_operations = subgroup_capabilities.supported_operations_flags_rd(); + } + context = p_context; device = p_context->get_device(); if (p_local_device) { @@ -8253,6 +8265,7 @@ RenderingDevice *RenderingDeviceVulkan::create_local_device() { } RenderingDeviceVulkan::RenderingDeviceVulkan() { + device_capabilities.device_family = DEVICE_VULKAN; } RenderingDeviceVulkan::~RenderingDeviceVulkan() { |