aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Image/TexturePool.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2022-01-10 04:45:25 -0300
committerGitHub <noreply@github.com>2022-01-10 08:45:25 +0100
commit952c6e4d454082da900a447e6bd1deb272c150c2 (patch)
treea443b67bce6b3eba50eba8b980a6c7b8f29766cc /Ryujinx.Graphics.Gpu/Image/TexturePool.cs
parentcda659955ced1b16839cdd1e7fea1ef6f8d99041 (diff)
Fix sampled multisample image size (#2984)
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Image/TexturePool.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Image/TexturePool.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Gpu/Image/TexturePool.cs b/Ryujinx.Graphics.Gpu/Image/TexturePool.cs
index 66cd9d4d..f936615f 100644
--- a/Ryujinx.Graphics.Gpu/Image/TexturePool.cs
+++ b/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 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
// management easier. We don't know the target for render target
// and copies, so those would normally use 2D targets, which are