mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-15 22:54:00 +00:00
Merge pull request #7840 from lioncash/bitor
texture_cache: Amend unintended bitwise OR in SynchronizeAliases
This commit is contained in:
commit
150f6db4d1
1 changed files with 3 additions and 15 deletions
|
@ -343,7 +343,7 @@ template <bool has_blacklists>
|
||||||
void TextureCache<P>::FillImageViews(DescriptorTable<TICEntry>& table,
|
void TextureCache<P>::FillImageViews(DescriptorTable<TICEntry>& table,
|
||||||
std::span<ImageViewId> cached_image_view_ids,
|
std::span<ImageViewId> cached_image_view_ids,
|
||||||
std::span<ImageViewInOut> views) {
|
std::span<ImageViewInOut> views) {
|
||||||
bool has_blacklisted;
|
bool has_blacklisted = false;
|
||||||
do {
|
do {
|
||||||
has_deleted_images = false;
|
has_deleted_images = false;
|
||||||
if constexpr (has_blacklists) {
|
if constexpr (has_blacklists) {
|
||||||
|
@ -1725,7 +1725,7 @@ void TextureCache<P>::SynchronizeAliases(ImageId image_id) {
|
||||||
});
|
});
|
||||||
const auto& resolution = Settings::values.resolution_info;
|
const auto& resolution = Settings::values.resolution_info;
|
||||||
for (const AliasedImage* const aliased : aliased_images) {
|
for (const AliasedImage* const aliased : aliased_images) {
|
||||||
if (!resolution.active | !any_rescaled) {
|
if (!resolution.active || !any_rescaled) {
|
||||||
CopyImage(image_id, aliased->id, aliased->copies);
|
CopyImage(image_id, aliased->id, aliased->copies);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -1736,19 +1736,7 @@ void TextureCache<P>::SynchronizeAliases(ImageId image_id) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
ScaleUp(aliased_image);
|
ScaleUp(aliased_image);
|
||||||
|
CopyImage(image_id, aliased->id, aliased->copies);
|
||||||
const bool both_2d{image.info.type == ImageType::e2D &&
|
|
||||||
aliased_image.info.type == ImageType::e2D};
|
|
||||||
auto copies = aliased->copies;
|
|
||||||
for (auto copy : copies) {
|
|
||||||
copy.extent.width = std::max<u32>(
|
|
||||||
(copy.extent.width * resolution.up_scale) >> resolution.down_shift, 1);
|
|
||||||
if (both_2d) {
|
|
||||||
copy.extent.height = std::max<u32>(
|
|
||||||
(copy.extent.height * resolution.up_scale) >> resolution.down_shift, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
CopyImage(image_id, aliased->id, copies);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue