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

Add convenience methods for constructing and setting storage buffer data #15044

Merged

Conversation

tychedelia
Copy link
Contributor

@tychedelia tychedelia commented Sep 4, 2024

Adds some methods to assist in building ShaderStorageBuffer without using bytemuck. We keep the &[u8] constructors since this is still modeled as a thin wrapper around the buffer descriptor, but should make it easier to interact with at the cost of an extra allocation in the ShaderType path for the buffer writer.

Follow up from #14663

@tychedelia tychedelia added C-Enhancement A new feature A-Rendering Drawing game state to the screen S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Sep 4, 2024
@alice-i-cecile alice-i-cecile added this to the 0.15 milestone Sep 4, 2024
Copy link
Member

@janhohenheim janhohenheim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea, I like it!

Copy link
Contributor

@brianreavis brianreavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here are some adjustments to reduce copying

crates/bevy_render/src/storage.rs Outdated Show resolved Hide resolved
crates/bevy_render/src/storage.rs Outdated Show resolved Hide resolved
@janhohenheim janhohenheim added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Sep 5, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Sep 9, 2024
Merged via the queue into bevyengine:main with commit 5eca832 Sep 9, 2024
27 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-Enhancement A new feature 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.

4 participants