Skip to content

fix: phase5 & phase6 GPU compute audit — sync barriers, buffer structs, shader guards#1

Open
COMMENCINGTHESCOURGE wants to merge 1 commit into
masterfrom
fix/phase5-phase6-audit
Open

fix: phase5 & phase6 GPU compute audit — sync barriers, buffer structs, shader guards#1
COMMENCINGTHESCOURGE wants to merge 1 commit into
masterfrom
fix/phase5-phase6-audit

Conversation

@COMMENCINGTHESCOURGE
Copy link
Copy Markdown
Owner

Audit Scope

Phase 5 (mesh extraction) and Phase 6 (voxel editing) GPU pipelines.

Issues Fixed

Phase 5 Host (phase5_host.js)

  • g1: QEF parameters now configurable per-call (tolerance, weightThreshold)
  • g2: Added CHANNELS enum for material indices + buffer validation
  • g3: GPU sync barriers after buffer operations to prevent race conditions

Phase 5 Draw (phase5_draw.js)

  • g4: Created isoThresholdBuffer uniform with proper lifecycle
  • g5: Fixed topology dispatch from 2D (32×32×1) to full 3D (32×32×32 = 1024³ threads covering 255³ cells)

Phase 5 Tiled (tiled_extractor.js)

  • g6: Added tile_offset uniform for multi-tile extraction, wired to QEF/LOD shaders

Phase 6 Edit (phase6_host.js)

  • g7: EditCommand struct layout verified: 24 bytes (vec3 center + f32 radius + u32 materialType + f32 falloff)
  • g8: Split editCountBuffer reset into separate resetEditCount() function called after GPU sync

Phase 6 Edit Shader (phase6_edit.wgsl)

  • g9: Guard division-by-zero in encode_with_expansion(), fix carve falloff (t < 0.5), use f16_bits() for atomic operations

Vinculum Verification

All 10 fixes verified against committed source code. No regressions detected.

…gs, fix isoThresholdBuffer, add tile_offset uniform, fix EditCommand struct layout, split editCount reset, guard division-by-zero, fix carve falloff inversion
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.

1 participant