Merged
Conversation
james7132
approved these changes
Sep 30, 2025
Member
james7132
left a comment
There was a problem hiding this comment.
Note: this isn't a breaking change, per se. BufferSlice's deref implementation should allow the identical functions on wgou's BufferSlice type to be called instead. Might be a breaking change if people were using turbofish notation for these functions, but I don't think that's an expected use case for these functions.
github-merge-queue bot
pushed a commit
that referenced
this pull request
Sep 30, 2025
…20468) # Objective - `offset` argument is misleading as the argument is not actually passed to wgpu (used only for memoization and logging). `BufferSlice` already contains an offset. - wgpu's `set_index_buffer` [sets the offset according to BufferSlice::offset](https://github.com/gfx-rs/wgpu/blob/e990388af98e4b4dff9f7fcc09a4eb5d2f71d227/wgpu/src/api/render_pass.rs#L98-L105) - `TrackedRenderPass::set_vertex_buffer` was made aware of slice size (#14916) but missed `set_index_buffer` counterpart ## Solution - Removed `offset` argument from `TrackedRenderPass::set_index_buffer` - Apply fix from #14916 to `TrackedRenderPass::is_index_buffer_set` - ~~Cleanup code by using the newly added `BufferSlice` getters~~ split out to #21289 ## Testing - Ran a few examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
wgpu::BufferSlice::offset/size(added in wpgu 25).This is technically a breaking change.
bevy::BufferSlice::offset/sizeno longer exists, and.size()now returnswgpu::BufferSize = NonZeroU64instead ofwgpu::BufferAddress = u64.Originally in PR #20468. I thought this is conflated and should be separated