Core: fix iOS highp misjudge by set a default value without relying on a highp check #868
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 fix #795.
The changes in b951bf5 added
TimeTransformtoDisplayDefaults, which accessesGetGpuSupportsHighPrecisionFragmentShaders()to configure defaultTimeTransform.corona/librtt/Renderer/Rtt_GLCommandBuffer.cpp
Line 233 in f09b814
AFAIK, due to differing gl initialization flows between the Apple platform and Android (less familiar with other platforms), the former's setup may occurs at
corona/platform/iphone/CoronaViewPrivate.mm
Line 564 in f09b814
In contrast, Android's gl initialization is completed on the Java side, prior to the C/C++ Runtime initialization. The Apple platform, potentially due to context not been setup, may then access incorrect values.
This explains why Android is unaffected, while iOS misjudged highp support, so this PR addresses the issue by deferring the
TimeTransforminitialization ofDisplayDefaults.I'm not entirely familiar with the recent changes to TimeTransform, but I believe lazy loading could be one solution. Alternatively, perhaps the functionality of Display itself shouldn't be called within DisplayDefaults, which is part of the Display construction flow. In other words, is it possible to set a default value without relying on a highp check?
Hi, @ggcrunchy, please investigate if there's a more suitable approach? Thank you.