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

Global UBO #2292

Merged
merged 98 commits into from
Apr 24, 2024
Merged

Global UBO #2292

merged 98 commits into from
Apr 24, 2024

Conversation

alexcristici
Copy link
Collaborator

@alexcristici alexcristici commented Apr 18, 2024

Implemented global UBO, for paint parameters that are same for all shaders.
Optimised shaders UBOs by using the global UBO.

This will reduce the number of UBO binds and it will reduce also the bandwidth between CPU and GPU.

The shaders have the following UBOs:

  • paint parameters UBO, it's set at global level and contains parameters that are the same for all shaders.
  • evaluated properties UBO, it's set at layer group level and contains the layer properties.
  • drawable UBO, it's set at drawable level and contains the matrix and other properties that are drawable dependent.
  • interpolate UBO and tile properties UBO are set at drawable level in the render layer.

alexcristici and others added 30 commits April 9, 2024 16:34
@alexcristici alexcristici self-assigned this Apr 18, 2024
Copy link

github-actions bot commented Apr 18, 2024

Bloaty Results 🐋

Compared to main

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0% +24.8Ki  +0.0% +10.2Ki    TOTAL

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

Compared to d387090 (legacy)

    FILE SIZE        VM SIZE    
 --------------  -------------- 
   +20% +23.4Mi  +406% +24.3Mi    TOTAL

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

Copy link

github-actions bot commented Apr 18, 2024

Benchmark Results ⚡

Benchmark                                                     Time             CPU      Time Old      Time New       CPU Old       CPU New
------------------------------------------------------------------------------------------------------------------------------------------
OVERALL_GEOMEAN                                            -0.0151         -0.0159             0             0             0             0

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

Copy link

github-actions bot commented Apr 22, 2024

Bloaty Results (iOS) 🐋

Compared to main

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0%    +216  [ = ]       0    TOTAL

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

@alexcristici alexcristici marked this pull request as ready for review April 23, 2024 07:42
@louwers
Copy link
Collaborator

louwers commented Apr 23, 2024

!benchmark android

@alexcristici alexcristici merged commit d22362a into maplibre:main Apr 24, 2024
33 of 35 checks passed
@alexcristici alexcristici deleted the global-ubo branch April 24, 2024 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

6 participants