Revert "ifcviewer: GPU LOD0/LOD1 selection in compute cull (step 3c)"

This reverts commit 77cac3ec170b622db6977829f66b62603266a047.
This commit is contained in:
Dion Moult
2026-04-17 18:34:01 +10:00
parent 3c5c8e44cb
commit 643a2e1c1f
3 changed files with 101 additions and 167 deletions
+6 -9
View File
@@ -108,21 +108,18 @@ struct ModelGpuData {
// the instanceCount field of gpu_indirect_buffer is rewritten by the
// cull shader (zeroed by the reset shader, atomically incremented as
// survivors are appended into gpu_visible_ssbo at mesh_base[i] + local).
// Layout per model — 4 buckets of M commands each:
// [0..M) fwd_lod0 (non-reflected, LOD0, CCW winding)
// [M..2M) fwd_lod1 (non-reflected, LOD1, CCW winding)
// [2M..3M) rev_lod0 (reflected, LOD0, CW winding)
// [3M..4M) rev_lod1 (reflected, LOD1, CW winding)
// gpu_mesh_command_count = 4M; gpu_forward_command_count = M.
// Two MDIs: CCW for [0..2M), CW for [2M..4M).
// Layout per model:
// commands[0..M) fwd bucket (non-reflected, CCW winding)
// commands[M..2M) rev bucket (reflected, CW winding)
// gpu_mesh_command_count = 2M; gpu_forward_command_count = M.
// Each bucket gets its own mesh_base[] slot and its own visible[]
// range, sized to the exact per-mesh count of fwd / rev instances.
GLuint gpu_indirect_buffer = 0;
size_t gpu_indirect_capacity = 0;
GLuint gpu_visible_ssbo = 0;
size_t gpu_visible_capacity = 0;
GLuint gpu_mesh_base_ssbo = 0;
size_t gpu_mesh_base_capacity = 0;
GLuint gpu_mesh_flags_ssbo = 0;
size_t gpu_mesh_flags_capacity = 0;
uint32_t gpu_mesh_command_count = 0;
uint32_t gpu_forward_command_count = 0;