mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-03 10:19:59 +00:00
Fix blits
This commit is contained in:
parent
de66a69ed4
commit
973f8f1d08
1 changed files with 10 additions and 10 deletions
|
@ -1111,9 +1111,10 @@ bool Image::ScaleUp(bool save_as_backup) {
|
||||||
};
|
};
|
||||||
|
|
||||||
const bool is_2d = info.type == ImageType::e2D;
|
const bool is_2d = info.type == ImageType::e2D;
|
||||||
boost::container::small_vector<VkImageBlit, 4> vkRegions(info.resources.levels);
|
boost::container::small_vector<VkImageBlit, 4> regions;
|
||||||
|
regions.reserve(info.resources.levels);
|
||||||
for (s32 level = 0; level < info.resources.levels; level++) {
|
for (s32 level = 0; level < info.resources.levels; level++) {
|
||||||
VkImageBlit blit{
|
regions.push_back({
|
||||||
.srcSubresource{
|
.srcSubresource{
|
||||||
.aspectMask = aspect_mask,
|
.aspectMask = aspect_mask,
|
||||||
.mipLevel = u32(level),
|
.mipLevel = u32(level),
|
||||||
|
@ -1150,10 +1151,9 @@ bool Image::ScaleUp(bool save_as_backup) {
|
||||||
.z = 1,
|
.z = 1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
vkRegions.push_back(blit);
|
|
||||||
}
|
}
|
||||||
BlitScale(*scheduler, *image, *rescaled_image, vkRegions, aspect_mask);
|
BlitScale(*scheduler, *image, *rescaled_image, regions, aspect_mask);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1193,9 +1193,10 @@ bool Image::ScaleDown(bool save_as_backup) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool is_2d = info.type == ImageType::e2D;
|
const bool is_2d = info.type == ImageType::e2D;
|
||||||
boost::container::small_vector<VkImageBlit, 4> vkRegions(info.resources.levels);
|
boost::container::small_vector<VkImageBlit, 4> regions;
|
||||||
|
regions.reserve(info.resources.levels);
|
||||||
for (s32 level = 0; level < info.resources.levels; level++) {
|
for (s32 level = 0; level < info.resources.levels; level++) {
|
||||||
VkImageBlit blit{
|
regions.push_back({
|
||||||
.srcSubresource{
|
.srcSubresource{
|
||||||
.aspectMask = aspect_mask,
|
.aspectMask = aspect_mask,
|
||||||
.mipLevel = u32(level),
|
.mipLevel = u32(level),
|
||||||
|
@ -1232,10 +1233,9 @@ bool Image::ScaleDown(bool save_as_backup) {
|
||||||
.z = 1,
|
.z = 1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
vkRegions.push_back(blit);
|
|
||||||
}
|
}
|
||||||
BlitScale(*scheduler, *image, *downscaled_image, vkRegions, aspect_mask);
|
BlitScale(*scheduler, *image, *downscaled_image, regions, aspect_mask);
|
||||||
if (save_as_backup) {
|
if (save_as_backup) {
|
||||||
backup_image = std::move(image);
|
backup_image = std::move(image);
|
||||||
backup_commit = std::move(commit);
|
backup_commit = std::move(commit);
|
||||||
|
|
Loading…
Reference in a new issue