From 23ab2cd187d82e95f1b579b7002198f7b158e9d8 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 30 Apr 2016 23:59:17 -0700 Subject: [PATCH] Vulkan: Correct check alpha. --- GPU/Vulkan/TextureCacheVulkan.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/GPU/Vulkan/TextureCacheVulkan.cpp b/GPU/Vulkan/TextureCacheVulkan.cpp index 54fd164d6f..60194bd112 100644 --- a/GPU/Vulkan/TextureCacheVulkan.cpp +++ b/GPU/Vulkan/TextureCacheVulkan.cpp @@ -1634,13 +1634,13 @@ void TextureCacheVulkan::LoadTextureLevel(TexCacheEntry &entry, uint8_t *writePt // We always end up at 8888. Other parts assume this. assert(dstFmt == VULKAN_8888_FORMAT); - decPitch = w * sizeof(u32); - rowBytes = w * sizeof(u32); + bpp = sizeof(u32); + decPitch = w * bpp; + rowBytes = w * bpp; } if ((entry.status & TexCacheEntry::STATUS_CHANGE_FREQUENT) == 0) { - // TODO: bufw may be wrong. - TexCacheEntry::Status alphaStatus = CheckAlpha(pixelData, dstFmt, bufw, w, h); + TexCacheEntry::Status alphaStatus = CheckAlpha(pixelData, dstFmt, decPitch / bpp, w, h); entry.SetAlphaStatus(alphaStatus, level); } else { entry.SetAlphaStatus(TexCacheEntry::STATUS_ALPHA_UNKNOWN);