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

Make DynamicUniformBuffer::push accept an &T instead of T #11373

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

SkiFire13
Copy link
Contributor

Objective

  • DynamicUniformBuffer::push takes an owned T but only uses a shared reference to it
  • This in turn requires users of DynamicUniformBuffer::push to potentially unecessarily clone data

Solution

  • Have DynamicUniformBuffer::push take a shared reference to T

Changelog

  • DynamicUniformBuffer::push now takes a &T instead of T

Migration Guide

  • Users of DynamicUniformBuffer::push now need to pass references to DynamicUniformBuffer::push (e.g. existing uniforms.push(value) will now become uniforms.push(&value))

@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen C-Usability A targeted quality-of-life change that makes Bevy easier to use S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it labels Jan 16, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jan 16, 2024
Merged via the queue into bevyengine:main with commit 39cca41 Jan 16, 2024
26 checks passed
@SkiFire13 SkiFire13 deleted the render-avoid-clone branch January 16, 2024 21:42
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-Usability A targeted quality-of-life change that makes Bevy easier to use 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