refactor(render): remove Vulkan RAII wrappers#89
Conversation
- Convert backend, filter chain, passes, framebuffer, and texture loader from vk::Unique* to plain handles - Implement explicit destroy/free logic in shutdown() and resize/reload paths - Update move semantics for framebuffer and debug messenger to preserve safe manual ownership transfer - Add failure rollback for image/buffer/memory creation and descriptor/pipeline setup paths - Keep public Vulkan context accessors and call sites consistent with non-owning handle usage
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughSystematic conversion from Vulkan-Hpp RAII smart wrappers (Unique*) to plain vk:: handles across backend and render-chain components, replacing automatic cleanup with explicit destruction, including updated resource lifetimes, move semantics, and shutdown ordering in policy documentation and implementation. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Poem
✨ Finishing touches
🧪 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 |
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||||||||||||
User description
PR Type
Enhancement, Refactoring
Description
Replace Vulkan-Hpp RAII wrappers (
vk::Unique*) with plain handles and explicit lifetime managementImplement deterministic destroy/free calls in shutdown and error paths
Add proper error rollback for resource creation failures
Update move semantics for framebuffer and debug messenger to preserve manual ownership
Update project policies to mandate plain Vulkan handles instead of RAII wrappers
Diagram Walkthrough
File Walkthrough
15 files
Convert instance/device/swapchain to plain handlesChange member types from Unique* to plain handlesReplace RAII wrappers with explicit destroy callsUpdate pipeline/descriptor/buffer member typesImplement explicit cleanup for pipeline resourcesChange pipeline/descriptor members to plain handlesAdd explicit destroy calls in shutdown methodUpdate pipeline/descriptor member declarationsImplement explicit image/memory/view cleanupChange image/memory/view to plain handle typesAdd texture registry cleanup and error handlingUpdate LoadedTexture sampler to plain handleChange TextureData members to plain handle typesImplement explicit messenger destruction and move semanticsAdd instance member and explicit reset method1 files
Add error rollback for staging/image resource creation1 files
Update RAII policy to mandate plain Vulkan handlesSummary by CodeRabbit
Refactor
Documentation