From c77740acf00317e62283379a64dc59d21d7fca26 Mon Sep 17 00:00:00 2001 From: Wunkolo Date: Sat, 26 Aug 2023 22:44:57 -0700 Subject: [PATCH] Fix render-texture size Use the width/height provided and not the current `fbSize`. Fixes a division exception. --- src/core/renderer_vk/renderer_vk.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/renderer_vk/renderer_vk.cpp b/src/core/renderer_vk/renderer_vk.cpp index 6c6d9699..52c46668 100644 --- a/src/core/renderer_vk/renderer_vk.cpp +++ b/src/core/renderer_vk/renderer_vk.cpp @@ -265,7 +265,7 @@ RendererVK::Texture& RendererVK::getColorRenderTexture(u32 addr, PICA::ColorFmt Texture& newTexture = textureCache[renderTextureHash]; newTexture.loc = addr; newTexture.sizePerPixel = PICA::sizePerPixel(format); - newTexture.size = fbSize; + newTexture.size = {width, height}; newTexture.format = Vulkan::colorFormatToVulkan(format); @@ -338,7 +338,7 @@ RendererVK::Texture& RendererVK::getDepthRenderTexture(u32 addr, PICA::DepthFmt Texture& newTexture = textureCache[renderTextureHash]; newTexture.loc = addr; newTexture.sizePerPixel = PICA::sizePerPixel(format); - newTexture.size = fbSize; + newTexture.size = {width, height}; newTexture.format = Vulkan::depthFormatToVulkan(format);