Explorar o código

Fix mip offset/size for full 3D texture upload on Vulkan (#6294)

gdkchan %!s(int64=2) %!d(string=hai) anos
pai
achega
6a8ac389e5
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      src/Ryujinx.Graphics.Vulkan/TextureView.cs

+ 3 - 1
src/Ryujinx.Graphics.Vulkan/TextureView.cs

@@ -839,7 +839,9 @@ namespace Ryujinx.Graphics.Vulkan
 
             for (int level = 0; level < levels; level++)
             {
-                int mipSize = GetBufferDataLength(Info.GetMipSize2D(dstLevel + level) * dstLayers);
+                int mipSize = GetBufferDataLength(is3D && !singleSlice
+                    ? Info.GetMipSize(dstLevel + level)
+                    : Info.GetMipSize2D(dstLevel + level) * dstLayers);
 
                 int endOffset = offset + mipSize;