From 8400bd3d7b6482ff4dd61b579cf463289374a9ac Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Fri, 9 Jun 2023 05:51:03 +0200 Subject: [PATCH] early-access version 3652 --- README.md | 2 +- .../yuzu_emu/activities/EmulationActivity.kt | 3 ++- src/common/uuid.cpp | 2 +- src/video_core/texture_cache/image_info.cpp | 20 +++++++++++-------- 4 files changed, 16 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 94ce4d5cc..d2bf73af7 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 3651. +This is the source code for early-access 3652. ## Legal Notice diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt index 94d5156cf..f4db61cb3 100755 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt @@ -263,7 +263,8 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener { val config: Configuration = resources.configuration if ((config.screenLayout and Configuration.SCREENLAYOUT_LONG_YES) != 0 || - (config.screenLayout and Configuration.SCREENLAYOUT_LONG_NO) == 0) { + (config.screenLayout and Configuration.SCREENLAYOUT_LONG_NO) == 0 || + (config.screenLayout and Configuration.SCREENLAYOUT_SIZE_SMALL) != 0) { return rotation } when (rotation) { diff --git a/src/common/uuid.cpp b/src/common/uuid.cpp index 5d1629e72..13fa9f479 100755 --- a/src/common/uuid.cpp +++ b/src/common/uuid.cpp @@ -48,7 +48,7 @@ std::array ConstructFromRawString(std::string_view raw_string) { } std::array ConstructFromFormattedString(std::string_view formatted_string) { - std::array uuid; + std::array uuid{}; size_t i = 0; diff --git a/src/video_core/texture_cache/image_info.cpp b/src/video_core/texture_cache/image_info.cpp index dbe6018d8..22eb7bd00 100755 --- a/src/video_core/texture_cache/image_info.cpp +++ b/src/video_core/texture_cache/image_info.cpp @@ -22,6 +22,9 @@ using Tegra::Texture::TICEntry; using VideoCore::Surface::PixelFormat; using VideoCore::Surface::SurfaceType; +constexpr u32 RescaleHeightThreshold = 288; +constexpr u32 DownscaleHeightThreshold = 512; + ImageInfo::ImageInfo(const TICEntry& config) noexcept { forced_flushed = config.IsPitchLinear() && !Settings::values.use_reactive_flushing.GetValue(); dma_downloaded = forced_flushed; @@ -113,8 +116,9 @@ ImageInfo::ImageInfo(const TICEntry& config) noexcept { layer_stride = CalculateLayerStride(*this); maybe_unaligned_layer_stride = CalculateLayerSize(*this); rescaleable &= (block.depth == 0) && resources.levels == 1; - rescaleable &= size.height > 256 || GetFormatType(format) != SurfaceType::ColorTexture; - downscaleable = size.height > 512; + rescaleable &= size.height > RescaleHeightThreshold || + GetFormatType(format) != SurfaceType::ColorTexture; + downscaleable = size.height > DownscaleHeightThreshold; } } @@ -152,8 +156,8 @@ ImageInfo::ImageInfo(const Maxwell3D::Regs::RenderTargetConfig& ct, size.depth = ct.depth; } else { rescaleable = block.depth == 0; - rescaleable &= size.height > 256; - downscaleable = size.height > 512; + rescaleable &= size.height > RescaleHeightThreshold; + downscaleable = size.height > DownscaleHeightThreshold; type = ImageType::e2D; resources.layers = ct.depth; } @@ -232,8 +236,8 @@ ImageInfo::ImageInfo(const Fermi2D::Surface& config) noexcept { .height = config.height, .depth = 1, }; - rescaleable = block.depth == 0 && size.height > 256; - downscaleable = size.height > 512; + rescaleable = block.depth == 0 && size.height > RescaleHeightThreshold; + downscaleable = size.height > DownscaleHeightThreshold; } } @@ -275,8 +279,8 @@ ImageInfo::ImageInfo(const Tegra::DMA::ImageOperand& config) noexcept { resources.layers = 1; layer_stride = CalculateLayerStride(*this); maybe_unaligned_layer_stride = CalculateLayerSize(*this); - rescaleable = block.depth == 0 && size.height > 256; - downscaleable = size.height > 512; + rescaleable = block.depth == 0 && size.height > RescaleHeightThreshold; + downscaleable = size.height > DownscaleHeightThreshold; } } // namespace VideoCommon