What happened?
EdgeVisibilityPipelineStage.createQuadEdgeGeometry creates a VertexArray for EXT_mesh_primitive_edge_visibility rendering, but it is never pushed to model._pipelineResources, so destroyPipelineResources() appears to never free it. This is unlike what happens to the main geometry VA, pick IDs, and wireframe buffers.
In theory, a draw-command rebuild will orphan the previous copy; model destroy doesn't free it either. Edge geometry can be somewhat large, so such situations could strand a sizeable amount of GPU memory.
Possible fix: push edgeGeometry.vertexArray into model._pipelineResources in EdgeVisibilityPipelineStage, and confirm VertexArray.destroy() destroys the explicitly-created child buffers.
Reproduction steps
- Load a 3D Tiles tileset using
EXT_mesh_primitive_edge_visibility with edgeDisplayMode = SURFACES_AND_EDGES.
- Instrument
WebGL2RenderingContext.prototype.createBuffer/deleteBuffer to count live buffers.
- Repeatedly trigger a draw-command rebuild, e.g. toggle
tileset.customShader.
- Observe: live buffer count grows per rebuild and is never released;
deleteBuffer is never called for edge geometry.
Sandcastle example
No response
Environment
Browser: All
CesiumJS Version: Latest (main)
Operating System: All
AI acknowledgment
What happened?
EdgeVisibilityPipelineStage.createQuadEdgeGeometrycreates aVertexArrayforEXT_mesh_primitive_edge_visibilityrendering, but it is never pushed tomodel._pipelineResources, sodestroyPipelineResources()appears to never free it. This is unlike what happens to the main geometry VA, pick IDs, and wireframe buffers.In theory, a draw-command rebuild will orphan the previous copy; model destroy doesn't free it either. Edge geometry can be somewhat large, so such situations could strand a sizeable amount of GPU memory.
Possible fix: push
edgeGeometry.vertexArrayintomodel._pipelineResourcesinEdgeVisibilityPipelineStage, and confirmVertexArray.destroy()destroys the explicitly-created child buffers.Reproduction steps
EXT_mesh_primitive_edge_visibilitywithedgeDisplayMode = SURFACES_AND_EDGES.WebGL2RenderingContext.prototype.createBuffer/deleteBufferto count live buffers.tileset.customShader.deleteBufferis never called for edge geometry.Sandcastle example
No response
Environment
Browser: All
CesiumJS Version: Latest (main)
Operating System: All
AI acknowledgment