Archived
1
0
Fork 0
forked from Mirror/Ryujinx

Fix sampled multisample image size (#2984)

This commit is contained in:
gdkchan 2022-01-10 04:45:25 -03:00 committed by GitHub
parent cda659955c
commit 952c6e4d45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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