mirror of
https://github.com/godotengine/godot.git
synced 2025-01-30 21:33:18 +08:00
RenderingDevice: Fix uncapped mipmap sizes causing div-by-zero
This commit is contained in:
parent
d0dc3896ad
commit
7f1989bac1
@ -1641,8 +1641,8 @@ Vector<uint8_t> RenderingDevice::texture_get_data(RID p_texture, uint32_t p_laye
|
||||
copy_region.texture_region_size.z = d;
|
||||
command_buffer_texture_copy_regions_vector.push_back(copy_region);
|
||||
|
||||
w = (w >> 1);
|
||||
h = (h >> 1);
|
||||
w = MAX(1u, w >> 1);
|
||||
h = MAX(1u, h >> 1);
|
||||
d = MAX(1u, d >> 1);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user