瀏覽代碼

Fix sampled multisample image size (#2984)

gdkchan 4 年之前
父節點
當前提交
952c6e4d45
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      Ryujinx.Graphics.Gpu/Image/TexturePool.cs

+ 7 - 0
Ryujinx.Graphics.Gpu/Image/TexturePool.cs

@@ -196,6 +196,13 @@ namespace Ryujinx.Graphics.Gpu.Image
             int width = target == Target.TextureBuffer ? descriptor.UnpackBufferTextureWidth() : descriptor.UnpackWidth();
             int width = target == Target.TextureBuffer ? descriptor.UnpackBufferTextureWidth() : descriptor.UnpackWidth();
             int height = descriptor.UnpackHeight();
             int height = descriptor.UnpackHeight();
 
 
+            if (target == Target.Texture2DMultisample || target == Target.Texture2DMultisampleArray)
+            {
+                // This is divided back before the backend texture is created.
+                width *= samplesInX;
+                height *= samplesInY;
+            }
+
             // We use 2D targets for 1D textures as that makes texture cache
             // We use 2D targets for 1D textures as that makes texture cache
             // management easier. We don't know the target for render target
             // management easier. We don't know the target for render target
             // and copies, so those would normally use 2D targets, which are
             // and copies, so those would normally use 2D targets, which are