Skip to content
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 macOS build with older Xcode and performance issues. #1

Merged
merged 1 commit into from Sep 25, 2023

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Sep 25, 2023

@bruvzg bruvzg added the bug Something isn't working label Sep 25, 2023
bruvzg pushed a commit to bruvzg/godot-angle-static that referenced this pull request Sep 25, 2023
Option is for Android Vulkan.

Fixes the recursion problem:
    #00 pc 000000000004d69c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28) (BuildId: dda896312b8ac9c639f6aeb0175b8a0a)
    godotengine#1 pc 0000000000051e84  /apex/com.android.runtime/lib64/bionic/libc.so (__futex_wait_ex(void volatile*, bool, int, bool, timespec const*)+144) (BuildId: dda896312b8ac9c639f6aeb0175b8a0a)
    godotengine#2 pc 00000000000b41b4  /apex/com.android.runtime/lib64/bionic/libc.so (NonPI::MutexLockWithTimeout(pthread_mutex_internal_t*, bool, timespec const*)+236) (BuildId: dda896312b8ac9c639f6aeb0175b8a0a)
    godotengine#3 pc 00000000003d8274  /vendor/lib64/egl/libGLESv2_angle.so (std::__Cr::mutex::lock()+12) (BuildId: 203fee8f1cfe9c18)
    google#4 pc 0000000000336494  /vendor/lib64/egl/libGLESv2_angle.so (egl::SharedContextMutex<std::__Cr::mutex>::doLock()+132) (BuildId: 203fee8f1cfe9c18)
    google#5 pc 000000000033668c  /vendor/lib64/egl/libGLESv2_angle.so (egl::SharedContextMutex<std::__Cr::mutex>::lock()+124) (BuildId: 203fee8f1cfe9c18)
    google#6 pc 00000000001d6e08  /vendor/lib64/egl/libGLESv2_angle.so (EGL_ClientWaitSyncKHR+100) (BuildId: 203fee8f1cfe9c18)
    google#7 pc 00000000000674f0  /system/lib64/libEGL.so (android::eglClientWaitSyncKHRImpl(void*, void*, int, unsigned long)+112) (BuildId: c4698b8b366f6519dbd7bd3a5f6239f2)
    google#8 pc 0000000000086648  /system/lib64/libgui.so (android::BufferQueueProducer::dequeueBuffer(int*, android::sp<android::Fence>*, unsigned int, unsigned int, int, unsigned long, unsigned long*, android::FrameEventHistoryDelta*)+3240) (BuildId: ff35b91736084ee7c49efe908fb9f8f3)
    google#9 pc 00000000000e24fc  /system/lib64/libgui.so (android::Surface::dequeueBuffer(ANativeWindowBuffer**, int*)+392) (BuildId: ff35b91736084ee7c49efe908fb9f8f3)
    google#10 pc 0000000000755770  /system/lib64/libhwui.so (android::uirenderer::renderthread::ReliableSurface::hook_dequeueBuffer(ANativeWindow*, int (*)(ANativeWindow*, ANativeWindowBuffer**, int*), void*, ANativeWindowBuffer**, int*)+80) (BuildId: 0ab7d7584ac800860c4d180557441d1b)
    google#11 pc 00000000000e0b48  /system/lib64/libgui.so (android::Surface::hook_dequeueBuffer(ANativeWindow*, ANativeWindowBuffer**, int*)+92) (BuildId: ff35b91736084ee7c49efe908fb9f8f3)
    google#12 pc 000000000002cc8c  /system/lib64/libvulkan.so (vulkan::driver::AcquireNextImageKHR(VkDevice_T*, VkSwapchainKHR_T*, unsigned long, VkSemaphore_T*, VkFence_T*, unsigned int*)+280) (BuildId: 0c72f8685858f73fbb13fd68d401bba5)
    google#13 pc 0000000000266f08  /vendor/lib64/egl/libGLESv2_angle.so (rx::(anonymous namespace)::TryAcquireNextImageUnlocked(VkDevice_T*, VkSwapchainKHR_T*, rx::impl::ImageAcquireOperation*)+128) (BuildId: 203fee8f1cfe9c18)
    google#14 pc 000000000026495c  /vendor/lib64/egl/libGLESv2_angle.so (rx::WindowSurfaceVk::acquireNextSwapchainImage(rx::vk::Context*)+140) (BuildId: 203fee8f1cfe9c18)
    google#15 pc 0000000000265800  /vendor/lib64/egl/libGLESv2_angle.so (rx::WindowSurfaceVk::doDeferredAcquireNextImageWithUsableSwapchain(gl::Context const*)+148) (BuildId: 203fee8f1cfe9c18)
    google#16 pc 0000000000267bb4  /vendor/lib64/egl/libGLESv2_angle.so (rx::WindowSurfaceVk::getBufferAge(gl::Context const*, int*)+196) (BuildId: 203fee8f1cfe9c18)
    google#17 pc 000000000034143c  /vendor/lib64/egl/libGLESv2_angle.so (egl::Surface::getBufferAge(gl::Context const*, int*)+36) (BuildId: 203fee8f1cfe9c18)
    google#18 pc 000000000036c354  /vendor/lib64/egl/libGLESv2_angle.so (egl::QuerySurfaceAttrib(egl::Display const*, gl::Context const*, egl::Surface*, int, int*)+812) (BuildId: 203fee8f1cfe9c18)
    google#19 pc 00000000001d1674  /vendor/lib64/egl/libGLESv2_angle.so (egl::QuerySurface(egl::Thread*, egl::Display*, egl::SurfaceID, int, int*)+176) (BuildId: 203fee8f1cfe9c18)
    google#20 pc 00000000001d3658  /vendor/lib64/egl/libGLESv2_angle.so (EGL_QuerySurface+200) (BuildId: 203fee8f1cfe9c18)

Happens only on platforms that use "EGL_KHR_fence_sync" instead of
"EGL_ANDROID_native_fence_sync" for synchronization. Happens only on
specific Surface types, that using `EGLConsumer`/`GLConsumer`, such as
`SurfaceTexture`.

The Android's "testDrawingHardwareBitmapNotLeaking" test may be used for
testing the issue. Note: in order to reproduce, `SingleContextMutex`
must not be used by context. The "Fix ExternalImageTarget EGLImage race"
CL will achieve that.

To check what extension is used, call:
    adb shell "dumpsys SurfaceFlinger | grep 'Sync configuration'"
Possible results:
    Sync configuration: [using: EGL_KHR_fence_sync EGL_KHR_wait_sync]
    Sync configuration: [using: EGL_ANDROID_native_fence_sync EGL_KHR_wait_sync]

Bug: angleproject:4354
Change-Id: I915a2c026b59af0a2098ae6b3300f773b29cbfbb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4733831
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
@akien-mga akien-mga merged commit eaa3385 into godotengine:godot-static Sep 25, 2023
@akien-mga
Copy link
Member

Thanks!

@bruvzg bruvzg deleted the fix_pref branch September 25, 2023 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants