summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gles3/storage/config.h4
-rw-r--r--drivers/gles3/storage/material_storage.cpp2
-rw-r--r--drivers/gles3/storage/material_storage.h4
-rw-r--r--drivers/gles3/storage/mesh_storage.h2
-rw-r--r--drivers/vulkan/rendering_device_vulkan.cpp14
-rw-r--r--drivers/vulkan/rendering_device_vulkan.h8
6 files changed, 17 insertions, 17 deletions
diff --git a/drivers/gles3/storage/config.h b/drivers/gles3/storage/config.h
index 975508b555..c93c030498 100644
--- a/drivers/gles3/storage/config.h
+++ b/drivers/gles3/storage/config.h
@@ -34,7 +34,7 @@
#ifdef GLES3_ENABLED
#include "core/string/ustring.h"
-#include "core/templates/rb_set.h"
+#include "core/templates/hash_set.h"
// This must come first to avoid windows.h mess
#include "platform_config.h"
@@ -65,7 +65,7 @@ public:
// TODO implement wireframe in OpenGL
// bool generate_wireframes;
- RBSet<String> extensions;
+ HashSet<String> extensions;
bool float_texture_supported = false;
bool s3tc_supported = false;
diff --git a/drivers/gles3/storage/material_storage.cpp b/drivers/gles3/storage/material_storage.cpp
index 7b18376a2a..ca62b0ca1f 100644
--- a/drivers/gles3/storage/material_storage.cpp
+++ b/drivers/gles3/storage/material_storage.cpp
@@ -2381,7 +2381,7 @@ void MaterialStorage::shader_free(RID p_rid) {
//make material unreference this
while (shader->owners.size()) {
- material_set_shader(shader->owners.front()->get()->self, RID());
+ material_set_shader((*shader->owners.begin())->self, RID());
}
//clear data if exists
diff --git a/drivers/gles3/storage/material_storage.h b/drivers/gles3/storage/material_storage.h
index 6a11a10d76..053dbacc05 100644
--- a/drivers/gles3/storage/material_storage.h
+++ b/drivers/gles3/storage/material_storage.h
@@ -89,7 +89,7 @@ struct Shader {
String code;
RS::ShaderMode mode;
HashMap<StringName, HashMap<int, RID>> default_texture_parameter;
- RBSet<Material *> owners;
+ HashSet<Material *> owners;
};
/* Material structs */
@@ -384,7 +384,7 @@ struct GlobalVariables {
BUFFER_DIRTY_REGION_SIZE = 1024
};
struct Variable {
- RBSet<RID> texture_materials; // materials using this
+ HashSet<RID> texture_materials; // materials using this
RS::GlobalVariableType type;
Variant value;
diff --git a/drivers/gles3/storage/mesh_storage.h b/drivers/gles3/storage/mesh_storage.h
index 856463d45e..991777842f 100644
--- a/drivers/gles3/storage/mesh_storage.h
+++ b/drivers/gles3/storage/mesh_storage.h
@@ -123,7 +123,7 @@ struct Mesh {
List<MeshInstance *> instances;
RID shadow_mesh;
- RBSet<Mesh *> shadow_owners;
+ HashSet<Mesh *> shadow_owners;
RendererStorage::Dependency dependency;
};
diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp
index 1a60ca0647..77aab72d40 100644
--- a/drivers/vulkan/rendering_device_vulkan.cpp
+++ b/drivers/vulkan/rendering_device_vulkan.cpp
@@ -132,13 +132,13 @@ static void update_external_dependency_for_store(VkSubpassDependency &dependency
void RenderingDeviceVulkan::_add_dependency(RID p_id, RID p_depends_on) {
if (!dependency_map.has(p_depends_on)) {
- dependency_map[p_depends_on] = RBSet<RID>();
+ dependency_map[p_depends_on] = HashSet<RID>();
}
dependency_map[p_depends_on].insert(p_id);
if (!reverse_dependency_map.has(p_id)) {
- reverse_dependency_map[p_id] = RBSet<RID>();
+ reverse_dependency_map[p_id] = HashSet<RID>();
}
reverse_dependency_map[p_id].insert(p_depends_on);
@@ -147,10 +147,10 @@ void RenderingDeviceVulkan::_add_dependency(RID p_id, RID p_depends_on) {
void RenderingDeviceVulkan::_free_dependencies(RID p_id) {
//direct dependencies must be freed
- HashMap<RID, RBSet<RID>>::Iterator E = dependency_map.find(p_id);
+ HashMap<RID, HashSet<RID>>::Iterator E = dependency_map.find(p_id);
if (E) {
while (E->value.size()) {
- free(E->value.front()->get());
+ free(*E->value.begin());
}
dependency_map.remove(E);
}
@@ -160,7 +160,7 @@ void RenderingDeviceVulkan::_free_dependencies(RID p_id) {
if (E) {
for (const RID &F : E->value) {
- HashMap<RID, RBSet<RID>>::Iterator G = dependency_map.find(F);
+ HashMap<RID, HashSet<RID>>::Iterator G = dependency_map.find(F);
ERR_CONTINUE(!G);
ERR_CONTINUE(!G->value.has(p_id));
G->value.erase(p_id);
@@ -4138,7 +4138,7 @@ RenderingDevice::VertexFormatID RenderingDeviceVulkan::vertex_format_create(cons
vdcache.bindings = memnew_arr(VkVertexInputBindingDescription, p_vertex_formats.size());
vdcache.attributes = memnew_arr(VkVertexInputAttributeDescription, p_vertex_formats.size());
- RBSet<int> used_locations;
+ HashSet<int> used_locations;
for (int i = 0; i < p_vertex_formats.size(); i++) {
ERR_CONTINUE(p_vertex_formats[i].format >= DATA_FORMAT_MAX);
ERR_FAIL_COND_V(used_locations.has(p_vertex_formats[i].location), INVALID_ID);
@@ -5468,7 +5468,7 @@ RID RenderingDeviceVulkan::texture_buffer_create(uint32_t p_size_elements, DataF
RenderingDeviceVulkan::DescriptorPool *RenderingDeviceVulkan::_descriptor_pool_allocate(const DescriptorPoolKey &p_key) {
if (!descriptor_pools.has(p_key)) {
- descriptor_pools[p_key] = RBSet<DescriptorPool *>();
+ descriptor_pools[p_key] = HashSet<DescriptorPool *>();
}
DescriptorPool *pool = nullptr;
diff --git a/drivers/vulkan/rendering_device_vulkan.h b/drivers/vulkan/rendering_device_vulkan.h
index 601c44c728..903a39b3d0 100644
--- a/drivers/vulkan/rendering_device_vulkan.h
+++ b/drivers/vulkan/rendering_device_vulkan.h
@@ -101,8 +101,8 @@ class RenderingDeviceVulkan : public RenderingDevice {
VkDevice device = VK_NULL_HANDLE;
- HashMap<RID, RBSet<RID>> dependency_map; //IDs to IDs that depend on it
- HashMap<RID, RBSet<RID>> reverse_dependency_map; //same as above, but in reverse
+ HashMap<RID, HashSet<RID>> dependency_map; //IDs to IDs that depend on it
+ HashMap<RID, HashSet<RID>> reverse_dependency_map; //same as above, but in reverse
void _add_dependency(RID p_id, RID p_depends_on);
void _free_dependencies(RID p_id);
@@ -702,7 +702,7 @@ class RenderingDeviceVulkan : public RenderingDevice {
uint32_t usage;
};
- RBMap<DescriptorPoolKey, RBSet<DescriptorPool *>> descriptor_pools;
+ RBMap<DescriptorPoolKey, HashSet<DescriptorPool *>> descriptor_pools;
uint32_t max_descriptors_per_pool = 0;
DescriptorPool *_descriptor_pool_allocate(const DescriptorPoolKey &p_key);
@@ -923,7 +923,7 @@ class RenderingDeviceVulkan : public RenderingDevice {
};
struct State {
- RBSet<Texture *> textures_to_sampled_layout;
+ HashSet<Texture *> textures_to_sampled_layout;
SetState sets[MAX_UNIFORM_SETS];
uint32_t set_count = 0;
RID pipeline;