diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-04-19 09:57:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-19 09:57:46 +0200 |
commit | 039abbb64aef692495c09c03db25aa84f3375eb6 (patch) | |
tree | 871aa6f067d97168003ca44e33dd4f809716934c /drivers/vulkan/vulkan_context.h | |
parent | 9690a60c21a89f504cc92b299a7590dedd75b2c9 (diff) | |
parent | 49d0c6a5c9726e6575acfc29c08f57362a1bbf10 (diff) |
Merge pull request #37997 from reduz/local-rendering-devices
Ability to create local RenderingDevice instances.
Diffstat (limited to 'drivers/vulkan/vulkan_context.h')
-rw-r--r-- | drivers/vulkan/vulkan_context.h | 16 |
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; |