diff options
| author | Juan Linietsky <reduzio@gmail.com> | 2020-04-18 20:30:57 -0300 |
|---|---|---|
| committer | Juan Linietsky <reduzio@gmail.com> | 2020-04-18 21:47:17 -0300 |
| commit | 49d0c6a5c9726e6575acfc29c08f57362a1bbf10 (patch) | |
| tree | 871aa6f067d97168003ca44e33dd4f809716934c /drivers/vulkan/rendering_device_vulkan.h | |
| parent | 9690a60c21a89f504cc92b299a7590dedd75b2c9 (diff) | |
| download | redot-engine-49d0c6a5c9726e6575acfc29c08f57362a1bbf10.tar.gz | |
Ability to create local RenderingDevice instances.
Diffstat (limited to 'drivers/vulkan/rendering_device_vulkan.h')
| -rw-r--r-- | drivers/vulkan/rendering_device_vulkan.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/vulkan/rendering_device_vulkan.h b/drivers/vulkan/rendering_device_vulkan.h index 2c92f3466e..404455afb3 100644 --- a/drivers/vulkan/rendering_device_vulkan.h +++ b/drivers/vulkan/rendering_device_vulkan.h @@ -952,10 +952,12 @@ class RenderingDeviceVulkan : public RenderingDevice { uint32_t max_timestamp_query_elements; - Frame *frames; //frames available, they are cycled (usually 3) + Frame *frames; //frames available, for main device they are cycled (usually 3), for local devices only 1 int frame; //current frame int frame_count; //total amount of frames uint64_t frames_drawn; + RID local_device; + bool local_device_processing = false; void _free_pending_resources(int p_frame); @@ -971,6 +973,9 @@ class RenderingDeviceVulkan : public RenderingDevice { template <class T> void _free_rids(T &p_owner, const char *p_type); + void _finalize_command_bufers(); + void _begin_frame(); + public: virtual RID texture_create(const TextureFormat &p_format, const TextureView &p_view, const Vector<Vector<uint8_t>> &p_data = Vector<Vector<uint8_t>>()); virtual RID texture_create_shared(const TextureView &p_view, RID p_with_texture); @@ -1121,14 +1126,20 @@ public: virtual int limit_get(Limit p_limit); virtual void prepare_screen_for_drawing(); - void initialize(VulkanContext *p_context); + void initialize(VulkanContext *p_context, bool p_local_device = false); void finalize(); - virtual void swap_buffers(); + virtual void swap_buffers(); //for main device + + virtual void submit(); //for local device + virtual void sync(); //for local device virtual uint32_t get_frame_delay() const; + virtual RenderingDevice *create_local_device(); + RenderingDeviceVulkan(); + ~RenderingDeviceVulkan(); }; #endif // RENDERING_DEVICE_VULKAN_H |
