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

Profile memory usage of pattern vertex attributes #9407

Closed
karimnaaji opened this issue Mar 11, 2020 · 3 comments
Closed

Profile memory usage of pattern vertex attributes #9407

karimnaaji opened this issue Mar 11, 2020 · 3 comments
Labels
performance ⚡ Speed, stability, CPU usage, memory usage, or power usage

Comments

@karimnaaji
Copy link
Contributor

As suggested by @ansis in #9372 , the layout involved by the pattern vertex attributes could be improved to prevent 4 bytes alignment hardware requirement loss.

We would have to first determine whether this layout becomes heavily used by base map styles and see how much memory is involved by it before adjusting it for packing. It can become an issue if data driven expressions are used for *-pattern, refer #9372 (comment).

@karimnaaji karimnaaji added the performance ⚡ Speed, stability, CPU usage, memory usage, or power usage label Mar 11, 2020
@astojilj
Copy link
Contributor

StructArrayLayout8ui2ub18.prototype.bytesPerElement = 18;
register('StructArrayLayout8ui2ub18', StructArrayLayout8ui2ub18);

This alignment seems problematic:

https://developer.apple.com/library/archive/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/TechniquesforWorkingwithVertexData/TechniquesforWorkingwithVertexData.html#//apple_ref/doc/uid/TP40008793-CH107-SW15

@karimnaaji
Copy link
Contributor Author

Post #9681 here are the remainder layouts that might require such attention:

 $ yarn run codegen
 Warning: The layout StructArrayLayout3ui6 is not aligned to 4-bytes boundaries.
 Warning: The layout StructArrayLayout3i6 is not aligned to 4-bytes boundaries.
 Warning: The layout StructArrayLayout3ui6 is not aligned to 4-bytes boundaries.
 Warning: The layout StructArrayLayout1ui2 is not aligned to 4-bytes boundaries.

@mourner
Copy link
Member

mourner commented Nov 7, 2022

Pattern attributes are reasonably compact after #12326. For other non-4-bytes-aligned attributes, let's track this in a separate issue because the title/description doesn't reflect it.

@mourner mourner closed this as completed Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance ⚡ Speed, stability, CPU usage, memory usage, or power usage
Projects
None yet
Development

No branches or pull requests

3 participants