Texture Cache: More rescaling fixes.
This commit is contained in:
parent
10e5065a5c
commit
84f2aea896
4 changed files with 102 additions and 90 deletions
|
@ -1078,6 +1078,10 @@ bool Image::ScaleUp(bool save_as_backup) {
|
|||
MemoryCommit new_commit(
|
||||
runtime->memory_allocator.Commit(rescaled_image, MemoryUsage::DeviceLocal));
|
||||
|
||||
if (aspect_mask == 0) {
|
||||
aspect_mask = ImageAspectMask(info.format);
|
||||
}
|
||||
|
||||
const auto scale_up = [&](u32 value) {
|
||||
return (value * resolution.up_scale) >> resolution.down_shift;
|
||||
};
|
||||
|
@ -1170,6 +1174,10 @@ bool Image::ScaleDown(bool save_as_backup) {
|
|||
return (value * resolution.up_scale) >> resolution.down_shift;
|
||||
};
|
||||
|
||||
if (aspect_mask == 0) {
|
||||
aspect_mask = ImageAspectMask(info.format);
|
||||
}
|
||||
|
||||
const bool is_2d = info.type == ImageType::e2D;
|
||||
boost::container::small_vector<VkImageBlit, 4> vkRegions(info.resources.levels);
|
||||
for (s32 level = 0; level < info.resources.levels; level++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue