-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix bad parameter for rendering_method
crashes Godot
#84241
Merged
akien-mga
merged 1 commit into
godotengine:master
from
jsjtxietian:fix-render-method-crash-on-bad-input
Dec 4, 2023
Merged
Fix bad parameter for rendering_method
crashes Godot
#84241
akien-mga
merged 1 commit into
godotengine:master
from
jsjtxietian:fix-render-method-crash-on-bad-input
Dec 4, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AThousandShips
added
bug
topic:rendering
crash
cherrypick:4.1
Considered for cherry-picking into a future 4.1.x release
cherrypick:4.2
Considered for cherry-picking into a future 4.2.x release
labels
Oct 31, 2023
akien-mga
reviewed
Oct 31, 2023
jsjtxietian
force-pushed
the
fix-render-method-crash-on-bad-input
branch
from
October 31, 2023 11:13
c6c9765
to
08e36dc
Compare
akien-mga
approved these changes
Nov 9, 2023
In my previous review comment, I also suggested doing this, to be consistent: diff --git a/servers/rendering/renderer_rd/renderer_compositor_rd.cpp b/servers/rendering/renderer_rd/renderer_compositor_rd.cpp
index b9bda9329e..d09cd8a615 100644
--- a/servers/rendering/renderer_rd/renderer_compositor_rd.cpp
+++ b/servers/rendering/renderer_rd/renderer_compositor_rd.cpp
@@ -310,10 +310,10 @@ RendererCompositorRD::RendererCompositorRD() {
uint64_t textures_per_stage = RD::get_singleton()->limit_get(RD::LIMIT_MAX_TEXTURES_PER_SHADER_STAGE);
if (rendering_method == "mobile" || textures_per_stage < 48) {
- scene = memnew(RendererSceneRenderImplementation::RenderForwardMobile());
if (rendering_method == "forward_plus") {
WARN_PRINT_ONCE("Platform supports less than 48 textures per stage which is less than required by the Clustered renderer. Defaulting to Mobile renderer.");
}
+ scene = memnew(RendererSceneRenderImplementation::RenderForwardMobile());
} else if (rendering_method == "forward_plus") {
// default to our high end renderer
scene = memnew(RendererSceneRenderImplementation::RenderForwardClustered()); First we warn, then we instantiate the fallback. |
akien-mga
changed the title
Fix bad parameter of rendering_method crashes Godot
Fix bad parameter for Nov 9, 2023
rendering_method
crashes Godot
AThousandShips
approved these changes
Nov 9, 2023
Print error and default to forward plus
jsjtxietian
force-pushed
the
fix-render-method-crash-on-bad-input
branch
from
November 10, 2023 02:38
08e36dc
to
b6bee1c
Compare
Thanks! |
Cherry-picked for 4.2.1. |
YuriSizov
removed
the
cherrypick:4.2
Considered for cherry-picking into a future 4.2.x release
label
Dec 5, 2023
Cherry-picked for 4.1.4. |
YuriSizov
removed
the
cherrypick:4.1
Considered for cherry-picking into a future 4.1.x release
label
Jan 23, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Print error and default to forward plus. Prevent it crash is always necessary I suppose, but maybe we can default to other rendering method?
Fixes #69815