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

fast-fail in as_bind_group #12513

Merged
merged 1 commit into from
Mar 18, 2024

Conversation

robtfm
Copy link
Contributor

@robtfm robtfm commented Mar 16, 2024

Objective

prevent gpu buffer allocations when running as_bind_group for assets with texture dependencies that are not yet available.

Solution

reorder the binding creation so that fallible items are created first.

@robtfm robtfm added A-Rendering Drawing game state to the screen C-Performance A change motivated by improving speed, memory usage or compile times labels Mar 16, 2024
@james7132 james7132 added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Mar 18, 2024
@robtfm
Copy link
Contributor Author

robtfm commented Mar 18, 2024

this is an improvement but i should note: we still potentially create some textures before discarding them, if earlier images in the binding_impls order are available and later ones are not.

it would be a little more involved to gather all the required handles before creating any gpu resources but probably worthwhile.

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Mar 18, 2024
Merged via the queue into bevyengine:main with commit 26f2d3f Mar 18, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Performance A change motivated by improving speed, memory usage or compile times S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants