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

Optimize geoshader Sprite buffer writes into VertexDomain #929

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

cspotcode
Copy link

Extracted from #905

Adds an optimized code path for writing values into a VertexList. Sprite and other pyglet internals can use this code path.

This code path can only be used by things which exclusively control their VertexList, because they must know every time the VertexList is migrated. This is true for Sprite, since _vertex_list is private, and the only way to migrate a Sprite's VertexList is by calling Sprite methods or properties.

Makes code changes for experimental geoshader Sprite to use this optimized code path.

Command Mean [s] Min [s] Max [s] Relative
Before: 448a3ee4 Fix shader (pre-existing bug in geoshader Sprite, unrelated to my changes) 317.981 ± 2.675 315.556 320.851 1.70 ± 0.02
After: 31c607fc Optimize buffer writes from geoshader Sprite into VertexDomain 186.733 ± 0.799 185.929 187.527 1.00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant