summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-07-21 07:55:55 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2021-11-16 22:11:27 +0100
commit973f8f1d08995e4b3e3e849b6c5fa77e5ce824a7 (patch)
tree1446bd3eaf3b63e3ab977225713568888f7bdc28 /src/video_core
parentrenderer_gl: Resolution scaling fixes (diff)
downloadyuzu-973f8f1d08995e4b3e3e849b6c5fa77e5ce824a7.tar
yuzu-973f8f1d08995e4b3e3e849b6c5fa77e5ce824a7.tar.gz
yuzu-973f8f1d08995e4b3e3e849b6c5fa77e5ce824a7.tar.bz2
yuzu-973f8f1d08995e4b3e3e849b6c5fa77e5ce824a7.tar.lz
yuzu-973f8f1d08995e4b3e3e849b6c5fa77e5ce824a7.tar.xz
yuzu-973f8f1d08995e4b3e3e849b6c5fa77e5ce824a7.tar.zst
yuzu-973f8f1d08995e4b3e3e849b6c5fa77e5ce824a7.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_vulkan/vk_texture_cache.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp
index 54236e87f..b061ea08b 100644
--- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp
@@ -1111,9 +1111,10 @@ bool Image::ScaleUp(bool save_as_backup) {
};
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++) {
- VkImageBlit blit{
+ regions.push_back({
.srcSubresource{
.aspectMask = aspect_mask,
.mipLevel = u32(level),
@@ -1150,10 +1151,9 @@ bool Image::ScaleUp(bool save_as_backup) {
.z = 1,
},
},
- };
- vkRegions.push_back(blit);
+ });
}
- BlitScale(*scheduler, *image, *rescaled_image, vkRegions, aspect_mask);
+ BlitScale(*scheduler, *image, *rescaled_image, regions, aspect_mask);
return true;
}
@@ -1193,9 +1193,10 @@ bool Image::ScaleDown(bool save_as_backup) {
}
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++) {
- VkImageBlit blit{
+ regions.push_back({
.srcSubresource{
.aspectMask = aspect_mask,
.mipLevel = u32(level),
@@ -1232,10 +1233,9 @@ bool Image::ScaleDown(bool save_as_backup) {
.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) {
backup_image = std::move(image);
backup_commit = std::move(commit);