You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove offset argument from TrackedRenderPass::set_index_buffer (#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
0 commit comments