Merge pull request #55673 from lawnjelly/rids_34_rasterizersync

This commit is contained in:
Rémi Verschelde 2021-12-07 09:14:07 +01:00 committed by GitHub
commit 5a06859bd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 15 deletions

View File

@ -535,6 +535,7 @@ RasterizerGLES2::RasterizerGLES2() {
}
RasterizerGLES2::~RasterizerGLES2() {
memdelete(storage);
memdelete(scene);
memdelete(canvas);
memdelete(storage);
}

View File

@ -396,7 +396,7 @@ void RasterizerCanvasGLES3::_legacy_canvas_render_item(Item *p_ci, RenderItemSta
}
}
glBindBufferBase(GL_UNIFORM_BUFFER, 1, static_cast<LightInternal *>(light->light_internal.get_data())->ubo);
glBindBufferBase(GL_UNIFORM_BUFFER, 1, static_cast<LightInternal *>(light_internal_owner.get(light->light_internal))->ubo);
if (has_shadow) {
RasterizerStorageGLES3::CanvasLightShadow *cls = storage->canvas_light_shadow_owner.get(light->shadow_buffer);
@ -1500,7 +1500,7 @@ void RasterizerCanvasGLES3::render_joined_item(const BItemJoined &p_bij, RenderI
}
}
glBindBufferBase(GL_UNIFORM_BUFFER, 1, static_cast<LightInternal *>(light->light_internal.get_data())->ubo);
glBindBufferBase(GL_UNIFORM_BUFFER, 1, static_cast<LightInternal *>(light_internal_owner.get(light->light_internal))->ubo);
if (has_shadow) {
RasterizerStorageGLES3::CanvasLightShadow *cls = storage->canvas_light_shadow_owner.get(light->shadow_buffer);

View File

@ -490,7 +490,7 @@ RasterizerGLES3::RasterizerGLES3() {
}
RasterizerGLES3::~RasterizerGLES3() {
memdelete(storage);
memdelete(canvas);
memdelete(scene);
memdelete(canvas);
memdelete(storage);
}

View File

@ -5256,18 +5256,18 @@ RasterizerSceneGLES3::RasterizerSceneGLES3() {
}
RasterizerSceneGLES3::~RasterizerSceneGLES3() {
memdelete(default_material.get_data());
memdelete(default_material_twosided.get_data());
memdelete(default_shader.get_data());
memdelete(default_shader_twosided.get_data());
memdelete(storage->material_owner.getptr(default_material));
memdelete(storage->material_owner.getptr(default_material_twosided));
memdelete(storage->shader_owner.getptr(default_shader));
memdelete(storage->shader_owner.getptr(default_shader_twosided));
memdelete(default_worldcoord_material.get_data());
memdelete(default_worldcoord_material_twosided.get_data());
memdelete(default_worldcoord_shader.get_data());
memdelete(default_worldcoord_shader_twosided.get_data());
memdelete(storage->material_owner.getptr(default_worldcoord_material));
memdelete(storage->material_owner.getptr(default_worldcoord_material_twosided));
memdelete(storage->shader_owner.getptr(default_worldcoord_shader));
memdelete(storage->shader_owner.getptr(default_worldcoord_shader_twosided));
memdelete(default_overdraw_material.get_data());
memdelete(default_overdraw_shader.get_data());
memdelete(storage->material_owner.getptr(default_overdraw_material));
memdelete(storage->shader_owner.getptr(default_overdraw_shader));
memfree(state.spot_array_tmp);
memfree(state.omni_array_tmp);