OverviewFilesCommitsIssuesDocsReleasesPeers

dc-terrain commits / 2db9172

atlas: free the textures in cleanup, and CONFIRM the path runs
The first real session reported WARNING: 1 RID of type "Texture" was leaked. at: finalize (servers/rendering/rendering_device.cpp:9137) cleanup() frees every buffer but knew nothing about textures, because until the previous commit dc-terrain created none. Both atlas RIDs are freed now. ⚠ AND THAT WARNING IS THE VERIFICATION THE PREVIOUS COMMIT SAID IT LACKED. dc-terrain created NO textures before it, so a leaked Texture RID can only be the atlas: the code executes. The same log shows no uniform_set_create failure and chunks meshing, uploading and colliding normally throughout, so binding 14 is live and the density path is unaffected — which was the risk that commit flagged (a failed set makes every dispatch read nothing and looks like a wrong field rather than an error). I had been grepping a different log and reported the path unexecuted twice. The evidence was in the session's own output.
2db917230d690531d26b19555ba80fb154e99be8
by plankatron <fleeky@gmail.com> · 2026-09-02T17:52:42.000Z

Changed files (1) +8 -0

src/dc_compute.cpp +8 -0
……@@ -188,6 +188,14 @@ void DCCompute::cleanup() {
188188 // The custom data outlives stride changes by design (see _destroy_buffers),
189189 // so this is the only place it is released.
190190 if (custom_data_buf_.is_valid()) { rd_->free_rid(custom_data_buf_); custom_data_buf_ = RID(); custom_data_n_ = 0; }
191 // The atlas pair. Textures are RIDs like any buffer and cleanup() did not
192 // free them — the first real run reported
193 // WARNING: 1 RID of type "Texture" was leaked.
194 // which is also how we learned the atlas path executes at all, since
195 // dc-terrain created no textures before it.
196 if (atlas_tex_.is_valid()) { rd_->free_rid(atlas_tex_); atlas_tex_ = RID(); }
197 if (atlas_staging_.is_valid()) { rd_->free_rid(atlas_staging_); atlas_staging_ = RID(); }
198 atlas_w_ = 0; atlas_h_ = 0;
191199
192200 if (pipeline_.is_valid()) {
193201 rd_->free_rid(pipeline_);