GLES2: Fix VersionKey comparison in ShaderGLES2::bind()
#58855
Merged
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.
This was comparing arrays, GCC 12 raises a warning for it:
For context:
godot/drivers/gles2/shader_gles2.h
Lines 126 to 134 in b28eea6
GLES3 is somewhat different and spells things out more in detail:
godot/drivers/gles3/shader_gles3.cpp
Lines 96 to 109 in b28eea6
Ubershader logic aside, it should amount to the same as what my GLES2 fix does.
Tested on Jetpaca, didn't spot any obvious issue.
Would need review from rendering team, I just fixed the C++ bug, and that might fix some actual GLES2 shader issues or introduce some.