summaryrefslogtreecommitdiff
path: root/drivers/vulkan/vulkan_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/vulkan/vulkan_context.h')
-rw-r--r--drivers/vulkan/vulkan_context.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/vulkan/vulkan_context.h b/drivers/vulkan/vulkan_context.h
index e587104e3c..51c3febb47 100644
--- a/drivers/vulkan/vulkan_context.h
+++ b/drivers/vulkan/vulkan_context.h
@@ -33,6 +33,8 @@
#include "core/error_list.h"
#include "core/map.h"
+#include "core/os/mutex.h"
+#include "core/rid_owner.h"
#include "core/ustring.h"
#include "servers/display_server.h"
#include <vulkan/vulkan.h>
@@ -105,6 +107,14 @@ class VulkanContext {
}
};
+ struct LocalDevice {
+ bool waiting = false;
+ VkDevice device;
+ VkQueue queue;
+ };
+
+ RID_Owner<LocalDevice, true> local_device_owner;
+
Map<DisplayServer::WindowID, Window> windows;
uint32_t swapchainImageCount;
@@ -194,6 +204,12 @@ public:
VkFramebuffer window_get_framebuffer(DisplayServer::WindowID p_window = 0);
VkRenderPass window_get_render_pass(DisplayServer::WindowID p_window = 0);
+ RID local_device_create();
+ VkDevice local_device_get_vk_device(RID p_local_device);
+ void local_device_push_command_buffers(RID p_local_device, const VkCommandBuffer *p_buffers, int p_count);
+ void local_device_sync(RID p_local_device);
+ void local_device_free(RID p_local_device);
+
VkFormat get_screen_format() const;
VkPhysicalDeviceLimits get_device_limits() const;