mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-24 19:14:40 +00:00
image: Take minimum of mip levels
Avoids validation error
This commit is contained in:
parent
e2b726382e
commit
0fe0047b52
@ -319,7 +319,8 @@ void Image::CopyImage(const Image& image) {
|
||||
auto cmdbuf = scheduler->CommandBuffer();
|
||||
|
||||
boost::container::small_vector<vk::ImageCopy, 14> image_copy{};
|
||||
for (u32 m = 0; m < image.info.resources.levels; ++m) {
|
||||
const u32 num_mips = std::min(image.info.resources.levels, info.resources.levels);
|
||||
for (u32 m = 0; m < num_mips; ++m) {
|
||||
const auto mip_w = std::max(image.info.size.width >> m, 1u);
|
||||
const auto mip_h = std::max(image.info.size.height >> m, 1u);
|
||||
const auto mip_d = std::max(image.info.size.depth >> m, 1u);
|
||||
|
Loading…
Reference in New Issue
Block a user