TrackedRenderPass::set_vertex_buffer does not update if the size of sliced buffer changed #14841
Labels
A-Rendering
Drawing game state to the screen
C-Bug
An unexpected or incorrect behavior
S-Needs-Investigation
This issue requires detective work to figure out what's going wrong
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..)
vsslice(item_size..buf_size)
) from two draw functions.It looks like
TrackedRenderPass::set_vertex_buffer
returns without updating the vertex buffer ifbuffer
andoffset
matches, ignoring its size.bevy/crates/bevy_render/src/render_phase/draw_state.rs
Lines 190 to 203 in 6e2f96f
bevy/crates/bevy_render/src/render_phase/draw_state.rs
Lines 76 to 82 in 6e2f96f
The text was updated successfully, but these errors were encountered: