From c613ead5fa2361296cf8d9a80d4648492ff4e16f Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Mon, 29 Jul 2019 12:59:18 -0300 Subject: Added a spinlock template as well as a thread work pool class. Also, optimized shader compilation to happen on threads. --- drivers/vulkan/rendering_device_vulkan.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'drivers/vulkan/rendering_device_vulkan.h') diff --git a/drivers/vulkan/rendering_device_vulkan.h b/drivers/vulkan/rendering_device_vulkan.h index 5b3b7a5f47..87971ba2b8 100644 --- a/drivers/vulkan/rendering_device_vulkan.h +++ b/drivers/vulkan/rendering_device_vulkan.h @@ -114,7 +114,7 @@ class RenderingDeviceVulkan : public RenderingDevice { RID owner; }; - RID_Owner texture_owner; + RID_Owner texture_owner; uint32_t texture_upload_region_size_px; PoolVector _texture_get_data_from_image(Texture *tex, VkImage p_image, VmaAllocation p_allocation, uint32_t p_layer); @@ -264,7 +264,7 @@ class RenderingDeviceVulkan : public RenderingDevice { Size2 size; }; - RID_Owner framebuffer_owner; + RID_Owner framebuffer_owner; /***********************/ /**** VERTEX BUFFER ****/ @@ -279,7 +279,7 @@ class RenderingDeviceVulkan : public RenderingDevice { // This mapping is done here internally, and it's not // exposed. - RID_Owner vertex_buffer_owner; + RID_Owner vertex_buffer_owner; struct VertexDescriptionKey { Vector vertex_formats; @@ -359,7 +359,7 @@ class RenderingDeviceVulkan : public RenderingDevice { Vector offsets; }; - RID_Owner vertex_array_owner; + RID_Owner vertex_array_owner; struct IndexBuffer : public Buffer { uint32_t max_index; //used for validation @@ -368,7 +368,7 @@ class RenderingDeviceVulkan : public RenderingDevice { bool supports_restart_indices; }; - RID_Owner index_buffer_owner; + RID_Owner index_buffer_owner; struct IndexArray { uint32_t max_index; //remember the maximum index here too, for validation @@ -379,7 +379,7 @@ class RenderingDeviceVulkan : public RenderingDevice { bool supports_restart_indices; }; - RID_Owner index_array_owner; + RID_Owner index_array_owner; /****************/ /**** SHADER ****/ @@ -495,7 +495,7 @@ class RenderingDeviceVulkan : public RenderingDevice { String _shader_uniform_debug(RID p_shader, int p_set = -1); - RID_Owner shader_owner; + RID_Owner shader_owner; /******************/ /**** UNIFORMS ****/ @@ -559,8 +559,8 @@ class RenderingDeviceVulkan : public RenderingDevice { DescriptorPool *_descriptor_pool_allocate(const DescriptorPoolKey &p_key); void _descriptor_pool_free(const DescriptorPoolKey &p_key, DescriptorPool *p_pool); - RID_Owner uniform_buffer_owner; - RID_Owner storage_buffer_owner; + RID_Owner uniform_buffer_owner; + RID_Owner storage_buffer_owner; //texture buffer needs a view struct TextureBuffer { @@ -568,7 +568,7 @@ class RenderingDeviceVulkan : public RenderingDevice { VkBufferView view; }; - RID_Owner texture_buffer_owner; + RID_Owner texture_buffer_owner; // This structure contains the descriptor set. They _need_ to be allocated // for a shader (and will be erased when this shader is erased), but should @@ -589,7 +589,7 @@ class RenderingDeviceVulkan : public RenderingDevice { Vector attachable_textures; //used for validation }; - RID_Owner uniform_set_owner; + RID_Owner uniform_set_owner; /*******************/ /**** PIPELINES ****/ @@ -607,7 +607,7 @@ class RenderingDeviceVulkan : public RenderingDevice { // was not supplied as intended. struct RenderPipeline { - //Cached values for validation + //Cached values for validation #ifdef DEBUG_ENABLED struct Validation { FramebufferFormatID framebuffer_format; @@ -627,7 +627,7 @@ class RenderingDeviceVulkan : public RenderingDevice { uint32_t push_constant_stages; }; - RID_Owner pipeline_owner; + RID_Owner pipeline_owner; /*******************/ /**** DRAW LIST ****/ -- cgit v1.2.3