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

Metal layer depth range support #2013

Merged
merged 13 commits into from
Jan 16, 2024
Merged

Conversation

mwilsnd
Copy link
Collaborator

@mwilsnd mwilsnd commented Jan 12, 2024

This PR removes the assumption of glDepthRange from the Metal backend and replaces layer depth logic with a simple projection offset. This enables similar depth functionality to glDepthRange but requires a correct projection matrix.

This change has added a new requirement of drawables to know their own layer and sublayer indices, and for the tile matrix computation to factor in those new parameters.

OpenGL backends are unchanged and still use glDepthRange due to the existence of legacy custom layers which make this assumption.

@mwilsnd mwilsnd self-assigned this Jan 12, 2024
Copy link

github-actions bot commented Jan 12, 2024

Bloaty Results (iOS) 🐋

Compared to main

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

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

@mwilsnd mwilsnd marked this pull request as ready for review January 12, 2024 17:59
Copy link

github-actions bot commented Jan 12, 2024

Bloaty Results 🐋

Compared to main

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0% +4.54Ki  +0.0% +3.23Ki    TOTAL

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

Compared to d387090 (legacy)

    FILE SIZE        VM SIZE    
 --------------  -------------- 
   +19% +21.7Mi  +400% +23.9Mi    TOTAL

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

@mwilsnd mwilsnd changed the title Replace glDepthRange with projection offset Metal layer depth range support Jan 15, 2024
@mwilsnd mwilsnd merged commit d6c2b14 into maplibre:main Jan 16, 2024
30 checks passed
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.

5 participants