diff --git a/GPU/Common/TextureScalerCommon.cpp b/GPU/Common/TextureScalerCommon.cpp index 46d80f0aad..0ecce4c72d 100644 --- a/GPU/Common/TextureScalerCommon.cpp +++ b/GPU/Common/TextureScalerCommon.cpp @@ -499,11 +499,10 @@ TextureScalerCommon::TextureScalerCommon() { TextureScalerCommon::~TextureScalerCommon() { } -bool TextureScalerCommon::IsEmptyOrFlat(u32* data, int pixels) { - int pixelsPerWord = 1; +bool TextureScalerCommon::IsEmptyOrFlat(const u32 *data, int pixels) const { u32 ref = data[0]; - // TODO: SIMD-ify this (although, for most textures we'll get our very early) - for (int i = 0; i < pixels; ++i) { + // TODO: SIMD-ify this (although, for most textures we'll get out very early) + for (int i = 1; i < pixels; ++i) { if (data[i] != ref) return false; } diff --git a/GPU/Common/TextureScalerCommon.h b/GPU/Common/TextureScalerCommon.h index 80ce86d6e4..ee5b2f550c 100644 --- a/GPU/Common/TextureScalerCommon.h +++ b/GPU/Common/TextureScalerCommon.h @@ -45,7 +45,7 @@ protected: void DePosterize(u32* source, u32* dest, int width, int height); - bool IsEmptyOrFlat(u32* data, int pixels); + bool IsEmptyOrFlat(const u32 *data, int pixels) const; // depending on the factor and texture sizes, these can get pretty large // maximum is (100 MB total for a 512 by 512 texture with scaling factor 5 and hybrid scaling) diff --git a/GPU/Vulkan/TextureCacheVulkan.cpp b/GPU/Vulkan/TextureCacheVulkan.cpp index 42a74b02d8..f396c57769 100644 --- a/GPU/Vulkan/TextureCacheVulkan.cpp +++ b/GPU/Vulkan/TextureCacheVulkan.cpp @@ -581,7 +581,7 @@ void TextureCacheVulkan::BuildTexture(TexCacheEntry *const entry) { BuildTexturePlan plan; plan.hardwareScaling = g_Config.bTexHardwareScaling && uploadCS_ != VK_NULL_HANDLE; - plan.slowScaler = !plan.hardwareScaling || vulkan->DevicePerfClass() == PerfClass::SLOW; // Or the GPU is slow - TODO add check! + plan.slowScaler = !plan.hardwareScaling || vulkan->DevicePerfClass() == PerfClass::SLOW; if (!PrepareBuildTexture(plan, entry)) { // We're screwed? return;