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

UBO consolidation #3089

Merged
merged 17 commits into from
Jan 8, 2025
Merged

Conversation

alexcristici
Copy link
Collaborator

@alexcristici alexcristici commented Dec 12, 2024

UBOs was reorganized for all shaders. As a convention: drawableUBO contains the matrix, interpolations and other parameters that are used only in vertex shader.
UBOs that were bound per drawable (like drawableUBO or tilePropsUBO) are now consolidated in a vector per layer instance and bound per layer. The UBOs are consolidated for Metal and Vulkan backends.
Uniform blocks were removed, they are not used anymore because UBOs are bound in the layer where there is no access to shader informations. So now there are some reserved UBO slots for vertex or fragment binding only.

@alexcristici alexcristici self-assigned this Dec 12, 2024
Copy link

github-actions bot commented Dec 13, 2024

Bloaty Results 🐋

Compared to main

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  -0.1%  -210Ki  -0.2% -52.3Ki    TOTAL

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

Compared to d387090 (legacy)

    FILE SIZE        VM SIZE    
 --------------  -------------- 
   +31% +36.1Mi  +438% +26.2Mi    TOTAL

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

Copy link

github-actions bot commented Dec 13, 2024

Benchmark Results ⚡

Benchmark                                                     Time             CPU      Time Old      Time New       CPU Old       CPU New
------------------------------------------------------------------------------------------------------------------------------------------
OVERALL_GEOMEAN                                            -0.0075         -0.0076             0             0             0             0

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

Copy link

github-actions bot commented Dec 15, 2024

Bloaty Results (iOS) 🐋

Compared to main

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.5% +61.9Ki  +0.5% +64.0Ki    TOTAL

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

@alexcristici alexcristici marked this pull request as ready for review December 16, 2024 13:36
@alexcristici alexcristici merged commit f582327 into maplibre:main Jan 8, 2025
50 checks passed
@alexcristici alexcristici deleted the ubo-consolidation branch January 14, 2025 15:46
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.

4 participants