Move check for sky cubemap array back into the SkyRD initializer#110627
Merged
Repiteo merged 1 commit intogodotengine:masterfrom Sep 19, 2025
Merged
Move check for sky cubemap array back into the SkyRD initializer#110627Repiteo merged 1 commit intogodotengine:masterfrom
Repiteo merged 1 commit intogodotengine:masterfrom
Conversation
…t is set before being used. Previously it was moved out of this function becuase we relied on RenderingServer::get_video_adapter_name which wasn't available yet. However, that was unnecessary since it is just a wrapper around RenderingDevice::get_device_name() which is available.
d387b85 to
fc95185
Compare
Calinou
approved these changes
Sep 17, 2025
Member
Calinou
left a comment
There was a problem hiding this comment.
Code looks good to me (I don't have an Intel Mac to test).
Contributor
|
Thanks! |
Contributor
|
Cherry-picked to 4.5 |
This file contains hidden or 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
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.
Fixes: #110589
Regression from #103306
This basically removes the changes from #105424
We need to disable
sky_use_cubemap_arrayas early as possible since it can be read from a few places during initialization of the renderer. However, #103306 caused a crash because it usedRenderingServer::get_singleton()->get_video_adapter_name()which isn't available until after theUtilitiesclass is initialized. However,Utilities::get_video_adapter_name()is just a wrapper function forRenderingDevice::get_device_name().godot/servers/rendering/renderer_rd/storage_rd/utilities.cpp
Lines 313 to 315 in 8b4b93a
So there is no need to access
Utilitiesat all.In #105424 we moved the check until the end of
RendererCompositorRD::initialize()to ensure the RenderingServer was initialized. That fixed the crash, but it caused the graphical artifacts in #110589 becausesky_use_cubemap_arraywas getting set to false after it had been read during initialization. So all our shaders were compiled thinking thatsky_use_cubemap_arraywas true, but then at run time we followed the false path. This is why setting the project setting forsky_use_cubemap_arrayto false made the graphical artifacts go away.Since we don't need to rely on
RenderingServer::get_singleton()->get_video_adapter_name()after all. We can move the check up toSkyRD()to ensure that it is done on time. Now the code is simpler, more self contained and doesn't cause a crash.