Remove offset
argument from TrackedRenderPass::set_index_buffer
#20468
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
offset
argument is misleading as the argument is not actually passed to wgpu (used only for memoization and logging).BufferSlice
already contains an offset.set_index_buffer
sets the offset according to BufferSlice::offsetTrackedRenderPass::set_vertex_buffer
was made aware of slice size (Make TrackedRenderPass::set_vertex_buffer aware of slice size #14916) but missedset_index_buffer
counterpartSolution
offset
argument fromTrackedRenderPass::set_index_buffer
TrackedRenderPass::is_index_buffer_set
BufferSlice
getters Add getters andFrom
implementations toBufferSlice
. gfx-rs/wgpu#7148Testing