Bug Fix: Added Validation Pass for Rendering Driver Availability#1274
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe PR adds validation to verify that a user-selected rendering driver is actually supported by the current engine build. During ChangesRendering Driver Validation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Infer (1.2.0)main/main.cppIn file included from main/main.cpp:39: ... [truncated 1079 characters] ... plugins/clang/install/lib/clang/18/include" 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@main/main.cpp`:
- Around line 2603-2617: The availability check fails to mark the Metal backend
available; update the same conditional blocks that set
rendering_driver_available to also handle the "metal" rendering_driver when the
METAL_ENABLED macro is defined. Specifically, add an `#ifdef` METAL_ENABLED block
that checks if rendering_driver == "metal" and sets rendering_driver_available =
true (and mirror the same change in the other similar occurrence around the
later block referenced), ensuring checks reference the rendering_driver variable
and rendering_driver_available flag so valid Metal builds aren't aborted.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 464ef6e4-4f3c-4073-935e-732e2a208f5a
📒 Files selected for processing (1)
main/main.cpp
85993f5 to
15c7502
Compare
Godot has switched to D3D12 as the default rendering driver in recent versions on the Windows platform, while Redot still defaults to Vulkan. This mismatch causes crashes when loading newer Godot projects in Redot due to the absence of validation for the renderer setting in the project configuration.
This PR implements a minimal validation to prevent the crash and provides users with a clear error message explaining the incompatibility and suggesting a solution.
Summary by CodeRabbit