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 by index instead of map #1980

Merged
merged 38 commits into from
Jan 31, 2024

Conversation

alexcristici
Copy link
Collaborator

@alexcristici alexcristici commented Dec 22, 2023

I replaced StringIdentity idBackgroundDrawableUBOName with

enum {
    idBackgroundDrawableUBO,
    idBackgroundLayerUBO,
    backgroundUBOCount
};

UBOs ids are in the same order in UniformBlocks as in UniformBuffers, using above enum ordering.
In this way we match the uniform buffer for the right uniform block.

@alexcristici alexcristici self-assigned this Dec 22, 2023
Copy link

github-actions bot commented Jan 9, 2024

Bloaty Results 🐋

Compared to main

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  -0.1%  -208Ki  -0.2% -54.7Ki    TOTAL

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

Compared to d387090 (legacy)

    FILE SIZE        VM SIZE    
 --------------  -------------- 
   +18% +21.2Mi  +398% +23.8Mi    TOTAL

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

Copy link

github-actions bot commented Jan 10, 2024

Bloaty Results (iOS) 🐋

Compared to main

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  -0.2% -36.0Ki  -0.2% -32.0Ki    TOTAL

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

@alexcristici alexcristici marked this pull request as ready for review January 30, 2024 20:06
Copy link
Collaborator

@mwilsnd mwilsnd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! Guess I need to dust off that shader code generation PR when I have a chance and really update it for this.

@alexcristici alexcristici requested a review from mwilsnd January 31, 2024 19:00
@alexcristici alexcristici merged commit 61a6b66 into maplibre:main Jan 31, 2024
30 checks passed
@alexcristici alexcristici deleted the ubo-by-index-instead-of-map branch January 31, 2024 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants