diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/unix/semaphore_posix.cpp | 2 | ||||
-rw-r--r-- | drivers/unix/semaphore_posix.h | 4 | ||||
-rw-r--r-- | drivers/vulkan/rendering_device_vulkan.cpp | 4 | ||||
-rw-r--r-- | drivers/vulkan/rendering_device_vulkan.h | 26 | ||||
-rw-r--r-- | drivers/windows/semaphore_windows.cpp | 2 | ||||
-rw-r--r-- | drivers/windows/semaphore_windows.h | 4 |
6 files changed, 21 insertions, 21 deletions
diff --git a/drivers/unix/semaphore_posix.cpp b/drivers/unix/semaphore_posix.cpp index 5f412adea1..b532b09cd6 100644 --- a/drivers/unix/semaphore_posix.cpp +++ b/drivers/unix/semaphore_posix.cpp @@ -62,7 +62,7 @@ int SemaphorePosix::get() const { return val; } -Semaphore *SemaphorePosix::create_semaphore_posix() { +SemaphoreOld *SemaphorePosix::create_semaphore_posix() { return memnew(SemaphorePosix); } diff --git a/drivers/unix/semaphore_posix.h b/drivers/unix/semaphore_posix.h index e06f6316db..2bffe6933d 100644 --- a/drivers/unix/semaphore_posix.h +++ b/drivers/unix/semaphore_posix.h @@ -37,11 +37,11 @@ #include <semaphore.h> -class SemaphorePosix : public Semaphore { +class SemaphorePosix : public SemaphoreOld { mutable sem_t sem; - static Semaphore *create_semaphore_posix(); + static SemaphoreOld *create_semaphore_posix(); public: virtual Error wait(); diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp index f6154a3cbd..a14d45067a 100644 --- a/drivers/vulkan/rendering_device_vulkan.cpp +++ b/drivers/vulkan/rendering_device_vulkan.cpp @@ -3448,8 +3448,6 @@ bool RenderingDeviceVulkan::_uniform_add_binding(Vector<Vector<VkDescriptorSetLa RID RenderingDeviceVulkan::shader_create(const Vector<ShaderStageData> &p_stages) { - _THREAD_SAFE_METHOD_ - //descriptor layouts Vector<Vector<VkDescriptorSetLayoutBinding> > set_bindings; Vector<Vector<UniformInfo> > uniform_info; @@ -3694,6 +3692,8 @@ RID RenderingDeviceVulkan::shader_create(const Vector<ShaderStageData> &p_stages //all good, let's create modules + _THREAD_SAFE_METHOD_ + Shader shader; shader.vertex_input_locations = vertex_input_locations; 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> texture_owner; + RID_Owner<Texture, true> texture_owner; uint32_t texture_upload_region_size_px; PoolVector<uint8_t> _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> framebuffer_owner; + RID_Owner<Framebuffer, true> 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<Buffer> vertex_buffer_owner; + RID_Owner<Buffer, true> vertex_buffer_owner; struct VertexDescriptionKey { Vector<VertexDescription> vertex_formats; @@ -359,7 +359,7 @@ class RenderingDeviceVulkan : public RenderingDevice { Vector<VkDeviceSize> offsets; }; - RID_Owner<VertexArray> vertex_array_owner; + RID_Owner<VertexArray, true> 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<IndexBuffer> index_buffer_owner; + RID_Owner<IndexBuffer, true> 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<IndexArray> index_array_owner; + RID_Owner<IndexArray, true> 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> shader_owner; + RID_Owner<Shader, true> 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<Buffer> uniform_buffer_owner; - RID_Owner<Buffer> storage_buffer_owner; + RID_Owner<Buffer, true> uniform_buffer_owner; + RID_Owner<Buffer, true> storage_buffer_owner; //texture buffer needs a view struct TextureBuffer { @@ -568,7 +568,7 @@ class RenderingDeviceVulkan : public RenderingDevice { VkBufferView view; }; - RID_Owner<TextureBuffer> texture_buffer_owner; + RID_Owner<TextureBuffer, true> 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<RID> attachable_textures; //used for validation }; - RID_Owner<UniformSet> uniform_set_owner; + RID_Owner<UniformSet, true> 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<RenderPipeline> pipeline_owner; + RID_Owner<RenderPipeline, true> pipeline_owner; /*******************/ /**** DRAW LIST ****/ diff --git a/drivers/windows/semaphore_windows.cpp b/drivers/windows/semaphore_windows.cpp index ea8032ffe2..1b53e311ff 100644 --- a/drivers/windows/semaphore_windows.cpp +++ b/drivers/windows/semaphore_windows.cpp @@ -61,7 +61,7 @@ int SemaphoreWindows::get() const { ERR_FAIL_V(-1); } -Semaphore *SemaphoreWindows::create_semaphore_windows() { +SemaphoreOld *SemaphoreWindows::create_semaphore_windows() { return memnew(SemaphoreWindows); } diff --git a/drivers/windows/semaphore_windows.h b/drivers/windows/semaphore_windows.h index 01712b6778..159e8b3b96 100644 --- a/drivers/windows/semaphore_windows.h +++ b/drivers/windows/semaphore_windows.h @@ -37,11 +37,11 @@ #include <windows.h> -class SemaphoreWindows : public Semaphore { +class SemaphoreWindows : public SemaphoreOld { mutable HANDLE semaphore; - static Semaphore *create_semaphore_windows(); + static SemaphoreOld *create_semaphore_windows(); public: virtual Error wait(); |