diff options
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Image/TextureCache.cs')
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Image/TextureCache.cs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Ryujinx.Graphics.Gpu/Image/TextureCache.cs b/Ryujinx.Graphics.Gpu/Image/TextureCache.cs index a6fa9652..cc6867a6 100644 --- a/Ryujinx.Graphics.Gpu/Image/TextureCache.cs +++ b/Ryujinx.Graphics.Gpu/Image/TextureCache.cs @@ -244,11 +244,18 @@ namespace Ryujinx.Graphics.Gpu.Image /// </summary> /// <param name="memoryManager">GPU memory manager where the texture is mapped</param> /// <param name="colorState">Color buffer texture to find or create</param> + /// <param name="layered">Indicates if the texture might be accessed with a non-zero layer index</param> /// <param name="samplesInX">Number of samples in the X direction, for MSAA</param> /// <param name="samplesInY">Number of samples in the Y direction, for MSAA</param> /// <param name="sizeHint">A hint indicating the minimum used size for the texture</param> /// <returns>The texture</returns> - public Texture FindOrCreateTexture(MemoryManager memoryManager, RtColorState colorState, int samplesInX, int samplesInY, Size sizeHint) + public Texture FindOrCreateTexture( + MemoryManager memoryManager, + RtColorState colorState, + bool layered, + int samplesInX, + int samplesInY, + Size sizeHint) { bool isLinear = colorState.MemoryLayout.UnpackIsLinear(); @@ -263,13 +270,13 @@ namespace Ryujinx.Graphics.Gpu.Image } else if ((samplesInX | samplesInY) != 1) { - target = colorState.Depth > 1 + target = colorState.Depth > 1 && layered ? Target.Texture2DMultisampleArray : Target.Texture2DMultisample; } else { - target = colorState.Depth > 1 + target = colorState.Depth > 1 && layered ? Target.Texture2DArray : Target.Texture2D; } |
