Merge pull request #54459 from rxlecky/fix-multimesh-buffer-overflow-53603
This commit is contained in:
commit
210e6cc167
|
@ -4419,7 +4419,8 @@ void RendererStorageRD::_update_dirty_multimeshes() {
|
|||
if (multimesh->data_cache_dirty_regions[i]) {
|
||||
uint32_t offset = i * region_size;
|
||||
uint32_t size = multimesh->stride_cache * (uint32_t)multimesh->instances * (uint32_t)sizeof(float);
|
||||
RD::get_singleton()->buffer_update(multimesh->buffer, offset, MIN(region_size, size - offset), &data[i * region_size]);
|
||||
uint32_t region_start_index = multimesh->stride_cache * MULTIMESH_DIRTY_REGION_SIZE * i;
|
||||
RD::get_singleton()->buffer_update(multimesh->buffer, offset, MIN(region_size, size - offset), &data[region_start_index]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue