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

Layer group uniforms #2247

Merged
merged 83 commits into from
Apr 18, 2024
Merged

Conversation

alexcristici
Copy link
Collaborator

@alexcristici alexcristici commented Apr 9, 2024

Implemented layer group uniforms, we had only drawable uniforms.
Moved evaluated props UBOs to layer level for all layers.

This will reduce the number of UBO binds on Metal and OpenGL and it will reduce also the bandwidth between CPU and GPU.
I did some measurements and the number of binds is reduced with approx. 10%.

@alexcristici alexcristici self-assigned this Apr 9, 2024
Copy link

github-actions bot commented Apr 9, 2024

Bloaty Results (iOS) 🐋

Compared to main

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  -0.0% -2.67Ki  [ = ]       0    TOTAL

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

Copy link

github-actions bot commented Apr 9, 2024

Bloaty Results 🐋

Compared to main

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  -0.0% -44.2Ki  -0.0% -9.42Ki    TOTAL

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

Compared to d387090 (legacy)

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

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

Copy link

github-actions bot commented Apr 9, 2024

Benchmark Results ⚡

Benchmark                                                     Time             CPU      Time Old      Time New       CPU Old       CPU New
------------------------------------------------------------------------------------------------------------------------------------------
OVERALL_GEOMEAN                                            -0.0019         -0.0016             0             0             0             0

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

@alexcristici alexcristici marked this pull request as ready for review April 16, 2024 17:08
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.

Looks good to me, Stefan already caught the two things I saw.

@stefankarschti
Copy link
Collaborator

There is a reproducible crash after a style change and some pan / zoom.
Screenshot 2024-04-17 at 17 45 12

Copy link
Collaborator

@stefankarschti stefankarschti left a comment

Choose a reason for hiding this comment

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

crash with metal validation error

-[MTLDebugRenderCommandEncoder validateCommonDrawErrors:]:5446: failed assertion `Draw Errors Validation
Fragment Function(fragmentMain): missing buffer binding at index 2 for tileprops[0].

@alexcristici alexcristici merged commit cca3adb into maplibre:main Apr 18, 2024
31 checks passed
@alexcristici alexcristici deleted the layer-group-uniforms branch April 18, 2024 11:26
@sjg-wdw
Copy link
Collaborator

sjg-wdw commented Apr 18, 2024

Would love to see some performance numbers on this. Can we kick off a Device Farm run?

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

5 participants