Skip to content

Commit

Permalink
RenderingDevice: Fix uncapped mipmap sizes causing div-by-zero
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomShaper committed Sep 9, 2024
1 parent d0dc389 commit 7f1989b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions servers/rendering/rendering_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 7f1989b

Please sign in to comment.