TrackedRenderPass::set_vertex_buffer does not update if the size of sliced buffer changed
Bevy version
0.14.1
What you did
In #14721, I set a slice of seemingly correct size as a vertex buffer and got errors like Instance 555 extends beyond limit 554 imposed by the buffer in slot 3.
What went wrong
In this case, the same underlying buffer is used as vertex buffer with the same offset but different sizes (slice(item_size..) vs slice(item_size..buf_size)) from two draw functions.
It looks like TrackedRenderPass::set_vertex_buffer returns without updating the vertex buffer if buffer and offset matches, ignoring its size.
https://github.com/bevyengine/bevy/blob/6e2f96f2224032e04e77b993ad4c06d76d49039f/crates/bevy_render/src/render_phase/draw_state.rs#L190-L203
https://github.com/bevyengine/bevy/blob/6e2f96f2224032e04e77b993ad4c06d76d49039f/crates/bevy_render/src/render_phase/draw_state.rs#L76-L82