Skip to content

fix(render): add separate death effect pool to prevent WebGPU geometr…#1056

Merged
braedonsaunders merged 1 commit into
mainfrom
claude/fix-gpu-render-crash-mfoR7
Jan 26, 2026
Merged

fix(render): add separate death effect pool to prevent WebGPU geometr…#1056
braedonsaunders merged 1 commit into
mainfrom
claude/fix-gpu-render-crash-mfoR7

Conversation

@braedonsaunders

Copy link
Copy Markdown
Owner

…y swap crash

BattleEffectsRenderer was swapping geometry on pooled meshes at runtime:

  • Acquired mesh from groundEffectPool (uses groundRingGeometry)
  • Swapped geometry to largeRingGeometry for death effects
  • Swapped back to groundRingGeometry when effect completed

WebGPU has strict buffer management and doesn't handle geometry swapping well on meshes. This caused the "setIndexBuffer: parameter 1 is not of type GPUBuffer" crash after ~7 minutes of gameplay.

Fix: Create a separate deathEffectPool that uses largeRingGeometry from creation, avoiding any geometry swapping at runtime.

…y swap crash

BattleEffectsRenderer was swapping geometry on pooled meshes at runtime:
- Acquired mesh from groundEffectPool (uses groundRingGeometry)
- Swapped geometry to largeRingGeometry for death effects
- Swapped back to groundRingGeometry when effect completed

WebGPU has strict buffer management and doesn't handle geometry swapping
well on meshes. This caused the "setIndexBuffer: parameter 1 is not of
type GPUBuffer" crash after ~7 minutes of gameplay.

Fix: Create a separate deathEffectPool that uses largeRingGeometry from
creation, avoiding any geometry swapping at runtime.
@braedonsaunders braedonsaunders merged commit e326ce2 into main Jan 26, 2026
4 checks passed
@braedonsaunders braedonsaunders deleted the claude/fix-gpu-render-crash-mfoR7 branch January 27, 2026 01:54
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