maplibre / maplibre-native

MapLibre Native - Interactive vector tile maps for iOS, Android and other platforms.
https://maplibre.org
BSD 2-Clause "Simplified" License
898 stars 274 forks source link

Fix GL Fence signaling status #2500

Closed alasram closed 3 weeks ago

alasram commented 3 weeks ago

The OpenGL renderer function Fence::isSignaled always returns true (signaled) and this bug can overrun the uniform buffer allocator. glClientWaitSync is interpreted as if it returns true (signaled) or false (unsignaled) but the function actually returns the following 4 enums:

GL_ALREADY_SIGNALED 0x911A
GL_TIMEOUT_EXPIRED 0x911B
GL_CONDITION_SATISFIED 0x911C
GL_WAIT_FAILED 0x911D

This PR ensures the returned value is correctly checked

github-actions[bot] commented 3 weeks ago

Bloaty Results (iOS) 🐋

Compared to main

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  [ = ]       0  [ = ]       0    TOTAL

Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results-ios/pr-2500-compared-to-main.txt

github-actions[bot] commented 3 weeks ago

Bloaty Results 🐋

Compared to main

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0% +32.6Ki  +0.0% +6.82Ki    TOTAL

Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results/pr-2500-compared-to-main.txt

Compared to d38709084a9865fe0bb8300aec70ebf8243b3d43 (legacy)

    FILE SIZE        VM SIZE    
 --------------  -------------- 
   +21% +24.4Mi  +410% +24.5Mi    TOTAL

Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results/pr-2500-compared-to-legacy.txt

github-actions[bot] commented 3 weeks ago

Benchmark Results ⚡

Benchmark                                                     Time             CPU      Time Old      Time New       CPU Old       CPU New
------------------------------------------------------------------------------------------------------------------------------------------
OVERALL_GEOMEAN                                            -0.0166         -0.0167             0             0             0             0

Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/benchmark-results/pr-2500-compared-to-main.txt