summaryrefslogtreecommitdiff
path: root/drivers/vulkan
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/vulkan')
-rw-r--r--drivers/vulkan/rendering_device_vulkan.cpp5
-rw-r--r--drivers/vulkan/rendering_device_vulkan.h5
-rw-r--r--drivers/vulkan/vulkan_context.cpp5
-rw-r--r--drivers/vulkan/vulkan_context.h43
4 files changed, 35 insertions, 23 deletions
diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp
index 59b4c34c3f..5102eab979 100644
--- a/drivers/vulkan/rendering_device_vulkan.cpp
+++ b/drivers/vulkan/rendering_device_vulkan.cpp
@@ -8649,6 +8649,7 @@ void RenderingDeviceVulkan::draw_command_end_label() {
String RenderingDeviceVulkan::get_device_vendor_name() const {
return context->get_device_vendor_name();
}
+
String RenderingDeviceVulkan::get_device_name() const {
return context->get_device_name();
}
@@ -8657,6 +8658,10 @@ RenderingDevice::DeviceType RenderingDeviceVulkan::get_device_type() const {
return context->get_device_type();
}
+String RenderingDeviceVulkan::get_device_api_version() const {
+ return context->get_device_api_version();
+}
+
String RenderingDeviceVulkan::get_device_pipeline_cache_uuid() const {
return context->get_device_pipeline_cache_uuid();
}
diff --git a/drivers/vulkan/rendering_device_vulkan.h b/drivers/vulkan/rendering_device_vulkan.h
index 7d9bd19309..236742c15d 100644
--- a/drivers/vulkan/rendering_device_vulkan.h
+++ b/drivers/vulkan/rendering_device_vulkan.h
@@ -886,8 +886,8 @@ class RenderingDeviceVulkan : public RenderingDevice {
DrawList *draw_list = nullptr; // One for regular draw lists, multiple for split.
uint32_t draw_list_subpass_count = 0;
uint32_t draw_list_count = 0;
- VkRenderPass draw_list_render_pass;
- VkFramebuffer draw_list_vkframebuffer;
+ VkRenderPass draw_list_render_pass = VK_NULL_HANDLE;
+ VkFramebuffer draw_list_vkframebuffer = VK_NULL_HANDLE;
#ifdef DEBUG_ENABLED
FramebufferFormatID draw_list_framebuffer_format = INVALID_ID;
#endif
@@ -1229,6 +1229,7 @@ public:
virtual String get_device_vendor_name() const;
virtual String get_device_name() const;
virtual RenderingDevice::DeviceType get_device_type() const;
+ virtual String get_device_api_version() const;
virtual String get_device_pipeline_cache_uuid() const;
virtual uint64_t get_driver_resource(DriverResource p_resource, RID p_rid = RID(), uint64_t p_index = 0);
diff --git a/drivers/vulkan/vulkan_context.cpp b/drivers/vulkan/vulkan_context.cpp
index a09a757842..7944057041 100644
--- a/drivers/vulkan/vulkan_context.cpp
+++ b/drivers/vulkan/vulkan_context.cpp
@@ -2364,6 +2364,7 @@ void VulkanContext::set_object_name(VkObjectType p_object_type, uint64_t p_objec
String VulkanContext::get_device_vendor_name() const {
return device_vendor;
}
+
String VulkanContext::get_device_name() const {
return device_name;
}
@@ -2372,6 +2373,10 @@ RenderingDevice::DeviceType VulkanContext::get_device_type() const {
return RenderingDevice::DeviceType(device_type);
}
+String VulkanContext::get_device_api_version() const {
+ return vformat("%d.%d.%d", vulkan_major, vulkan_minor, vulkan_patch);
+}
+
String VulkanContext::get_device_pipeline_cache_uuid() const {
return pipeline_cache_id;
}
diff --git a/drivers/vulkan/vulkan_context.h b/drivers/vulkan/vulkan_context.h
index 8c0111714c..6858eb7524 100644
--- a/drivers/vulkan/vulkan_context.h
+++ b/drivers/vulkan/vulkan_context.h
@@ -185,27 +185,27 @@ private:
*/
bool enabled_debug_report = false;
- PFN_vkCreateDebugUtilsMessengerEXT CreateDebugUtilsMessengerEXT;
- PFN_vkDestroyDebugUtilsMessengerEXT DestroyDebugUtilsMessengerEXT;
- PFN_vkSubmitDebugUtilsMessageEXT SubmitDebugUtilsMessageEXT;
- PFN_vkCmdBeginDebugUtilsLabelEXT CmdBeginDebugUtilsLabelEXT;
- PFN_vkCmdEndDebugUtilsLabelEXT CmdEndDebugUtilsLabelEXT;
- PFN_vkCmdInsertDebugUtilsLabelEXT CmdInsertDebugUtilsLabelEXT;
- PFN_vkSetDebugUtilsObjectNameEXT SetDebugUtilsObjectNameEXT;
- PFN_vkCreateDebugReportCallbackEXT CreateDebugReportCallbackEXT;
- PFN_vkDebugReportMessageEXT DebugReportMessageEXT;
- PFN_vkDestroyDebugReportCallbackEXT DestroyDebugReportCallbackEXT;
- PFN_vkGetPhysicalDeviceSurfaceSupportKHR fpGetPhysicalDeviceSurfaceSupportKHR;
- PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR fpGetPhysicalDeviceSurfaceCapabilitiesKHR;
- PFN_vkGetPhysicalDeviceSurfaceFormatsKHR fpGetPhysicalDeviceSurfaceFormatsKHR;
- PFN_vkGetPhysicalDeviceSurfacePresentModesKHR fpGetPhysicalDeviceSurfacePresentModesKHR;
- PFN_vkCreateSwapchainKHR fpCreateSwapchainKHR;
- PFN_vkDestroySwapchainKHR fpDestroySwapchainKHR;
- PFN_vkGetSwapchainImagesKHR fpGetSwapchainImagesKHR;
- PFN_vkAcquireNextImageKHR fpAcquireNextImageKHR;
- PFN_vkQueuePresentKHR fpQueuePresentKHR;
- PFN_vkGetRefreshCycleDurationGOOGLE fpGetRefreshCycleDurationGOOGLE;
- PFN_vkGetPastPresentationTimingGOOGLE fpGetPastPresentationTimingGOOGLE;
+ PFN_vkCreateDebugUtilsMessengerEXT CreateDebugUtilsMessengerEXT = nullptr;
+ PFN_vkDestroyDebugUtilsMessengerEXT DestroyDebugUtilsMessengerEXT = nullptr;
+ PFN_vkSubmitDebugUtilsMessageEXT SubmitDebugUtilsMessageEXT = nullptr;
+ PFN_vkCmdBeginDebugUtilsLabelEXT CmdBeginDebugUtilsLabelEXT = nullptr;
+ PFN_vkCmdEndDebugUtilsLabelEXT CmdEndDebugUtilsLabelEXT = nullptr;
+ PFN_vkCmdInsertDebugUtilsLabelEXT CmdInsertDebugUtilsLabelEXT = nullptr;
+ PFN_vkSetDebugUtilsObjectNameEXT SetDebugUtilsObjectNameEXT = nullptr;
+ PFN_vkCreateDebugReportCallbackEXT CreateDebugReportCallbackEXT = nullptr;
+ PFN_vkDebugReportMessageEXT DebugReportMessageEXT = nullptr;
+ PFN_vkDestroyDebugReportCallbackEXT DestroyDebugReportCallbackEXT = nullptr;
+ PFN_vkGetPhysicalDeviceSurfaceSupportKHR fpGetPhysicalDeviceSurfaceSupportKHR = nullptr;
+ PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR fpGetPhysicalDeviceSurfaceCapabilitiesKHR = nullptr;
+ PFN_vkGetPhysicalDeviceSurfaceFormatsKHR fpGetPhysicalDeviceSurfaceFormatsKHR = nullptr;
+ PFN_vkGetPhysicalDeviceSurfacePresentModesKHR fpGetPhysicalDeviceSurfacePresentModesKHR = nullptr;
+ PFN_vkCreateSwapchainKHR fpCreateSwapchainKHR = nullptr;
+ PFN_vkDestroySwapchainKHR fpDestroySwapchainKHR = nullptr;
+ PFN_vkGetSwapchainImagesKHR fpGetSwapchainImagesKHR = nullptr;
+ PFN_vkAcquireNextImageKHR fpAcquireNextImageKHR = nullptr;
+ PFN_vkQueuePresentKHR fpQueuePresentKHR = nullptr;
+ PFN_vkGetRefreshCycleDurationGOOGLE fpGetRefreshCycleDurationGOOGLE = nullptr;
+ PFN_vkGetPastPresentationTimingGOOGLE fpGetPastPresentationTimingGOOGLE = nullptr;
VkDebugUtilsMessengerEXT dbg_messenger = VK_NULL_HANDLE;
VkDebugReportCallbackEXT dbg_debug_report = VK_NULL_HANDLE;
@@ -305,6 +305,7 @@ public:
String get_device_vendor_name() const;
String get_device_name() const;
RenderingDevice::DeviceType get_device_type() const;
+ String get_device_api_version() const;
String get_device_pipeline_cache_uuid() const;
void set_vsync_mode(DisplayServer::WindowID p_window, DisplayServer::VSyncMode p_mode);