diff options
-rw-r--r-- | src/Ryujinx.Graphics.Gpu/Engine/Threed/ThreedClassState.cs | 8 | ||||
-rw-r--r-- | src/Ryujinx.Graphics.Gpu/Image/TextureCache.cs | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/src/Ryujinx.Graphics.Gpu/Engine/Threed/ThreedClassState.cs b/src/Ryujinx.Graphics.Gpu/Engine/Threed/ThreedClassState.cs index dd55e7d1d..35051c6e0 100644 --- a/src/Ryujinx.Graphics.Gpu/Engine/Threed/ThreedClassState.cs +++ b/src/Ryujinx.Graphics.Gpu/Engine/Threed/ThreedClassState.cs | |||
@@ -415,7 +415,13 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed | |||
415 | #pragma warning disable CS0649 // Field is never assigned to | 415 | #pragma warning disable CS0649 // Field is never assigned to |
416 | public int Width; | 416 | public int Width; |
417 | public int Height; | 417 | public int Height; |
418 | public int Depth; | 418 | public ushort Depth; |
419 | public ushort Flags; | ||
420 | |||
421 | public readonly bool UnpackIsLayered() | ||
422 | { | ||
423 | return (Flags & 1) == 0; | ||
424 | } | ||
419 | #pragma warning restore CS0649 | 425 | #pragma warning restore CS0649 |
420 | } | 426 | } |
421 | 427 | ||
diff --git a/src/Ryujinx.Graphics.Gpu/Image/TextureCache.cs b/src/Ryujinx.Graphics.Gpu/Image/TextureCache.cs index b9ff060e2..b6fa842e3 100644 --- a/src/Ryujinx.Graphics.Gpu/Image/TextureCache.cs +++ b/src/Ryujinx.Graphics.Gpu/Image/TextureCache.cs | |||
@@ -468,13 +468,11 @@ namespace Ryujinx.Graphics.Gpu.Image | |||
468 | int gobBlocksInY = dsState.MemoryLayout.UnpackGobBlocksInY(); | 468 | int gobBlocksInY = dsState.MemoryLayout.UnpackGobBlocksInY(); |
469 | int gobBlocksInZ = dsState.MemoryLayout.UnpackGobBlocksInZ(); | 469 | int gobBlocksInZ = dsState.MemoryLayout.UnpackGobBlocksInZ(); |
470 | 470 | ||
471 | layered &= size.UnpackIsLayered(); | ||
472 | |||
471 | Target target; | 473 | Target target; |
472 | 474 | ||
473 | if (dsState.MemoryLayout.UnpackIsTarget3D()) | 475 | if ((samplesInX | samplesInY) != 1) |
474 | { | ||
475 | target = Target.Texture3D; | ||
476 | } | ||
477 | else if ((samplesInX | samplesInY) != 1) | ||
478 | { | 476 | { |
479 | target = size.Depth > 1 && layered | 477 | target = size.Depth > 1 && layered |
480 | ? Target.Texture2DMultisampleArray | 478 | ? Target.Texture2DMultisampleArray |