GPUImmediate: Fix wrong resize of immBatchAtMost

This commit is contained in:
Clément Foucault 2020-09-10 15:52:00 +02:00
parent 72f63ba7e9
commit 48a99fab2b
Notes: blender-bot 2023-02-14 10:35:28 +01:00
Referenced by issue #80538, Knife Tool Glitches
1 changed files with 1 additions and 1 deletions

View File

@ -186,7 +186,7 @@ void immEnd(void)
if (imm->batch) {
if (imm->vertex_idx < imm->vertex_len) {
GPU_vertbuf_data_resize(imm->batch->verts[0], imm->vertex_len);
GPU_vertbuf_data_resize(imm->batch->verts[0], imm->vertex_idx);
/* TODO: resize only if vertex count is much smaller */
}
GPU_batch_set_shader(imm->batch, imm->shader);