aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Image/TexturePool.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Image/TexturePool.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Image/TexturePool.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Ryujinx.Graphics.Gpu/Image/TexturePool.cs b/Ryujinx.Graphics.Gpu/Image/TexturePool.cs
index eece2a79..8f225f16 100644
--- a/Ryujinx.Graphics.Gpu/Image/TexturePool.cs
+++ b/Ryujinx.Graphics.Gpu/Image/TexturePool.cs
@@ -172,8 +172,6 @@ namespace Ryujinx.Graphics.Gpu.Image
/// <returns>The texture information</returns>
private TextureInfo GetInfo(TextureDescriptor descriptor, out int layerSize)
{
- int width = descriptor.UnpackWidth();
- int height = descriptor.UnpackHeight();
int depthOrLayers = descriptor.UnpackDepth();
int levels = descriptor.UnpackLevels();
@@ -190,6 +188,9 @@ namespace Ryujinx.Graphics.Gpu.Image
Target target = descriptor.UnpackTextureTarget().Convert((samplesInX | samplesInY) != 1);
+ int width = target == Target.TextureBuffer ? descriptor.UnpackBufferTextureWidth() : descriptor.UnpackWidth();
+ int height = descriptor.UnpackHeight();
+
// 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