summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bunnei2022-03-20 02:19:30 -0700
committerGravatar GitHub2022-03-20 02:19:30 -0700
commit150f6db4d19e7e8ca11fde0b50977e0a41f36444 (patch)
tree4435e20f748e513628772c4ed53897a455c4d1ef /src
parentMerge pull request #8040 from Morph1984/handle-table (diff)
parenttexture_cache: Ensure has_blacklisted is always initialized (diff)
downloadyuzu-150f6db4d19e7e8ca11fde0b50977e0a41f36444.tar.gz
yuzu-150f6db4d19e7e8ca11fde0b50977e0a41f36444.tar.xz
yuzu-150f6db4d19e7e8ca11fde0b50977e0a41f36444.zip
Merge pull request #7840 from lioncash/bitor
texture_cache: Amend unintended bitwise OR in SynchronizeAliases
Diffstat (limited to 'src')
-rw-r--r--src/video_core/texture_cache/texture_cache.h18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index 198bb0cfb..72eeb8bbd 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -343,7 +343,7 @@ template <bool has_blacklists>
343void TextureCache<P>::FillImageViews(DescriptorTable<TICEntry>& table, 343void TextureCache<P>::FillImageViews(DescriptorTable<TICEntry>& table,
344 std::span<ImageViewId> cached_image_view_ids, 344 std::span<ImageViewId> cached_image_view_ids,
345 std::span<ImageViewInOut> views) { 345 std::span<ImageViewInOut> views) {
346 bool has_blacklisted; 346 bool has_blacklisted = false;
347 do { 347 do {
348 has_deleted_images = false; 348 has_deleted_images = false;
349 if constexpr (has_blacklists) { 349 if constexpr (has_blacklists) {
@@ -1725,7 +1725,7 @@ void TextureCache<P>::SynchronizeAliases(ImageId image_id) {
1725 }); 1725 });
1726 const auto& resolution = Settings::values.resolution_info; 1726 const auto& resolution = Settings::values.resolution_info;
1727 for (const AliasedImage* const aliased : aliased_images) { 1727 for (const AliasedImage* const aliased : aliased_images) {
1728 if (!resolution.active | !any_rescaled) { 1728 if (!resolution.active || !any_rescaled) {
1729 CopyImage(image_id, aliased->id, aliased->copies); 1729 CopyImage(image_id, aliased->id, aliased->copies);
1730 continue; 1730 continue;
1731 } 1731 }
@@ -1736,19 +1736,7 @@ void TextureCache<P>::SynchronizeAliases(ImageId image_id) {
1736 continue; 1736 continue;
1737 } 1737 }
1738 ScaleUp(aliased_image); 1738 ScaleUp(aliased_image);
1739 1739 CopyImage(image_id, aliased->id, aliased->copies);
1740 const bool both_2d{image.info.type == ImageType::e2D &&
1741 aliased_image.info.type == ImageType::e2D};
1742 auto copies = aliased->copies;
1743 for (auto copy : copies) {
1744 copy.extent.width = std::max<u32>(
1745 (copy.extent.width * resolution.up_scale) >> resolution.down_shift, 1);
1746 if (both_2d) {
1747 copy.extent.height = std::max<u32>(
1748 (copy.extent.height * resolution.up_scale) >> resolution.down_shift, 1);
1749 }
1750 }
1751 CopyImage(image_id, aliased->id, copies);
1752 } 1740 }
1753} 1741}
1754 1742