diff options
author | Juan Linietsky <juan@godotengine.org> | 2020-02-17 18:06:54 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2020-02-18 10:10:36 +0100 |
commit | 3205a92ad872f918c8322cdcd1434c231a1fd251 (patch) | |
tree | db44242ca27432eb8ea849679752d0835d2ae41a /servers/visual | |
parent | fb8c93c10b4b73d5f18f1ed287497728800e22b5 (diff) |
PoolVector is gone, replaced by Vector
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are
sugar for `Vector<Type>`.
Diffstat (limited to 'servers/visual')
18 files changed, 222 insertions, 229 deletions
diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h index 08d2104f94..3274b15975 100644 --- a/servers/visual/rasterizer.h +++ b/servers/visual/rasterizer.h @@ -356,7 +356,7 @@ public: virtual void mesh_set_blend_shape_mode(RID p_mesh, VS::BlendShapeMode p_mode) = 0; virtual VS::BlendShapeMode mesh_get_blend_shape_mode(RID p_mesh) const = 0; - virtual void mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const PoolVector<uint8_t> &p_data) = 0; + virtual void mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const Vector<uint8_t> &p_data) = 0; virtual void mesh_surface_set_material(RID p_mesh, int p_surface, RID p_material) = 0; virtual RID mesh_surface_get_material(RID p_mesh, int p_surface) const = 0; @@ -393,8 +393,8 @@ public: virtual Color multimesh_instance_get_color(RID p_multimesh, int p_index) const = 0; virtual Color multimesh_instance_get_custom_data(RID p_multimesh, int p_index) const = 0; - virtual void multimesh_set_buffer(RID p_multimesh, const PoolVector<float> &p_buffer) = 0; - virtual PoolVector<float> multimesh_get_buffer(RID p_multimesh) const = 0; + virtual void multimesh_set_buffer(RID p_multimesh, const Vector<float> &p_buffer) = 0; + virtual Vector<float> multimesh_get_buffer(RID p_multimesh) const = 0; virtual void multimesh_set_visible_instances(RID p_multimesh, int p_visible) = 0; virtual int multimesh_get_visible_instances(RID p_multimesh) const = 0; @@ -499,15 +499,15 @@ public: virtual RID gi_probe_create() = 0; - virtual void gi_probe_allocate(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const PoolVector<uint8_t> &p_octree_cells, const PoolVector<uint8_t> &p_data_cells, const PoolVector<uint8_t> &p_distance_field, const PoolVector<int> &p_level_counts) = 0; + virtual void gi_probe_allocate(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const Vector<uint8_t> &p_octree_cells, const Vector<uint8_t> &p_data_cells, const Vector<uint8_t> &p_distance_field, const Vector<int> &p_level_counts) = 0; virtual AABB gi_probe_get_bounds(RID p_gi_probe) const = 0; virtual Vector3i gi_probe_get_octree_size(RID p_gi_probe) const = 0; - virtual PoolVector<uint8_t> gi_probe_get_octree_cells(RID p_gi_probe) const = 0; - virtual PoolVector<uint8_t> gi_probe_get_data_cells(RID p_gi_probe) const = 0; - virtual PoolVector<uint8_t> gi_probe_get_distance_field(RID p_gi_probe) const = 0; + virtual Vector<uint8_t> gi_probe_get_octree_cells(RID p_gi_probe) const = 0; + virtual Vector<uint8_t> gi_probe_get_data_cells(RID p_gi_probe) const = 0; + virtual Vector<uint8_t> gi_probe_get_distance_field(RID p_gi_probe) const = 0; - virtual PoolVector<int> gi_probe_get_level_counts(RID p_gi_probe) const = 0; + virtual Vector<int> gi_probe_get_level_counts(RID p_gi_probe) const = 0; virtual Transform gi_probe_get_to_cell_xform(RID p_gi_probe) const = 0; virtual void gi_probe_set_dynamic_range(RID p_gi_probe, float p_range) = 0; @@ -558,15 +558,15 @@ public: virtual RID lightmap_capture_create() = 0; virtual void lightmap_capture_set_bounds(RID p_capture, const AABB &p_bounds) = 0; virtual AABB lightmap_capture_get_bounds(RID p_capture) const = 0; - virtual void lightmap_capture_set_octree(RID p_capture, const PoolVector<uint8_t> &p_octree) = 0; - virtual PoolVector<uint8_t> lightmap_capture_get_octree(RID p_capture) const = 0; + virtual void lightmap_capture_set_octree(RID p_capture, const Vector<uint8_t> &p_octree) = 0; + virtual Vector<uint8_t> lightmap_capture_get_octree(RID p_capture) const = 0; virtual void lightmap_capture_set_octree_cell_transform(RID p_capture, const Transform &p_xform) = 0; virtual Transform lightmap_capture_get_octree_cell_transform(RID p_capture) const = 0; virtual void lightmap_capture_set_octree_cell_subdiv(RID p_capture, int p_subdiv) = 0; virtual int lightmap_capture_get_octree_cell_subdiv(RID p_capture) const = 0; virtual void lightmap_capture_set_energy(RID p_capture, float p_energy) = 0; virtual float lightmap_capture_get_energy(RID p_capture) const = 0; - virtual const PoolVector<LightmapCaptureOctree> *lightmap_capture_get_octree_ptr(RID p_capture) const = 0; + virtual const Vector<LightmapCaptureOctree> *lightmap_capture_get_octree_ptr(RID p_capture) const = 0; /* PARTICLES */ @@ -1258,7 +1258,7 @@ public: virtual void light_update_shadow(RID p_rid, const Transform2D &p_light_xform, int p_light_mask, float p_near, float p_far, LightOccluderInstance *p_occluders) = 0; virtual RID occluder_polygon_create() = 0; - virtual void occluder_polygon_set_shape_as_lines(RID p_occluder, const PoolVector<Vector2> &p_lines) = 0; + virtual void occluder_polygon_set_shape_as_lines(RID p_occluder, const Vector<Vector2> &p_lines) = 0; virtual void occluder_polygon_set_cull_mode(RID p_occluder, VS::CanvasOccluderPolygonCullMode p_mode) = 0; virtual void draw_window_margins(int *p_margins, RID *p_margin_textures) = 0; diff --git a/servers/visual/rasterizer_rd/light_cluster_builder.cpp b/servers/visual/rasterizer_rd/light_cluster_builder.cpp index 78011c22cc..943ef1c7fa 100644 --- a/servers/visual/rasterizer_rd/light_cluster_builder.cpp +++ b/servers/visual/rasterizer_rd/light_cluster_builder.cpp @@ -47,8 +47,8 @@ void LightClusterBuilder::bake_cluster() { float slice_depth = (z_near - z_far) / depth; - PoolVector<uint8_t>::Write cluster_dataw = cluster_data.write(); - Cell *cluster_data_ptr = (Cell *)cluster_dataw.ptr(); + uint8_t *cluster_dataw = cluster_data.ptrw(); + Cell *cluster_data_ptr = (Cell *)cluster_dataw; //clear the cluster zeromem(cluster_data_ptr, (width * height * depth * sizeof(Cell))); @@ -160,8 +160,7 @@ void LightClusterBuilder::bake_cluster() { //print_line("offset: " + itos(offset)); /* Step 3, Place item lists */ - PoolVector<uint32_t>::Write idsw = ids.write(); - uint32_t *ids_ptr = idsw.ptr(); + uint32_t *ids_ptr = ids.ptrw(); for (uint32_t i = 0; i < sort_id_count; i++) { const SortID &id = sort_ids[i]; @@ -173,12 +172,8 @@ void LightClusterBuilder::bake_cluster() { cell.item_pointers[id.item_type] = pointer | ((counter + 1) << COUNTER_SHIFT); } - cluster_dataw = PoolVector<uint8_t>::Write(); - RD::get_singleton()->texture_update(cluster_texture, 0, cluster_data, true); RD::get_singleton()->buffer_update(items_buffer, 0, offset * sizeof(uint32_t), ids_ptr, true); - - idsw = PoolVector<uint32_t>::Write(); } void LightClusterBuilder::setup(uint32_t p_width, uint32_t p_height, uint32_t p_depth) { diff --git a/servers/visual/rasterizer_rd/light_cluster_builder.h b/servers/visual/rasterizer_rd/light_cluster_builder.h index fd2bd612c3..83014a7dd0 100644 --- a/servers/visual/rasterizer_rd/light_cluster_builder.h +++ b/servers/visual/rasterizer_rd/light_cluster_builder.h @@ -104,7 +104,7 @@ private: uint32_t item_pointers[ITEM_TYPE_MAX]; }; - PoolVector<uint8_t> cluster_data; + Vector<uint8_t> cluster_data; RID cluster_texture; struct SortID { @@ -114,7 +114,7 @@ private: }; SortID *sort_ids = nullptr; - PoolVector<uint32_t> ids; + Vector<uint32_t> ids; uint32_t sort_id_count = 0; uint32_t sort_id_max = 0; RID items_buffer; diff --git a/servers/visual/rasterizer_rd/rasterizer_canvas_rd.cpp b/servers/visual/rasterizer_rd/rasterizer_canvas_rd.cpp index 7012cb04cd..425221608b 100644 --- a/servers/visual/rasterizer_rd/rasterizer_canvas_rd.cpp +++ b/servers/visual/rasterizer_rd/rasterizer_canvas_rd.cpp @@ -271,7 +271,7 @@ RasterizerCanvas::PolygonID RasterizerCanvasRD::request_polygon(const Vector<int uint32_t buffer_size = stride * p_points.size(); - PoolVector<uint8_t> polygon_buffer; + Vector<uint8_t> polygon_buffer; polygon_buffer.resize(buffer_size * sizeof(float)); Vector<RD::VertexDescription> descriptions; descriptions.resize(4); @@ -279,9 +279,9 @@ RasterizerCanvas::PolygonID RasterizerCanvasRD::request_polygon(const Vector<int buffers.resize(4); { - PoolVector<uint8_t>::Read r = polygon_buffer.read(); - float *fptr = (float *)r.ptr(); - uint32_t *uptr = (uint32_t *)r.ptr(); + const uint8_t *r = polygon_buffer.ptr(); + float *fptr = (float *)r; + uint32_t *uptr = (uint32_t *)r; uint32_t base_offset = 0; { //vertices RD::VertexDescription vd; @@ -430,11 +430,11 @@ RasterizerCanvas::PolygonID RasterizerCanvasRD::request_polygon(const Vector<int if (p_indices.size()) { //create indices, as indices were requested - PoolVector<uint8_t> index_buffer; + Vector<uint8_t> index_buffer; index_buffer.resize(p_indices.size() * sizeof(int32_t)); { - PoolVector<uint8_t>::Write w = index_buffer.write(); - copymem(w.ptr(), p_indices.ptr(), sizeof(int32_t) * p_indices.size()); + uint8_t *w = index_buffer.ptrw(); + copymem(w, p_indices.ptr(), sizeof(int32_t) * p_indices.size()); } pb.index_buffer = RD::get_singleton()->index_buffer_create(p_indices.size(), RD::INDEX_BUFFER_FORMAT_UINT32, index_buffer); pb.indices = RD::get_singleton()->index_array_create(pb.index_buffer, 0, p_indices.size()); @@ -1707,7 +1707,7 @@ RID RasterizerCanvasRD::occluder_polygon_create() { return occluder_polygon_owner.make_rid(occluder); } -void RasterizerCanvasRD::occluder_polygon_set_shape_as_lines(RID p_occluder, const PoolVector<Vector2> &p_lines) { +void RasterizerCanvasRD::occluder_polygon_set_shape_as_lines(RID p_occluder, const Vector<Vector2> &p_lines) { OccluderPolygon *oc = occluder_polygon_owner.getornull(p_occluder); ERR_FAIL_COND(!oc); @@ -1727,20 +1727,20 @@ void RasterizerCanvasRD::occluder_polygon_set_shape_as_lines(RID p_occluder, con if (p_lines.size()) { - PoolVector<uint8_t> geometry; - PoolVector<uint8_t> indices; + Vector<uint8_t> geometry; + Vector<uint8_t> indices; int lc = p_lines.size(); geometry.resize(lc * 6 * sizeof(float)); indices.resize(lc * 3 * sizeof(uint16_t)); { - PoolVector<uint8_t>::Write vw = geometry.write(); - float *vwptr = (float *)vw.ptr(); - PoolVector<uint8_t>::Write iw = indices.write(); - uint16_t *iwptr = (uint16_t *)iw.ptr(); + uint8_t *vw = geometry.ptrw(); + float *vwptr = (float *)vw; + uint8_t *iw = indices.ptrw(); + uint16_t *iwptr = (uint16_t *)iw; - PoolVector<Vector2>::Read lr = p_lines.read(); + const Vector2 *lr = p_lines.ptr(); const int POLY_HEIGHT = 16384; @@ -1789,10 +1789,10 @@ void RasterizerCanvasRD::occluder_polygon_set_shape_as_lines(RID p_occluder, con } else { //update existing - PoolVector<uint8_t>::Read vr = geometry.read(); - RD::get_singleton()->buffer_update(oc->vertex_buffer, 0, geometry.size(), vr.ptr()); - PoolVector<uint8_t>::Read ir = indices.read(); - RD::get_singleton()->buffer_update(oc->index_buffer, 0, indices.size(), ir.ptr()); + const uint8_t *vr = geometry.ptr(); + RD::get_singleton()->buffer_update(oc->vertex_buffer, 0, geometry.size(), vr); + const uint8_t *ir = indices.ptr(); + RD::get_singleton()->buffer_update(oc->index_buffer, 0, indices.size(), ir); } } } @@ -2431,11 +2431,11 @@ RasterizerCanvasRD::RasterizerCanvasRD(RasterizerStorageRD *p_storage) { { // default index buffer - PoolVector<uint8_t> pv; + Vector<uint8_t> pv; pv.resize(6 * 4); { - PoolVector<uint8_t>::Write w = pv.write(); - int *p32 = (int *)w.ptr(); + uint8_t *w = pv.ptrw(); + int *p32 = (int *)w; p32[0] = 0; p32[1] = 1; p32[2] = 2; @@ -2482,7 +2482,7 @@ bool RasterizerCanvasRD::free(RID p_rid) { light_set_use_shadow(p_rid, false, 64); canvas_light_owner.free(p_rid); } else if (occluder_polygon_owner.owns(p_rid)) { - occluder_polygon_set_shape_as_lines(p_rid, PoolVector<Vector2>()); + occluder_polygon_set_shape_as_lines(p_rid, Vector<Vector2>()); occluder_polygon_owner.free(p_rid); } else { return false; diff --git a/servers/visual/rasterizer_rd/rasterizer_canvas_rd.h b/servers/visual/rasterizer_rd/rasterizer_canvas_rd.h index 17560ea540..894a00a436 100644 --- a/servers/visual/rasterizer_rd/rasterizer_canvas_rd.h +++ b/servers/visual/rasterizer_rd/rasterizer_canvas_rd.h @@ -482,7 +482,7 @@ public: void light_update_shadow(RID p_rid, const Transform2D &p_light_xform, int p_light_mask, float p_near, float p_far, LightOccluderInstance *p_occluders); RID occluder_polygon_create(); - void occluder_polygon_set_shape_as_lines(RID p_occluder, const PoolVector<Vector2> &p_lines); + void occluder_polygon_set_shape_as_lines(RID p_occluder, const Vector<Vector2> &p_lines); void occluder_polygon_set_cull_mode(RID p_occluder, VS::CanvasOccluderPolygonCullMode p_mode); void canvas_render_items(RID p_to_render_target, Item *p_item_list, const Color &p_modulate, Light *p_light_list, const Transform2D &p_canvas_transform); diff --git a/servers/visual/rasterizer_rd/rasterizer_effects_rd.cpp b/servers/visual/rasterizer_rd/rasterizer_effects_rd.cpp index 4b8b3334b5..c05f5cead0 100644 --- a/servers/visual/rasterizer_rd/rasterizer_effects_rd.cpp +++ b/servers/visual/rasterizer_rd/rasterizer_effects_rd.cpp @@ -955,11 +955,11 @@ RasterizerEffectsRD::RasterizerEffectsRD() { default_mipmap_sampler = RD::get_singleton()->sampler_create(sampler); { //create index array for copy shaders - PoolVector<uint8_t> pv; + Vector<uint8_t> pv; pv.resize(6 * 4); { - PoolVector<uint8_t>::Write w = pv.write(); - int *p32 = (int *)w.ptr(); + uint8_t *w = pv.ptrw(); + int *p32 = (int *)w; p32[0] = 0; p32[1] = 1; p32[2] = 2; diff --git a/servers/visual/rasterizer_rd/rasterizer_rd.cpp b/servers/visual/rasterizer_rd/rasterizer_rd.cpp index 34be4817f6..de31d9b3b7 100644 --- a/servers/visual/rasterizer_rd/rasterizer_rd.cpp +++ b/servers/visual/rasterizer_rd/rasterizer_rd.cpp @@ -128,11 +128,11 @@ void RasterizerRD::initialize() { } { //create index array for copy shader - PoolVector<uint8_t> pv; + Vector<uint8_t> pv; pv.resize(6 * 4); { - PoolVector<uint8_t>::Write w = pv.write(); - int *p32 = (int *)w.ptr(); + uint8_t *w = pv.ptrw(); + int *p32 = (int *)w; p32[0] = 0; p32[1] = 1; p32[2] = 2; diff --git a/servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp b/servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp index 317ffb994f..7d5593c239 100644 --- a/servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp +++ b/servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp @@ -1406,7 +1406,7 @@ void RasterizerSceneRD::gi_probe_update(RID p_probe, bool p_update_light_instanc if (octree_size != Vector3i()) { //can create a 3D texture - PoolVector<int> levels = storage->gi_probe_get_level_counts(gi_probe->probe); + Vector<int> levels = storage->gi_probe_get_level_counts(gi_probe->probe); RD::TextureFormat tf; tf.format = RD::DATA_FORMAT_R8G8B8A8_UNORM; diff --git a/servers/visual/rasterizer_rd/rasterizer_storage_rd.cpp b/servers/visual/rasterizer_rd/rasterizer_storage_rd.cpp index 5203873b7b..9f6b1a2b35 100644 --- a/servers/visual/rasterizer_rd/rasterizer_storage_rd.cpp +++ b/servers/visual/rasterizer_rd/rasterizer_storage_rd.cpp @@ -584,8 +584,8 @@ RID RasterizerStorageRD::texture_2d_create(const Ref<Image> &p_image) { rd_view.swizzle_b = ret_format.swizzle_b; rd_view.swizzle_a = ret_format.swizzle_a; } - PoolVector<uint8_t> data = image->get_data(); //use image data - Vector<PoolVector<uint8_t> > data_slices; + Vector<uint8_t> data = image->get_data(); //use image data + Vector<Vector<uint8_t> > data_slices; data_slices.push_back(data); texture.rd_texture = RD::get_singleton()->texture_create(rd_format, rd_view, data_slices); ERR_FAIL_COND_V(texture.rd_texture.is_null(), RID()); @@ -720,13 +720,12 @@ RID RasterizerStorageRD::texture_2d_placeholder_create() { Ref<Image> image; image.instance(); image->create(4, 4, false, Image::FORMAT_RGBA8); - image->lock(); + for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { image->set_pixel(i, j, Color(1, 0, 1, 1)); } } - image->unlock(); return texture_2d_create(image); } @@ -749,7 +748,7 @@ Ref<Image> RasterizerStorageRD::texture_2d_get(RID p_texture) const { return tex->image_cache_2d; } #endif - PoolVector<uint8_t> data = RD::get_singleton()->texture_get_data(tex->rd_texture, 0); + Vector<uint8_t> data = RD::get_singleton()->texture_get_data(tex->rd_texture, 0); ERR_FAIL_COND_V(data.size() == 0, Ref<Image>()); Ref<Image> image; image.instance(); @@ -1195,11 +1194,11 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy } break; case ShaderLanguage::TYPE_IVEC2: { - PoolVector<int> iv = value; + Vector<int> iv = value; int s = iv.size(); int32_t *gui = (int32_t *)data; - PoolVector<int>::Read r = iv.read(); + const int *r = iv.ptr(); for (int i = 0; i < 2; i++) { if (i < s) @@ -1211,11 +1210,11 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy } break; case ShaderLanguage::TYPE_IVEC3: { - PoolVector<int> iv = value; + Vector<int> iv = value; int s = iv.size(); int32_t *gui = (int32_t *)data; - PoolVector<int>::Read r = iv.read(); + const int *r = iv.ptr(); for (int i = 0; i < 3; i++) { if (i < s) @@ -1226,11 +1225,11 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy } break; case ShaderLanguage::TYPE_IVEC4: { - PoolVector<int> iv = value; + Vector<int> iv = value; int s = iv.size(); int32_t *gui = (int32_t *)data; - PoolVector<int>::Read r = iv.read(); + const int *r = iv.ptr(); for (int i = 0; i < 4; i++) { if (i < s) @@ -1248,11 +1247,11 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy } break; case ShaderLanguage::TYPE_UVEC2: { - PoolVector<int> iv = value; + Vector<int> iv = value; int s = iv.size(); uint32_t *gui = (uint32_t *)data; - PoolVector<int>::Read r = iv.read(); + const int *r = iv.ptr(); for (int i = 0; i < 2; i++) { if (i < s) @@ -1262,11 +1261,11 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy } } break; case ShaderLanguage::TYPE_UVEC3: { - PoolVector<int> iv = value; + Vector<int> iv = value; int s = iv.size(); uint32_t *gui = (uint32_t *)data; - PoolVector<int>::Read r = iv.read(); + const int *r = iv.ptr(); for (int i = 0; i < 3; i++) { if (i < s) @@ -1277,11 +1276,11 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy } break; case ShaderLanguage::TYPE_UVEC4: { - PoolVector<int> iv = value; + Vector<int> iv = value; int s = iv.size(); uint32_t *gui = (uint32_t *)data; - PoolVector<int>::Read r = iv.read(); + const int *r = iv.ptr(); for (int i = 0; i < 4; i++) { if (i < s) @@ -1955,15 +1954,15 @@ VS::BlendShapeMode RasterizerStorageRD::mesh_get_blend_shape_mode(RID p_mesh) co return mesh->blend_shape_mode; } -void RasterizerStorageRD::mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const PoolVector<uint8_t> &p_data) { +void RasterizerStorageRD::mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const Vector<uint8_t> &p_data) { Mesh *mesh = mesh_owner.getornull(p_mesh); ERR_FAIL_COND(!mesh); ERR_FAIL_UNSIGNED_INDEX((uint32_t)p_surface, mesh->surface_count); ERR_FAIL_COND(p_data.size() == 0); uint64_t data_size = p_data.size(); - PoolVector<uint8_t>::Read r = p_data.read(); + const uint8_t *r = p_data.ptr(); - RD::get_singleton()->buffer_update(mesh->surfaces[p_surface]->vertex_buffer, p_offset, data_size, r.ptr()); + RD::get_singleton()->buffer_update(mesh->surfaces[p_surface]->vertex_buffer, p_offset, data_size, r); } void RasterizerStorageRD::mesh_surface_set_material(RID p_mesh, int p_surface, RID p_material) { @@ -2012,7 +2011,7 @@ VS::SurfaceData RasterizerStorageRD::mesh_get_surface(RID p_mesh, int p_surface) sd.bone_aabbs = s.bone_aabbs; for (int i = 0; i < s.blend_shapes.size(); i++) { - PoolVector<uint8_t> bs = RD::get_singleton()->buffer_get_data(s.blend_shapes[i]); + Vector<uint8_t> bs = RD::get_singleton()->buffer_get_data(s.blend_shapes[i]); sd.blend_shapes.push_back(bs); } @@ -2386,7 +2385,7 @@ void RasterizerStorageRD::multimesh_allocate(RID p_multimesh, int p_instances, V multimesh->buffer_set = false; //print_line("allocate, elements: " + itos(p_instances) + " 2D: " + itos(p_transform_format == VS::MULTIMESH_TRANSFORM_2D) + " colors " + itos(multimesh->uses_colors) + " data " + itos(multimesh->uses_custom_data) + " stride " + itos(multimesh->stride_cache) + " total size " + itos(multimesh->stride_cache * multimesh->instances)); - multimesh->data_cache = PoolVector<float>(); + multimesh->data_cache = Vector<float>(); multimesh->aabb = AABB(); multimesh->aabb_dirty = false; multimesh->visible_instances = MIN(multimesh->visible_instances, multimesh->instances); @@ -2421,9 +2420,9 @@ void RasterizerStorageRD::multimesh_set_mesh(RID p_multimesh, RID p_mesh) { } else if (multimesh->instances) { //need to re-create AABB unfortunately, calling this has a penalty if (multimesh->buffer_set) { - PoolVector<uint8_t> buffer = RD::get_singleton()->buffer_get_data(multimesh->buffer); - PoolVector<uint8_t>::Read r = buffer.read(); - const float *data = (const float *)r.ptr(); + Vector<uint8_t> buffer = RD::get_singleton()->buffer_get_data(multimesh->buffer); + const uint8_t *r = buffer.ptr(); + const float *data = (const float *)r; _multimesh_re_create_aabb(multimesh, data, multimesh->instances); } } @@ -2442,17 +2441,17 @@ void RasterizerStorageRD::_multimesh_make_local(MultiMesh *multimesh) const { // for this, the data must reside on CPU, so just copy it there. multimesh->data_cache.resize(multimesh->instances * multimesh->stride_cache); { - PoolVector<float>::Write w = multimesh->data_cache.write(); + float *w = multimesh->data_cache.ptrw(); if (multimesh->buffer_set) { - PoolVector<uint8_t> buffer = RD::get_singleton()->buffer_get_data(multimesh->buffer); + Vector<uint8_t> buffer = RD::get_singleton()->buffer_get_data(multimesh->buffer); { - PoolVector<uint8_t>::Read r = buffer.read(); - copymem(w.ptr(), r.ptr(), buffer.size()); + const uint8_t *r = buffer.ptr(); + copymem(w, r, buffer.size()); } } else { - zeromem(w.ptr(), multimesh->instances * multimesh->stride_cache * sizeof(float)); + zeromem(w, multimesh->instances * multimesh->stride_cache * sizeof(float)); } } uint32_t data_cache_dirty_region_count = (multimesh->instances - 1) / MULTIMESH_DIRTY_REGION_SIZE + 1; @@ -2564,9 +2563,9 @@ void RasterizerStorageRD::multimesh_instance_set_transform(RID p_multimesh, int _multimesh_make_local(multimesh); { - PoolVector<float>::Write w = multimesh->data_cache.write(); + float *w = multimesh->data_cache.ptrw(); - float *dataptr = w.ptr() + p_index * multimesh->stride_cache; + float *dataptr = w + p_index * multimesh->stride_cache; dataptr[0] = p_transform.basis.elements[0][0]; dataptr[1] = p_transform.basis.elements[0][1]; @@ -2595,9 +2594,9 @@ void RasterizerStorageRD::multimesh_instance_set_transform_2d(RID p_multimesh, i _multimesh_make_local(multimesh); { - PoolVector<float>::Write w = multimesh->data_cache.write(); + float *w = multimesh->data_cache.ptrw(); - float *dataptr = w.ptr() + p_index * multimesh->stride_cache; + float *dataptr = w + p_index * multimesh->stride_cache; dataptr[0] = p_transform.elements[0][0]; dataptr[1] = p_transform.elements[1][0]; @@ -2621,9 +2620,9 @@ void RasterizerStorageRD::multimesh_instance_set_color(RID p_multimesh, int p_in _multimesh_make_local(multimesh); { - PoolVector<float>::Write w = multimesh->data_cache.write(); + float *w = multimesh->data_cache.ptrw(); - float *dataptr = w.ptr() + p_index * multimesh->stride_cache + multimesh->color_offset_cache; + float *dataptr = w + p_index * multimesh->stride_cache + multimesh->color_offset_cache; dataptr[0] = p_color.r; dataptr[1] = p_color.g; @@ -2642,9 +2641,9 @@ void RasterizerStorageRD::multimesh_instance_set_custom_data(RID p_multimesh, in _multimesh_make_local(multimesh); { - PoolVector<float>::Write w = multimesh->data_cache.write(); + float *w = multimesh->data_cache.ptrw(); - float *dataptr = w.ptr() + p_index * multimesh->stride_cache + multimesh->custom_data_offset_cache; + float *dataptr = w + p_index * multimesh->stride_cache + multimesh->custom_data_offset_cache; dataptr[0] = p_color.r; dataptr[1] = p_color.g; @@ -2674,9 +2673,9 @@ Transform RasterizerStorageRD::multimesh_instance_get_transform(RID p_multimesh, Transform t; { - PoolVector<float>::Read r = multimesh->data_cache.read(); + const float *r = multimesh->data_cache.ptr(); - const float *dataptr = r.ptr() + p_index * multimesh->stride_cache; + const float *dataptr = r + p_index * multimesh->stride_cache; t.basis.elements[0][0] = dataptr[0]; t.basis.elements[0][1] = dataptr[1]; @@ -2705,9 +2704,9 @@ Transform2D RasterizerStorageRD::multimesh_instance_get_transform_2d(RID p_multi Transform2D t; { - PoolVector<float>::Read r = multimesh->data_cache.read(); + const float *r = multimesh->data_cache.ptr(); - const float *dataptr = r.ptr() + p_index * multimesh->stride_cache; + const float *dataptr = r + p_index * multimesh->stride_cache; t.elements[0][0] = dataptr[0]; t.elements[1][0] = dataptr[1]; @@ -2730,9 +2729,9 @@ Color RasterizerStorageRD::multimesh_instance_get_color(RID p_multimesh, int p_i Color c; { - PoolVector<float>::Read r = multimesh->data_cache.read(); + const float *r = multimesh->data_cache.ptr(); - const float *dataptr = r.ptr() + p_index * multimesh->stride_cache + multimesh->color_offset_cache; + const float *dataptr = r + p_index * multimesh->stride_cache + multimesh->color_offset_cache; c.r = dataptr[0]; c.g = dataptr[1]; @@ -2753,9 +2752,9 @@ Color RasterizerStorageRD::multimesh_instance_get_custom_data(RID p_multimesh, i Color c; { - PoolVector<float>::Read r = multimesh->data_cache.read(); + const float *r = multimesh->data_cache.ptr(); - const float *dataptr = r.ptr() + p_index * multimesh->stride_cache + multimesh->custom_data_offset_cache; + const float *dataptr = r + p_index * multimesh->stride_cache + multimesh->custom_data_offset_cache; c.r = dataptr[0]; c.g = dataptr[1]; @@ -2766,14 +2765,14 @@ Color RasterizerStorageRD::multimesh_instance_get_custom_data(RID p_multimesh, i return c; } -void RasterizerStorageRD::multimesh_set_buffer(RID p_multimesh, const PoolVector<float> &p_buffer) { +void RasterizerStorageRD::multimesh_set_buffer(RID p_multimesh, const Vector<float> &p_buffer) { MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh); ERR_FAIL_COND(!multimesh); ERR_FAIL_COND(p_buffer.size() != (multimesh->instances * (int)multimesh->stride_cache)); { - PoolVector<float>::Read r = p_buffer.read(); - RD::get_singleton()->buffer_update(multimesh->buffer, 0, p_buffer.size() * sizeof(float), r.ptr(), false); + const float *r = p_buffer.ptr(); + RD::get_singleton()->buffer_update(multimesh->buffer, 0, p_buffer.size() * sizeof(float), r, false); multimesh->buffer_set = true; } @@ -2792,30 +2791,30 @@ void RasterizerStorageRD::multimesh_set_buffer(RID p_multimesh, const PoolVector _multimesh_mark_all_dirty(multimesh, false, true); //update AABB } else if (multimesh->mesh.is_valid()) { //if we have a mesh set, we need to re-generate the AABB from the new data - PoolVector<float>::Read r = p_buffer.read(); - const float *data = r.ptr(); + const float *data = p_buffer.ptr(); + _multimesh_re_create_aabb(multimesh, data, multimesh->instances); multimesh->instance_dependency.instance_notify_changed(true, false); } } -PoolVector<float> RasterizerStorageRD::multimesh_get_buffer(RID p_multimesh) const { +Vector<float> RasterizerStorageRD::multimesh_get_buffer(RID p_multimesh) const { MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh); - ERR_FAIL_COND_V(!multimesh, PoolVector<float>()); + ERR_FAIL_COND_V(!multimesh, Vector<float>()); if (multimesh->buffer.is_null()) { - return PoolVector<float>(); + return Vector<float>(); } else if (multimesh->data_cache.size()) { return multimesh->data_cache; } else { //get from memory - PoolVector<uint8_t> buffer = RD::get_singleton()->buffer_get_data(multimesh->buffer); - PoolVector<float> ret; + Vector<uint8_t> buffer = RD::get_singleton()->buffer_get_data(multimesh->buffer); + Vector<float> ret; ret.resize(multimesh->instances); { - PoolVector<float>::Write w = multimesh->data_cache.write(); - PoolVector<uint8_t>::Read r = buffer.read(); - copymem(w.ptr(), r.ptr(), buffer.size()); + float *w = multimesh->data_cache.ptrw(); + const uint8_t *r = buffer.ptr(); + copymem(w, r, buffer.size()); } return ret; @@ -2860,8 +2859,7 @@ void RasterizerStorageRD::_update_dirty_multimeshes() { MultiMesh *multimesh = multimesh_dirty_list; if (multimesh->data_cache.size()) { //may have been cleared, so only process if it exists - PoolVector<float>::Read r = multimesh->data_cache.read(); - const float *data = r.ptr(); + const float *data = multimesh->data_cache.ptr(); uint32_t visible_instances = multimesh->visible_instances >= 0 ? multimesh->visible_instances : multimesh->instances; @@ -3552,7 +3550,7 @@ RID RasterizerStorageRD::gi_probe_create() { return gi_probe_owner.make_rid(GIProbe()); } -void RasterizerStorageRD::gi_probe_allocate(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const PoolVector<uint8_t> &p_octree_cells, const PoolVector<uint8_t> &p_data_cells, const PoolVector<uint8_t> &p_distance_field, const PoolVector<int> &p_level_counts) { +void RasterizerStorageRD::gi_probe_allocate(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const Vector<uint8_t> &p_octree_cells, const Vector<uint8_t> &p_data_cells, const Vector<uint8_t> &p_distance_field, const Vector<int> &p_level_counts) { GIProbe *gi_probe = gi_probe_owner.getornull(p_gi_probe); ERR_FAIL_COND(!gi_probe); @@ -3597,7 +3595,7 @@ void RasterizerStorageRD::gi_probe_allocate(RID p_gi_probe, const Transform &p_t tf.depth = gi_probe->octree_size.z; tf.type = RD::TEXTURE_TYPE_3D; tf.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_CAN_UPDATE_BIT | RD::TEXTURE_USAGE_CAN_COPY_FROM_BIT; - Vector<PoolVector<uint8_t> > s; + Vector<Vector<uint8_t> > s; s.push_back(p_distance_field); gi_probe->sdf_texture = RD::get_singleton()->texture_create(tf, RD::TextureView(), s); } @@ -3690,36 +3688,36 @@ Vector3i RasterizerStorageRD::gi_probe_get_octree_size(RID p_gi_probe) const { ERR_FAIL_COND_V(!gi_probe, Vector3i()); return gi_probe->octree_size; } -PoolVector<uint8_t> RasterizerStorageRD::gi_probe_get_octree_cells(RID p_gi_probe) const { +Vector<uint8_t> RasterizerStorageRD::gi_probe_get_octree_cells(RID p_gi_probe) const { GIProbe *gi_probe = gi_probe_owner.getornull(p_gi_probe); - ERR_FAIL_COND_V(!gi_probe, PoolVector<uint8_t>()); + ERR_FAIL_COND_V(!gi_probe, Vector<uint8_t>()); if (gi_probe->octree_buffer.is_valid()) { return RD::get_singleton()->buffer_get_data(gi_probe->octree_buffer); } - return PoolVector<uint8_t>(); + return Vector<uint8_t>(); } -PoolVector<uint8_t> RasterizerStorageRD::gi_probe_get_data_cells(RID p_gi_probe) const { +Vector<uint8_t> RasterizerStorageRD::gi_probe_get_data_cells(RID p_gi_probe) const { GIProbe *gi_probe = gi_probe_owner.getornull(p_gi_probe); - ERR_FAIL_COND_V(!gi_probe, PoolVector<uint8_t>()); + ERR_FAIL_COND_V(!gi_probe, Vector<uint8_t>()); if (gi_probe->data_buffer.is_valid()) { return RD::get_singleton()->buffer_get_data(gi_probe->data_buffer); } - return PoolVector<uint8_t>(); + return Vector<uint8_t>(); } -PoolVector<uint8_t> RasterizerStorageRD::gi_probe_get_distance_field(RID p_gi_probe) const { +Vector<uint8_t> RasterizerStorageRD::gi_probe_get_distance_field(RID p_gi_probe) const { GIProbe *gi_probe = gi_probe_owner.getornull(p_gi_probe); - ERR_FAIL_COND_V(!gi_probe, PoolVector<uint8_t>()); + ERR_FAIL_COND_V(!gi_probe, Vector<uint8_t>()); if (gi_probe->data_buffer.is_valid()) { return RD::get_singleton()->texture_get_data(gi_probe->sdf_texture, 0); } - return PoolVector<uint8_t>(); + return Vector<uint8_t>(); } -PoolVector<int> RasterizerStorageRD::gi_probe_get_level_counts(RID p_gi_probe) const { +Vector<int> RasterizerStorageRD::gi_probe_get_level_counts(RID p_gi_probe) const { GIProbe *gi_probe = gi_probe_owner.getornull(p_gi_probe); - ERR_FAIL_COND_V(!gi_probe, PoolVector<int>()); + ERR_FAIL_COND_V(!gi_probe, Vector<int>()); return gi_probe->level_counts; } @@ -4387,7 +4385,7 @@ bool RasterizerStorageRD::free(RID p_rid) { reflection_probe->instance_dependency.instance_notify_deleted(p_rid); reflection_probe_owner.free(p_rid); } else if (gi_probe_owner.owns(p_rid)) { - gi_probe_allocate(p_rid, Transform(), AABB(), Vector3i(), PoolVector<uint8_t>(), PoolVector<uint8_t>(), PoolVector<uint8_t>(), PoolVector<int>()); //deallocate + gi_probe_allocate(p_rid, Transform(), AABB(), Vector3i(), Vector<uint8_t>(), Vector<uint8_t>(), Vector<uint8_t>(), Vector<int>()); //deallocate GIProbe *gi_probe = gi_probe_owner.getornull(p_rid); gi_probe->instance_dependency.instance_notify_deleted(p_rid); gi_probe_owner.free(p_rid); @@ -4463,7 +4461,7 @@ RasterizerStorageRD::RasterizerStorageRD() { tformat.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_CAN_UPDATE_BIT; tformat.type = RD::TEXTURE_TYPE_2D; - PoolVector<uint8_t> pv; + Vector<uint8_t> pv; pv.resize(16 * 4); for (int i = 0; i < 16; i++) { pv.set(i * 4 + 0, 255); @@ -4473,7 +4471,7 @@ RasterizerStorageRD::RasterizerStorageRD() { } { - Vector<PoolVector<uint8_t> > vpv; + Vector<Vector<uint8_t> > vpv; vpv.push_back(pv); default_rd_textures[DEFAULT_RD_TEXTURE_WHITE] = RD::get_singleton()->texture_create(tformat, RD::TextureView(), vpv); } @@ -4486,7 +4484,7 @@ RasterizerStorageRD::RasterizerStorageRD() { } { - Vector<PoolVector<uint8_t> > vpv; + Vector<Vector<uint8_t> > vpv; vpv.push_back(pv); default_rd_textures[DEFAULT_RD_TEXTURE_BLACK] = RD::get_singleton()->texture_create(tformat, RD::TextureView(), vpv); } @@ -4499,7 +4497,7 @@ RasterizerStorageRD::RasterizerStorageRD() { } { - Vector<PoolVector<uint8_t> > vpv; + Vector<Vector<uint8_t> > vpv; vpv.push_back(pv); default_rd_textures[DEFAULT_RD_TEXTURE_NORMAL] = RD::get_singleton()->texture_create(tformat, RD::TextureView(), vpv); } @@ -4512,7 +4510,7 @@ RasterizerStorageRD::RasterizerStorageRD() { } { - Vector<PoolVector<uint8_t> > vpv; + Vector<Vector<uint8_t> > vpv; vpv.push_back(pv); default_rd_textures[DEFAULT_RD_TEXTURE_ANISO] = RD::get_singleton()->texture_create(tformat, RD::TextureView(), vpv); } @@ -4537,7 +4535,7 @@ RasterizerStorageRD::RasterizerStorageRD() { tformat.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_CAN_UPDATE_BIT; tformat.type = RD::TEXTURE_TYPE_CUBE_ARRAY; - PoolVector<uint8_t> pv; + Vector<uint8_t> pv; pv.resize(16 * 4); for (int i = 0; i < 16; i++) { pv.set(i * 4 + 0, 0); @@ -4547,7 +4545,7 @@ RasterizerStorageRD::RasterizerStorageRD() { } { - Vector<PoolVector<uint8_t> > vpv; + Vector<Vector<uint8_t> > vpv; for (int i = 0; i < 6; i++) { vpv.push_back(pv); } @@ -4565,7 +4563,7 @@ RasterizerStorageRD::RasterizerStorageRD() { tformat.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_CAN_UPDATE_BIT; tformat.type = RD::TEXTURE_TYPE_CUBE; - PoolVector<uint8_t> pv; + Vector<uint8_t> pv; pv.resize(16 * 4); for (int i = 0; i < 16; i++) { pv.set(i * 4 + 0, 0); @@ -4575,7 +4573,7 @@ RasterizerStorageRD::RasterizerStorageRD() { } { - Vector<PoolVector<uint8_t> > vpv; + Vector<Vector<uint8_t> > vpv; for (int i = 0; i < 6; i++) { vpv.push_back(pv); } @@ -4593,7 +4591,7 @@ RasterizerStorageRD::RasterizerStorageRD() { tformat.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_CAN_UPDATE_BIT; tformat.type = RD::TEXTURE_TYPE_3D; - PoolVector<uint8_t> pv; + Vector<uint8_t> pv; pv.resize(64 * 4); for (int i = 0; i < 64; i++) { pv.set(i * 4 + 0, 0); @@ -4603,7 +4601,7 @@ RasterizerStorageRD::RasterizerStorageRD() { } { - Vector<PoolVector<uint8_t> > vpv; + Vector<Vector<uint8_t> > vpv; vpv.push_back(pv); default_rd_textures[DEFAULT_RD_TEXTURE_3D_WHITE] = RD::get_singleton()->texture_create(tformat, RD::TextureView(), vpv); } @@ -4682,11 +4680,11 @@ RasterizerStorageRD::RasterizerStorageRD() { { //vertex - PoolVector<uint8_t> buffer; + Vector<uint8_t> buffer; buffer.resize(sizeof(float) * 3); { - PoolVector<uint8_t>::Write w = buffer.write(); - float *fptr = (float *)w.ptr(); + uint8_t *w = buffer.ptrw(); + float *fptr = (float *)w; fptr[0] = 0.0; fptr[1] = 0.0; fptr[2] = 0.0; @@ -4695,11 +4693,11 @@ RasterizerStorageRD::RasterizerStorageRD() { } { //normal - PoolVector<uint8_t> buffer; + Vector<uint8_t> buffer; buffer.resize(sizeof(float) * 3); { - PoolVector<uint8_t>::Write w = buffer.write(); - float *fptr = (float *)w.ptr(); + uint8_t *w = buffer.ptrw(); + float *fptr = (float *)w; fptr[0] = 1.0; fptr[1] = 0.0; fptr[2] = 0.0; @@ -4708,11 +4706,11 @@ RasterizerStorageRD::RasterizerStorageRD() { } { //tangent - PoolVector<uint8_t> buffer; + Vector<uint8_t> buffer; buffer.resize(sizeof(float) * 4); { - PoolVector<uint8_t>::Write w = buffer.write(); - float *fptr = (float *)w.ptr(); + uint8_t *w = buffer.ptrw(); + float *fptr = (float *)w; fptr[0] = 1.0; fptr[1] = 0.0; fptr[2] = 0.0; @@ -4722,11 +4720,11 @@ RasterizerStorageRD::RasterizerStorageRD() { } { //color - PoolVector<uint8_t> buffer; + Vector<uint8_t> buffer; buffer.resize(sizeof(float) * 4); { - PoolVector<uint8_t>::Write w = buffer.write(); - float *fptr = (float *)w.ptr(); + uint8_t *w = buffer.ptrw(); + float *fptr = (float *)w; fptr[0] = 1.0; fptr[1] = 1.0; fptr[2] = 1.0; @@ -4736,22 +4734,22 @@ RasterizerStorageRD::RasterizerStorageRD() { } { //tex uv 1 - PoolVector<uint8_t> buffer; + Vector<uint8_t> buffer; buffer.resize(sizeof(float) * 2); { - PoolVector<uint8_t>::Write w = buffer.write(); - float *fptr = (float *)w.ptr(); + uint8_t *w = buffer.ptrw(); + float *fptr = (float *)w; fptr[0] = 0.0; fptr[1] = 0.0; } mesh_default_rd_buffers[DEFAULT_RD_BUFFER_TEX_UV] = RD::get_singleton()->vertex_buffer_create(buffer.size(), buffer); } { //tex uv 2 - PoolVector<uint8_t> buffer; + Vector<uint8_t> buffer; buffer.resize(sizeof(float) * 2); { - PoolVector<uint8_t>::Write w = buffer.write(); - float *fptr = (float *)w.ptr(); + uint8_t *w = buffer.ptrw(); + float *fptr = (float *)w; fptr[0] = 0.0; fptr[1] = 0.0; } @@ -4759,11 +4757,11 @@ RasterizerStorageRD::RasterizerStorageRD() { } { //bones - PoolVector<uint8_t> buffer; + Vector<uint8_t> buffer; buffer.resize(sizeof(uint32_t) * 4); { - PoolVector<uint8_t>::Write w = buffer.write(); - uint32_t *fptr = (uint32_t *)w.ptr(); + uint8_t *w = buffer.ptrw(); + uint32_t *fptr = (uint32_t *)w; fptr[0] = 0; fptr[1] = 0; fptr[2] = 0; @@ -4773,11 +4771,11 @@ RasterizerStorageRD::RasterizerStorageRD() { } { //weights - PoolVector<uint8_t> buffer; + Vector<uint8_t> buffer; buffer.resize(sizeof(float) * 4); { - PoolVector<uint8_t>::Write w = buffer.write(); - float *fptr = (float *)w.ptr(); + uint8_t *w = buffer.ptrw(); + float *fptr = (float *)w; fptr[0] = 0.0; fptr[1] = 0.0; fptr[2] = 0.0; diff --git a/servers/visual/rasterizer_rd/rasterizer_storage_rd.h b/servers/visual/rasterizer_rd/rasterizer_storage_rd.h index 055737d65d..48097ffaac 100644 --- a/servers/visual/rasterizer_rd/rasterizer_storage_rd.h +++ b/servers/visual/rasterizer_rd/rasterizer_storage_rd.h @@ -306,7 +306,7 @@ private: uint32_t color_offset_cache = 0; uint32_t custom_data_offset_cache = 0; - PoolVector<float> data_cache; //used if individual setting is used + Vector<float> data_cache; //used if individual setting is used bool *data_cache_dirty_regions = nullptr; uint32_t data_cache_used_dirty_regions = 0; @@ -413,7 +413,7 @@ private: uint32_t octree_buffer_size = 0; uint32_t data_buffer_size = 0; - PoolVector<int> level_counts; + Vector<int> level_counts; int cell_count = 0; @@ -621,7 +621,7 @@ public: virtual void mesh_set_blend_shape_mode(RID p_mesh, VS::BlendShapeMode p_mode); virtual VS::BlendShapeMode mesh_get_blend_shape_mode(RID p_mesh) const; - virtual void mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const PoolVector<uint8_t> &p_data); + virtual void mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const Vector<uint8_t> &p_data); virtual void mesh_surface_set_material(RID p_mesh, int p_surface, RID p_material); virtual RID mesh_surface_get_material(RID p_mesh, int p_surface) const; @@ -747,8 +747,8 @@ public: Color multimesh_instance_get_color(RID p_multimesh, int p_index) const; Color multimesh_instance_get_custom_data(RID p_multimesh, int p_index) const; - void multimesh_set_buffer(RID p_multimesh, const PoolVector<float> &p_buffer); - PoolVector<float> multimesh_get_buffer(RID p_multimesh) const; + void multimesh_set_buffer(RID p_multimesh, const Vector<float> &p_buffer); + Vector<float> multimesh_get_buffer(RID p_multimesh) const; void multimesh_set_visible_instances(RID p_multimesh, int p_visible); int multimesh_get_visible_instances(RID p_multimesh) const; @@ -969,15 +969,15 @@ public: RID gi_probe_create(); - void gi_probe_allocate(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const PoolVector<uint8_t> &p_octree_cells, const PoolVector<uint8_t> &p_data_cells, const PoolVector<uint8_t> &p_distance_field, const PoolVector<int> &p_level_counts); + void gi_probe_allocate(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const Vector<uint8_t> &p_octree_cells, const Vector<uint8_t> &p_data_cells, const Vector<uint8_t> &p_distance_field, const Vector<int> &p_level_counts); AABB gi_probe_get_bounds(RID p_gi_probe) const; Vector3i gi_probe_get_octree_size(RID p_gi_probe) const; - PoolVector<uint8_t> gi_probe_get_octree_cells(RID p_gi_probe) const; - PoolVector<uint8_t> gi_probe_get_data_cells(RID p_gi_probe) const; - PoolVector<uint8_t> gi_probe_get_distance_field(RID p_gi_probe) const; + Vector<uint8_t> gi_probe_get_octree_cells(RID p_gi_probe) const; + Vector<uint8_t> gi_probe_get_data_cells(RID p_gi_probe) const; + Vector<uint8_t> gi_probe_get_distance_field(RID p_gi_probe) const; - PoolVector<int> gi_probe_get_level_counts(RID p_gi_probe) const; + Vector<int> gi_probe_get_level_counts(RID p_gi_probe) const; Transform gi_probe_get_to_cell_xform(RID p_gi_probe) const; void gi_probe_set_dynamic_range(RID p_gi_probe, float p_range); @@ -1022,12 +1022,12 @@ public: void lightmap_capture_set_bounds(RID p_capture, const AABB &p_bounds) {} AABB lightmap_capture_get_bounds(RID p_capture) const { return AABB(); } - void lightmap_capture_set_octree(RID p_capture, const PoolVector<uint8_t> &p_octree) {} + void lightmap_capture_set_octree(RID p_capture, const Vector<uint8_t> &p_octree) {} RID lightmap_capture_create() { return RID(); } - PoolVector<uint8_t> lightmap_capture_get_octree(RID p_capture) const { - return PoolVector<uint8_t>(); + Vector<uint8_t> lightmap_capture_get_octree(RID p_capture) const { + return Vector<uint8_t>(); } void lightmap_capture_set_octree_cell_transform(RID p_capture, const Transform &p_xform) {} Transform lightmap_capture_get_octree_cell_transform(RID p_capture) const { return Transform(); } @@ -1035,7 +1035,7 @@ public: int lightmap_capture_get_octree_cell_subdiv(RID p_capture) const { return 0; } void lightmap_capture_set_energy(RID p_capture, float p_energy) {} float lightmap_capture_get_energy(RID p_capture) const { return 0.0; } - const PoolVector<LightmapCaptureOctree> *lightmap_capture_get_octree_ptr(RID p_capture) const { + const Vector<LightmapCaptureOctree> *lightmap_capture_get_octree_ptr(RID p_capture) const { return NULL; } diff --git a/servers/visual/rendering_device.cpp b/servers/visual/rendering_device.cpp index d7c88d5671..3c1795161d 100644 --- a/servers/visual/rendering_device.cpp +++ b/servers/visual/rendering_device.cpp @@ -46,15 +46,15 @@ void RenderingDevice::shader_set_cache_function(ShaderCacheFunction p_function) cache_function = p_function; } -PoolVector<uint8_t> RenderingDevice::shader_compile_from_source(ShaderStage p_stage, const String &p_source_code, ShaderLanguage p_language, String *r_error, bool p_allow_cache) { +Vector<uint8_t> RenderingDevice::shader_compile_from_source(ShaderStage p_stage, const String &p_source_code, ShaderLanguage p_language, String *r_error, bool p_allow_cache) { if (p_allow_cache && cache_function) { - PoolVector<uint8_t> cache = cache_function(p_stage, p_source_code, p_language); + Vector<uint8_t> cache = cache_function(p_stage, p_source_code, p_language); if (cache.size()) { return cache; } } - ERR_FAIL_COND_V(!compile_function, PoolVector<uint8_t>()); + ERR_FAIL_COND_V(!compile_function, Vector<uint8_t>()); return compile_function(p_stage, p_source_code, p_language, r_error); } diff --git a/servers/visual/rendering_device.h b/servers/visual/rendering_device.h index d7b13a739c..c3b937d5e2 100644 --- a/servers/visual/rendering_device.h +++ b/servers/visual/rendering_device.h @@ -55,8 +55,8 @@ public: SHADER_LANGUAGE_HLSL }; - typedef PoolVector<uint8_t> (*ShaderCompileFunction)(ShaderStage p_stage, const String &p_source_code, ShaderLanguage p_language, String *r_error); - typedef PoolVector<uint8_t> (*ShaderCacheFunction)(ShaderStage p_stage, const String &p_source_code, ShaderLanguage p_language); + typedef Vector<uint8_t> (*ShaderCompileFunction)(ShaderStage p_stage, const String &p_source_code, ShaderLanguage p_language, String *r_error); + typedef Vector<uint8_t> (*ShaderCacheFunction)(ShaderStage p_stage, const String &p_source_code, ShaderLanguage p_language); private: static ShaderCompileFunction compile_function; @@ -407,7 +407,7 @@ public: } }; - virtual RID texture_create(const TextureFormat &p_format, const TextureView &p_view, const Vector<PoolVector<uint8_t> > &p_data = Vector<PoolVector<uint8_t> >()) = 0; + virtual RID texture_create(const TextureFormat &p_format, const TextureView &p_view, const Vector<Vector<uint8_t> > &p_data = Vector<Vector<uint8_t> >()) = 0; virtual RID texture_create_shared(const TextureView &p_view, RID p_with_texture) = 0; enum TextureSliceType { @@ -418,8 +418,8 @@ public: virtual RID texture_create_shared_from_slice(const TextureView &p_view, RID p_with_texture, uint32_t p_layer, uint32_t p_mipmap, TextureSliceType p_slice_type = TEXTURE_SLICE_2D) = 0; - virtual Error texture_update(RID p_texture, uint32_t p_layer, const PoolVector<uint8_t> &p_data, bool p_sync_with_draw = false) = 0; //this function can be used from any thread and it takes effect at the begining of the frame, unless sync with draw is used, which is used to mix updates with draw calls - virtual PoolVector<uint8_t> texture_get_data(RID p_texture, uint32_t p_layer) = 0; // CPU textures will return immediately, while GPU textures will most likely force a flush + virtual Error texture_update(RID p_texture, uint32_t p_layer, const Vector<uint8_t> &p_data, bool p_sync_with_draw = false) = 0; //this function can be used from any thread and it takes effect at the begining of the frame, unless sync with draw is used, which is used to mix updates with draw calls + virtual Vector<uint8_t> texture_get_data(RID p_texture, uint32_t p_layer) = 0; // CPU textures will return immediately, while GPU textures will most likely force a flush virtual bool texture_is_format_supported_for_usage(DataFormat p_format, uint32_t p_usage) const = 0; virtual bool texture_is_shared(RID p_texture) = 0; @@ -542,7 +542,7 @@ public: frequency = VERTEX_FREQUENCY_VERTEX; } }; - virtual RID vertex_buffer_create(uint32_t p_size_bytes, const PoolVector<uint8_t> &p_data = PoolVector<uint8_t>()) = 0; + virtual RID vertex_buffer_create(uint32_t p_size_bytes, const Vector<uint8_t> &p_data = Vector<uint8_t>()) = 0; typedef int64_t VertexFormatID; @@ -555,21 +555,21 @@ public: INDEX_BUFFER_FORMAT_UINT32, }; - virtual RID index_buffer_create(uint32_t p_size_indices, IndexBufferFormat p_format, const PoolVector<uint8_t> &p_data = PoolVector<uint8_t>(), bool p_use_restart_indices = false) = 0; + virtual RID index_buffer_create(uint32_t p_size_indices, IndexBufferFormat p_format, const Vector<uint8_t> &p_data = Vector<uint8_t>(), bool p_use_restart_indices = false) = 0; virtual RID index_array_create(RID p_index_buffer, uint32_t p_index_offset, uint32_t p_index_count) = 0; /****************/ /**** SHADER ****/ /****************/ - virtual PoolVector<uint8_t> shader_compile_from_source(ShaderStage p_stage, const String &p_source_code, ShaderLanguage p_language = SHADER_LANGUAGE_GLSL, String *r_error = NULL, bool p_allow_cache = true); + virtual Vector<uint8_t> shader_compile_from_source(ShaderStage p_stage, const String &p_source_code, ShaderLanguage p_language = SHADER_LANGUAGE_GLSL, String *r_error = NULL, bool p_allow_cache = true); static void shader_set_compile_function(ShaderCompileFunction p_function); static void shader_set_cache_function(ShaderCacheFunction p_function); struct ShaderStageData { ShaderStage shader_stage; - PoolVector<uint8_t> spir_v; + Vector<uint8_t> spir_v; ShaderStageData() { shader_stage = SHADER_STAGE_VERTEX; @@ -597,9 +597,9 @@ public: UNIFORM_TYPE_MAX }; - virtual RID uniform_buffer_create(uint32_t p_size_bytes, const PoolVector<uint8_t> &p_data = PoolVector<uint8_t>()) = 0; - virtual RID storage_buffer_create(uint32_t p_size, const PoolVector<uint8_t> &p_data = PoolVector<uint8_t>()) = 0; - virtual RID texture_buffer_create(uint32_t p_size_elements, DataFormat p_format, const PoolVector<uint8_t> &p_data = PoolVector<uint8_t>()) = 0; + virtual RID uniform_buffer_create(uint32_t p_size_bytes, const Vector<uint8_t> &p_data = Vector<uint8_t>()) = 0; + virtual RID storage_buffer_create(uint32_t p_size, const Vector<uint8_t> &p_data = Vector<uint8_t>()) = 0; + virtual RID texture_buffer_create(uint32_t p_size_elements, DataFormat p_format, const Vector<uint8_t> &p_data = Vector<uint8_t>()) = 0; struct Uniform { UniformType type; @@ -622,7 +622,7 @@ public: virtual bool uniform_set_is_valid(RID p_uniform_set) = 0; virtual Error buffer_update(RID p_buffer, uint32_t p_offset, uint32_t p_size, const void *p_data, bool p_sync_with_draw = false) = 0; //this function can be used from any thread and it takes effect at the begining of the frame, unless sync with draw is used, which is used to mix updates with draw calls - virtual PoolVector<uint8_t> buffer_get_data(RID p_buffer) = 0; //this causes stall, only use to retrieve large buffers for saving + virtual Vector<uint8_t> buffer_get_data(RID p_buffer) = 0; //this causes stall, only use to retrieve large buffers for saving /*************************/ /**** RENDER PIPELINE ****/ diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp index a7c18f184d..438ec2079c 100644 --- a/servers/visual/shader_language.cpp +++ b/servers/visual/shader_language.cpp @@ -2657,7 +2657,7 @@ PropertyInfo ShaderLanguage::uniform_to_property_info(const ShaderNode::Uniform case ShaderLanguage::TYPE_UVEC3: case ShaderLanguage::TYPE_UVEC4: { - pi.type = Variant::POOL_INT_ARRAY; + pi.type = Variant::PACKED_INT_ARRAY; } break; case ShaderLanguage::TYPE_FLOAT: { pi.type = Variant::REAL; diff --git a/servers/visual/visual_server_canvas.cpp b/servers/visual/visual_server_canvas.cpp index 69f843eb4b..c1833fea44 100644 --- a/servers/visual/visual_server_canvas.cpp +++ b/servers/visual/visual_server_canvas.cpp @@ -1265,20 +1265,20 @@ RID VisualServerCanvas::canvas_occluder_polygon_create() { occluder_poly->occluder = VSG::canvas_render->occluder_polygon_create(); return canvas_light_occluder_polygon_owner.make_rid(occluder_poly); } -void VisualServerCanvas::canvas_occluder_polygon_set_shape(RID p_occluder_polygon, const PoolVector<Vector2> &p_shape, bool p_closed) { +void VisualServerCanvas::canvas_occluder_polygon_set_shape(RID p_occluder_polygon, const Vector<Vector2> &p_shape, bool p_closed) { if (p_shape.size() < 3) { canvas_occluder_polygon_set_shape_as_lines(p_occluder_polygon, p_shape); return; } - PoolVector<Vector2> lines; + Vector<Vector2> lines; int lc = p_shape.size() * 2; lines.resize(lc - (p_closed ? 0 : 2)); { - PoolVector<Vector2>::Write w = lines.write(); - PoolVector<Vector2>::Read r = p_shape.read(); + Vector2 *w = lines.ptrw(); + const Vector2 *r = p_shape.ptr(); int max = lc / 2; if (!p_closed) { @@ -1295,7 +1295,7 @@ void VisualServerCanvas::canvas_occluder_polygon_set_shape(RID p_occluder_polygo canvas_occluder_polygon_set_shape_as_lines(p_occluder_polygon, lines); } -void VisualServerCanvas::canvas_occluder_polygon_set_shape_as_lines(RID p_occluder_polygon, const PoolVector<Vector2> &p_shape) { +void VisualServerCanvas::canvas_occluder_polygon_set_shape_as_lines(RID p_occluder_polygon, const Vector<Vector2> &p_shape) { LightOccluderPolygon *occluder_poly = canvas_light_occluder_polygon_owner.getornull(p_occluder_polygon); ERR_FAIL_COND(!occluder_poly); @@ -1304,7 +1304,7 @@ void VisualServerCanvas::canvas_occluder_polygon_set_shape_as_lines(RID p_occlud int lc = p_shape.size(); occluder_poly->aabb = Rect2(); { - PoolVector<Vector2>::Read r = p_shape.read(); + const Vector2 *r = p_shape.ptr(); for (int i = 0; i < lc; i++) { if (i == 0) occluder_poly->aabb.position = r[i]; diff --git a/servers/visual/visual_server_canvas.h b/servers/visual/visual_server_canvas.h index c120a90314..dea4183752 100644 --- a/servers/visual/visual_server_canvas.h +++ b/servers/visual/visual_server_canvas.h @@ -257,8 +257,8 @@ public: void canvas_light_occluder_set_light_mask(RID p_occluder, int p_mask); RID canvas_occluder_polygon_create(); - void canvas_occluder_polygon_set_shape(RID p_occluder_polygon, const PoolVector<Vector2> &p_shape, bool p_closed); - void canvas_occluder_polygon_set_shape_as_lines(RID p_occluder_polygon, const PoolVector<Vector2> &p_shape); + void canvas_occluder_polygon_set_shape(RID p_occluder_polygon, const Vector<Vector2> &p_shape, bool p_closed); + void canvas_occluder_polygon_set_shape_as_lines(RID p_occluder_polygon, const Vector<Vector2> &p_shape); void canvas_occluder_polygon_set_cull_mode(RID p_occluder_polygon, VS::CanvasOccluderPolygonCullMode p_mode); diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h index 297f0727a0..4fea6082f4 100644 --- a/servers/visual/visual_server_raster.h +++ b/servers/visual/visual_server_raster.h @@ -233,7 +233,7 @@ public: BIND2(mesh_set_blend_shape_mode, RID, BlendShapeMode) BIND1RC(BlendShapeMode, mesh_get_blend_shape_mode, RID) - BIND4(mesh_surface_update_region, RID, int, int, const PoolVector<uint8_t> &) + BIND4(mesh_surface_update_region, RID, int, int, const Vector<uint8_t> &) BIND3(mesh_surface_set_material, RID, int, RID) BIND2RC(RID, mesh_surface_get_material, RID, int) @@ -268,8 +268,8 @@ public: BIND2RC(Color, multimesh_instance_get_color, RID, int) BIND2RC(Color, multimesh_instance_get_custom_data, RID, int) - BIND2(multimesh_set_buffer, RID, const PoolVector<float> &) - BIND1RC(PoolVector<float>, multimesh_get_buffer, RID) + BIND2(multimesh_set_buffer, RID, const Vector<float> &) + BIND1RC(Vector<float>, multimesh_get_buffer, RID) BIND2(multimesh_set_visible_instances, RID, int) BIND1RC(int, multimesh_get_visible_instances, RID) @@ -344,14 +344,14 @@ public: BIND0R(RID, gi_probe_create) - BIND8(gi_probe_allocate, RID, const Transform &, const AABB &, const Vector3i &, const PoolVector<uint8_t> &, const PoolVector<uint8_t> &, const PoolVector<uint8_t> &, const PoolVector<int> &) + BIND8(gi_probe_allocate, RID, const Transform &, const AABB &, const Vector3i &, const Vector<uint8_t> &, const Vector<uint8_t> &, const Vector<uint8_t> &, const Vector<int> &) BIND1RC(AABB, gi_probe_get_bounds, RID) BIND1RC(Vector3i, gi_probe_get_octree_size, RID) - BIND1RC(PoolVector<uint8_t>, gi_probe_get_octree_cells, RID) - BIND1RC(PoolVector<uint8_t>, gi_probe_get_data_cells, RID) - BIND1RC(PoolVector<uint8_t>, gi_probe_get_distance_field, RID) - BIND1RC(PoolVector<int>, gi_probe_get_level_counts, RID) + BIND1RC(Vector<uint8_t>, gi_probe_get_octree_cells, RID) + BIND1RC(Vector<uint8_t>, gi_probe_get_data_cells, RID) + BIND1RC(Vector<uint8_t>, gi_probe_get_distance_field, RID) + BIND1RC(Vector<int>, gi_probe_get_level_counts, RID) BIND1RC(Transform, gi_probe_get_to_cell_xform, RID) BIND2(gi_probe_set_dynamic_range, RID, float) @@ -391,8 +391,8 @@ public: BIND2(lightmap_capture_set_bounds, RID, const AABB &) BIND1RC(AABB, lightmap_capture_get_bounds, RID) - BIND2(lightmap_capture_set_octree, RID, const PoolVector<uint8_t> &) - BIND1RC(PoolVector<uint8_t>, lightmap_capture_get_octree, RID) + BIND2(lightmap_capture_set_octree, RID, const Vector<uint8_t> &) + BIND1RC(Vector<uint8_t>, lightmap_capture_get_octree, RID) BIND2(lightmap_capture_set_octree_cell_transform, RID, const Transform &) BIND1RC(Transform, lightmap_capture_get_octree_cell_transform, RID) @@ -686,8 +686,8 @@ public: BIND2(canvas_light_occluder_set_light_mask, RID, int) BIND0R(RID, canvas_occluder_polygon_create) - BIND3(canvas_occluder_polygon_set_shape, RID, const PoolVector<Vector2> &, bool) - BIND2(canvas_occluder_polygon_set_shape_as_lines, RID, const PoolVector<Vector2> &) + BIND3(canvas_occluder_polygon_set_shape, RID, const Vector<Vector2> &, bool) + BIND2(canvas_occluder_polygon_set_shape_as_lines, RID, const Vector<Vector2> &) BIND2(canvas_occluder_polygon_set_cull_mode, RID, CanvasOccluderPolygonCullMode) diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp index 61c885cba3..1a9ecae23a 100644 --- a/servers/visual/visual_server_scene.cpp +++ b/servers/visual/visual_server_scene.cpp @@ -1313,7 +1313,7 @@ void VisualServerScene::_update_instance_lightmap_captures(Instance *p_instance) //this could use some sort of blending.. for (List<Instance *>::Element *E = geom->lightmap_captures.front(); E; E = E->next()) { - const PoolVector<RasterizerStorage::LightmapCaptureOctree> *octree = VSG::storage->lightmap_capture_get_octree_ptr(E->get()->base); + const Vector<RasterizerStorage::LightmapCaptureOctree> *octree = VSG::storage->lightmap_capture_get_octree_ptr(E->get()->base); //print_line("octree size: " + itos(octree->size())); if (octree->size() == 0) continue; @@ -1321,14 +1321,14 @@ void VisualServerScene::_update_instance_lightmap_captures(Instance *p_instance) int cell_subdiv = VSG::storage->lightmap_capture_get_octree_cell_subdiv(E->get()->base); to_cell_xform = to_cell_xform * E->get()->transform.affine_inverse(); - PoolVector<RasterizerStorage::LightmapCaptureOctree>::Read octree_r = octree->read(); + const RasterizerStorage::LightmapCaptureOctree *octree_r = octree->ptr(); Vector3 pos = to_cell_xform.xform(p_instance->transform.origin); for (int i = 0; i < 12; i++) { Vector3 dir = to_cell_xform.basis.xform(cone_traces[i]).normalized(); - Color capture = _light_capture_voxel_cone_trace(octree_r.ptr(), pos, dir, cone_aperture, cell_subdiv); + Color capture = _light_capture_voxel_cone_trace(octree_r, pos, dir, cone_aperture, cell_subdiv); p_instance->lightmap_capture_data.write[i] += capture; } } diff --git a/servers/visual/visual_server_wrap_mt.h b/servers/visual/visual_server_wrap_mt.h index 3ed3728757..9d5281b17a 100644 --- a/servers/visual/visual_server_wrap_mt.h +++ b/servers/visual/visual_server_wrap_mt.h @@ -157,7 +157,7 @@ public: FUNC2(mesh_set_blend_shape_mode, RID, BlendShapeMode) FUNC1RC(BlendShapeMode, mesh_get_blend_shape_mode, RID) - FUNC4(mesh_surface_update_region, RID, int, int, const PoolVector<uint8_t> &) + FUNC4(mesh_surface_update_region, RID, int, int, const Vector<uint8_t> &) FUNC3(mesh_surface_set_material, RID, int, RID) FUNC2RC(RID, mesh_surface_get_material, RID, int) @@ -192,8 +192,8 @@ public: FUNC2RC(Color, multimesh_instance_get_color, RID, int) FUNC2RC(Color, multimesh_instance_get_custom_data, RID, int) - FUNC2(multimesh_set_buffer, RID, const PoolVector<float> &) - FUNC1RC(PoolVector<float>, multimesh_get_buffer, RID) + FUNC2(multimesh_set_buffer, RID, const Vector<float> &) + FUNC1RC(Vector<float>, multimesh_get_buffer, RID) FUNC2(multimesh_set_visible_instances, RID, int) FUNC1RC(int, multimesh_get_visible_instances, RID) @@ -268,14 +268,14 @@ public: FUNCRID(gi_probe) - FUNC8(gi_probe_allocate, RID, const Transform &, const AABB &, const Vector3i &, const PoolVector<uint8_t> &, const PoolVector<uint8_t> &, const PoolVector<uint8_t> &, const PoolVector<int> &) + FUNC8(gi_probe_allocate, RID, const Transform &, const AABB &, const Vector3i &, const Vector<uint8_t> &, const Vector<uint8_t> &, const Vector<uint8_t> &, const Vector<int> &) FUNC1RC(AABB, gi_probe_get_bounds, RID) FUNC1RC(Vector3i, gi_probe_get_octree_size, RID) - FUNC1RC(PoolVector<uint8_t>, gi_probe_get_octree_cells, RID) - FUNC1RC(PoolVector<uint8_t>, gi_probe_get_data_cells, RID) - FUNC1RC(PoolVector<uint8_t>, gi_probe_get_distance_field, RID) - FUNC1RC(PoolVector<int>, gi_probe_get_level_counts, RID) + FUNC1RC(Vector<uint8_t>, gi_probe_get_octree_cells, RID) + FUNC1RC(Vector<uint8_t>, gi_probe_get_data_cells, RID) + FUNC1RC(Vector<uint8_t>, gi_probe_get_distance_field, RID) + FUNC1RC(Vector<int>, gi_probe_get_level_counts, RID) FUNC1RC(Transform, gi_probe_get_to_cell_xform, RID) FUNC2(gi_probe_set_dynamic_range, RID, float) @@ -315,8 +315,8 @@ public: FUNC2(lightmap_capture_set_bounds, RID, const AABB &) FUNC1RC(AABB, lightmap_capture_get_bounds, RID) - FUNC2(lightmap_capture_set_octree, RID, const PoolVector<uint8_t> &) - FUNC1RC(PoolVector<uint8_t>, lightmap_capture_get_octree, RID) + FUNC2(lightmap_capture_set_octree, RID, const Vector<uint8_t> &) + FUNC1RC(Vector<uint8_t>, lightmap_capture_get_octree, RID) FUNC2(lightmap_capture_set_octree_cell_transform, RID, const Transform &) FUNC1RC(Transform, lightmap_capture_get_octree_cell_transform, RID) FUNC2(lightmap_capture_set_octree_cell_subdiv, RID, int) @@ -590,8 +590,8 @@ public: FUNC2(canvas_light_occluder_set_light_mask, RID, int) FUNCRID(canvas_occluder_polygon) - FUNC3(canvas_occluder_polygon_set_shape, RID, const PoolVector<Vector2> &, bool) - FUNC2(canvas_occluder_polygon_set_shape_as_lines, RID, const PoolVector<Vector2> &) + FUNC3(canvas_occluder_polygon_set_shape, RID, const Vector<Vector2> &, bool) + FUNC2(canvas_occluder_polygon_set_shape_as_lines, RID, const Vector<Vector2> &) FUNC2(canvas_occluder_polygon_set_cull_mode, RID, CanvasOccluderPolygonCullMode) |