Fix/vulkan startup hang and dynamic rendering#3
Conversation
- Rewrite EditorUI with full hierarchy tree, search/filter, entity icons - Add property inspector for all 10 component types (Tag, Transform, Mesh, Light, Camera, RigidBody, BoxCollider, SphereCollider, CapsuleCollider, IK) - Add/remove components via categorized popup (Rendering, Physics, Animation) - Entity presets: Cube, Sphere, Point Light, Camera, Empty (with physics) - Right-click context menus for entity delete - Professional dark theme with blue accent (EditorUI::apply_dark_theme) - Render stats panel showing Vulkan backend, draw calls, pass timings - Color-coded console log (red=error, yellow=warning) - F1 toggle for editor visibility - Add TagComponent to all scene entities for proper hierarchy display - Wire EditorUI into application render loop, replacing inline test window
Compute-shader frustum culling that consumes GPUScene buffers and writes indirect draw commands. Bounding-sphere tests run per-object in cull.comp, which atomically appends visible draws and a draw count for downstream draw_indexed_indirect_count consumption. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Lazy-cached centroid + max-radius bounding sphere drives GPU frustum culling. Per-Mesh gpu_mesh_index slot deduplicates GPUScene mega-buffer registration across frames. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
create_object_descriptor_set allocates a single-binding set holding the object SSBO at binding 0, backed by an internal pool. Used by the GPU-driven geometry pipeline to bind set 2. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Parallel gbuffer pipeline that reads the per-object model matrix from
the GPUScene object SSBO via gl_BaseInstance instead of push constants,
unblocking single-call draw_indexed_indirect_count submission.
Layout: set 0 (camera UBO), set 1 (default material), set 2 (object
SSBO). New vk_geometry_indirect.{vert,frag} share the same gbuffer
output format as the existing pipeline; the legacy CPU-driven pipeline
is kept intact as a fallback.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Owns GPUScene + GpuCullPass and replaces the per-entity gbuffer draw loop with a single draw_indexed_indirect_count when culling is on. - Per frame: lazy-register meshes, submit transforms + bounding spheres + flags to GPUScene, dispatch the cull compute, then issue one indirect draw bound to the GPU-driven pipeline (camera, default material, object SSBO). - Legacy CPU draw loop preserved on the else branch. - F2 toggles m_use_gpu_culling at runtime for A/B comparison. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughIntroduces GPU-driven indirect rendering with frustum culling. Adds new shaders for indirect geometry pass, implements compute-based culling, extends GPU scene management, adds mesh bounding sphere calculations, integrates GPU rendering path with F2 toggle in application, and substantially overhauls editor UI with improved hierarchy and inspector panels. Changes
Sequence DiagramsequenceDiagram
participant App as Application
participant GPUScene as GPU Scene
participant CullPass as GPU Cull Pass
participant Compute as Compute Shader
participant DeferredRenderer as Deferred Renderer
participant GPU as GPU (Indirect Draw)
App->>GPUScene: register_mesh(mesh)
App->>GPUScene: add_object(transform, bounds, flags)
App->>CullPass: execute(cmd, view, projection, scene)
CullPass->>Compute: bind pipeline & descriptor set
CullPass->>Compute: dispatch(view_proj, frustum planes, object_count)
Compute->>Compute: frustum cull per-object
Compute->>GPUScene: write filtered draw commands
Compute->>GPUScene: update draw count
CullPass->>GPUScene: transition buffers to IndirectArgument
App->>DeferredRenderer: bind indirect geometry pipeline
App->>DeferredRenderer: bind object descriptor set (GPU-generated)
App->>GPU: draw_indexed_indirect_count(cmd_buffer, count_buffer)
GPU->>GPU: execute culled geometry (per-object)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|


Summary by CodeRabbit
Release Notes
New Features
Chores