Repository navigation
fix(earthwidget): Filament KMP 0.7.10, no stale 3D widgets nor shader compile per tab on Windows - #699
Merged
Conversation
… compile per tab on Windows Filament KMP 0.7.10 fixes two Windows (ANGLE) issues of the Home's 3D widgets: - the D3D11 textures shared between Filament's device and the window's had no keyed mutex, so the window kept showing a texture's first frame (the Earth missing once its model loaded) or garbage; - every new tab compiled its widgets' shaders again through D3DCompiler, holding the UI thread some 250 ms a view; the program binaries are now cached for the process. Adds the e2e scenario that reproduces both (ZAYIT_E2E_SCENARIO=tabopen): tabs opened and switched on the default Home, UI-thread stalls sampled with their stacks, and exports at fixed times after an open. Signed-off-by: Elie G. <elyahou.hadass@gmail.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Problem (Windows only)
renderStandaloneViewfor ~80 ms on the first render of each view, then ~170 ms once the models are loaded.Both only show up in the native build (ANGLE). Under
./gradlew run, Filament fails to create its engine on ANGLE (Can't get OpenGL version) and falls back to Vulkan. That is a separate issue, not addressed here.Fix: Filament KMP 0.7.10
D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX), held while Filament renders into them. Nucleus already detects this mode and copies each frame out under the mutex, so Nucleus needs no change.Platform::setBlobFunc), capped at 32 MB. A rebuilt material (a new tab) loads its programs from it instead of compiling them again.Verification (native build, RTX 5060 Ti, new
tabopenscenario)New e2e scenario:
ZAYIT_E2E_SCENARIO=tabopen(withZAYIT_E2E_QUICK=1).Before merging