Remove offset argument from TrackedRenderPass::set_index_buffer#20468
Merged
james7132 merged 4 commits intobevyengine:mainfrom Sep 30, 2025
Merged
Remove offset argument from TrackedRenderPass::set_index_buffer#20468james7132 merged 4 commits intobevyengine:mainfrom
offset argument from TrackedRenderPass::set_index_buffer#20468james7132 merged 4 commits intobevyengine:mainfrom
Conversation
james7132
approved these changes
Aug 24, 2025
Merged
github-merge-queue bot
pushed a commit
that referenced
this pull request
Sep 30, 2025
# Objective - Cleanup code by utilizing `wgpu::BufferSlice::offset`/`size` (added in wpgu 25). This is technically a breaking change. `bevy::BufferSlice::offset`/`size` no longer exists, and `.size()` now returns `wgpu::BufferSize = NonZeroU64` instead of `wgpu::BufferAddress = u64`. Originally in PR #20468. I thought this is conflated and should be separated
cbbfc06 to
2d414b2
Compare
thread 'main' panicked at tools/export-content/src/main.rs:35:25: called `Result::unwrap()` on an `Err` value: × failed to parse metadata in migration guide file set_index_buffer.md ╭─[/home/runner/work/bevy/bevy/release-content/migration-guides/set_index_buffer.md:1:8] 1 │ title: `TrackedRenderPass::set_index_buffer` no longer takes buffer offset · ▲ · ╰── found character that cannot start any token at line 1 column 8, while scanning for the next token 2 │ pull_requests: [20468] ╰────
Contributor
Author
|
Thank you! |
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
offsetargument is misleading as the argument is not actually passed to wgpu (used only for memoization and logging).BufferSlicealready contains an offset.set_index_buffersets the offset according to BufferSlice::offsetTrackedRenderPass::set_vertex_bufferwas made aware of slice size (Make TrackedRenderPass::set_vertex_buffer aware of slice size #14916) but missedset_index_buffercounterpartSolution
offsetargument fromTrackedRenderPass::set_index_bufferTrackedRenderPass::is_index_buffer_setCleanup code by using the newly addedsplit out to BufferSlice cleanup #21289BufferSlicegettersTesting