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 Asset Gpu Data Transfer #987

Merged
merged 1 commit into from
Dec 3, 2020
Merged

Conversation

cart
Copy link
Member

@cart cart commented Dec 3, 2020

This gives a nice boost when most assets dont change, with a very minor regression when many assets are changing.

  • Asset render resource bindings are now directly shared between all entities that reference the asset
  • We now only update asset render resources when they have changed
  • Reduced hashing in a number of areas

Bevymark Results (10,000 static entities)

This got a nice boost because the entity textures don't change.

Before

Diagnostics:
---------------------------------------------------------------------------------------------
frame_time                                                       : 0.018833    (avg 0.018690)
fps                                                              : 57.069353   (avg 55.020985)

After

Diagnostics:
---------------------------------------------------------------------------------------------
frame_time                                                       : 0.013772    (avg 0.014135)
fps                                                              : 70.948812   (avg 71.042812)

Spawner Example Results (10,000 moving entities with individual changing textures)

This has regressed slightly due to the added change detection.

Before

Diagnostics:
---------------------------------------------------------------------------------------------
frame_time                                                       : 0.038409    (avg 0.037628)
fps                                                              : 24.700086   (avg 25.714331)

After

Diagnostics:
---------------------------------------------------------------------------------------------
frame_time                                                       : 0.039960    (avg 0.039978)
fps                                                              : 25.022038   (avg 25.050537)

@cart cart added A-Assets Load files from disk to use for things like images, models, and sounds C-Performance A change motivated by improving speed, memory usage or compile times A-Rendering Drawing game state to the screen labels Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Assets Load files from disk to use for things like images, models, and sounds A-Rendering Drawing game state to the screen C-Performance A change motivated by improving speed, memory usage or compile times
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant