Skip to content

fix: Add geometry quarantine to BuildingRenderer and GameOverlay#1122

Merged
braedonsaunders merged 1 commit into
mainfrom
claude/fix-gpu-buffer-error-CTkjb
Jan 30, 2026
Merged

fix: Add geometry quarantine to BuildingRenderer and GameOverlay#1122
braedonsaunders merged 1 commit into
mainfrom
claude/fix-gpu-buffer-error-CTkjb

Conversation

@braedonsaunders

Copy link
Copy Markdown
Owner

Extends the geometry disposal quarantine pattern to additional renderers that were disposing geometry immediately while GPU still had pending draw commands.

BuildingRenderer changes:

  • Add geometryQuarantine array and GEOMETRY_QUARANTINE_FRAMES constant
  • Add queueGeometryForDisposal() and processGeometryQuarantine() methods
  • Update disposeGroup() to use quarantine for effect disposal
  • Update refreshAllMeshes() to use quarantine for instanced groups
  • Update dispose() to flush quarantine during teardown

GameOverlay (TSLGameOverlayManager) changes:

  • Add geometryQuarantine array and frame counter
  • Add queueGeometryForDisposal() and processGeometryQuarantine() methods
  • Update updateAttackRangeRings() to use quarantine when clearing rings
  • Update updateVisionRangeRings() to use quarantine when clearing rings
  • Update update() to process quarantine each frame
  • Update dispose() to flush quarantine during teardown

The range ring disposal in GameOverlay was a likely culprit as it happens frequently during gameplay whenever unit selection changes.

https://claude.ai/code/session_01LA6RwJfSB6nsab6v8oAGf9

Extends the geometry disposal quarantine pattern to additional renderers
that were disposing geometry immediately while GPU still had pending
draw commands.

BuildingRenderer changes:
- Add geometryQuarantine array and GEOMETRY_QUARANTINE_FRAMES constant
- Add queueGeometryForDisposal() and processGeometryQuarantine() methods
- Update disposeGroup() to use quarantine for effect disposal
- Update refreshAllMeshes() to use quarantine for instanced groups
- Update dispose() to flush quarantine during teardown

GameOverlay (TSLGameOverlayManager) changes:
- Add geometryQuarantine array and frame counter
- Add queueGeometryForDisposal() and processGeometryQuarantine() methods
- Update updateAttackRangeRings() to use quarantine when clearing rings
- Update updateVisionRangeRings() to use quarantine when clearing rings
- Update update() to process quarantine each frame
- Update dispose() to flush quarantine during teardown

The range ring disposal in GameOverlay was a likely culprit as it happens
frequently during gameplay whenever unit selection changes.

https://claude.ai/code/session_01LA6RwJfSB6nsab6v8oAGf9
@braedonsaunders braedonsaunders merged commit 2a138bb into main Jan 30, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants