diff options
| -rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index 63821d496..62fb98b55 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h | |||
| @@ -1176,13 +1176,13 @@ ImageId TextureCache<P>::JoinImages(const ImageInfo& info, GPUVAddr gpu_addr, VA | |||
| 1176 | const size_t size_bytes = CalculateGuestSizeInBytes(new_info); | 1176 | const size_t size_bytes = CalculateGuestSizeInBytes(new_info); |
| 1177 | const bool broken_views = runtime.HasBrokenTextureViewFormats(); | 1177 | const bool broken_views = runtime.HasBrokenTextureViewFormats(); |
| 1178 | const bool native_bgr = runtime.HasNativeBgr(); | 1178 | const bool native_bgr = runtime.HasNativeBgr(); |
| 1179 | std::vector<ImageId> overlap_ids; | 1179 | boost::container::small_vector<ImageId, 4> overlap_ids; |
| 1180 | std::unordered_set<ImageId> overlaps_found; | 1180 | std::unordered_set<ImageId> overlaps_found; |
| 1181 | std::vector<ImageId> left_aliased_ids; | 1181 | boost::container::small_vector<ImageId, 4> left_aliased_ids; |
| 1182 | std::vector<ImageId> right_aliased_ids; | 1182 | boost::container::small_vector<ImageId, 4> right_aliased_ids; |
| 1183 | std::unordered_set<ImageId> ignore_textures; | 1183 | std::unordered_set<ImageId> ignore_textures; |
| 1184 | std::vector<ImageId> bad_overlap_ids; | 1184 | boost::container::small_vector<ImageId, 4> bad_overlap_ids; |
| 1185 | std::vector<ImageId> all_siblings; | 1185 | boost::container::small_vector<ImageId, 4> all_siblings; |
| 1186 | const bool this_is_linear = info.type == ImageType::Linear; | 1186 | const bool this_is_linear = info.type == ImageType::Linear; |
| 1187 | const auto region_check = [&](ImageId overlap_id, ImageBase& overlap) { | 1187 | const auto region_check = [&](ImageId overlap_id, ImageBase& overlap) { |
| 1188 | if (True(overlap.flags & ImageFlagBits::Remapped)) { | 1188 | if (True(overlap.flags & ImageFlagBits::Remapped)) { |
| @@ -1298,16 +1298,16 @@ ImageId TextureCache<P>::JoinImages(const ImageInfo& info, GPUVAddr gpu_addr, VA | |||
| 1298 | Image& overlap = slot_images[overlap_id]; | 1298 | Image& overlap = slot_images[overlap_id]; |
| 1299 | if (True(overlap.flags & ImageFlagBits::GpuModified)) { | 1299 | if (True(overlap.flags & ImageFlagBits::GpuModified)) { |
| 1300 | new_image.flags |= ImageFlagBits::GpuModified; | 1300 | new_image.flags |= ImageFlagBits::GpuModified; |
| 1301 | } | 1301 | const auto& resolution = Settings::values.resolution_info; |
| 1302 | const auto& resolution = Settings::values.resolution_info; | 1302 | const SubresourceBase base = new_image.TryFindBase(overlap.gpu_addr).value(); |
| 1303 | const SubresourceBase base = new_image.TryFindBase(overlap.gpu_addr).value(); | 1303 | const u32 up_scale = can_rescale ? resolution.up_scale : 1; |
| 1304 | const u32 up_scale = can_rescale ? resolution.up_scale : 1; | 1304 | const u32 down_shift = can_rescale ? resolution.down_shift : 0; |
| 1305 | const u32 down_shift = can_rescale ? resolution.down_shift : 0; | 1305 | auto copies = MakeShrinkImageCopies(new_info, overlap.info, base, up_scale, down_shift); |
| 1306 | auto copies = MakeShrinkImageCopies(new_info, overlap.info, base, up_scale, down_shift); | 1306 | if (overlap.info.num_samples != new_image.info.num_samples) { |
| 1307 | if (overlap.info.num_samples != new_image.info.num_samples) { | 1307 | runtime.CopyImageMSAA(new_image, overlap, std::move(copies)); |
| 1308 | runtime.CopyImageMSAA(new_image, overlap, std::move(copies)); | 1308 | } else { |
| 1309 | } else { | 1309 | runtime.CopyImage(new_image, overlap, std::move(copies)); |
| 1310 | runtime.CopyImage(new_image, overlap, std::move(copies)); | 1310 | } |
| 1311 | } | 1311 | } |
| 1312 | if (True(overlap.flags & ImageFlagBits::Tracked)) { | 1312 | if (True(overlap.flags & ImageFlagBits::Tracked)) { |
| 1313 | UntrackImage(overlap, overlap_id); | 1313 | UntrackImage(overlap, overlap_id); |