aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/Gpu/Texture/TextureReader.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2018-07-19 02:30:21 -0300
committerGitHub <noreply@github.com>2018-07-19 02:30:21 -0300
commit60f2198a1e8e61fe1cfb8da30a6afcd86a672a85 (patch)
treebe608a9f483e751d6d4bf4d9037048c94d495b0d /Ryujinx.HLE/Gpu/Texture/TextureReader.cs
parent8b685b12f0b7a901139999dff17b24b049b9084b (diff)
Support deswizzle of sparse tiled textures and some frame buffer fixes (#275)
* Attempt to support deswizzle of sparse tiled textures * Use correct frame buffer and viewport sizes, started to clean up the copy engine * Correct texture width alignment * Use Scale/Translate registers to calculate viewport rect * Allow texture copy between frame buffers
Diffstat (limited to 'Ryujinx.HLE/Gpu/Texture/TextureReader.cs')
-rw-r--r--Ryujinx.HLE/Gpu/Texture/TextureReader.cs18
1 files changed, 9 insertions, 9 deletions
diff --git a/Ryujinx.HLE/Gpu/Texture/TextureReader.cs b/Ryujinx.HLE/Gpu/Texture/TextureReader.cs
index 26129877..350ab825 100644
--- a/Ryujinx.HLE/Gpu/Texture/TextureReader.cs
+++ b/Ryujinx.HLE/Gpu/Texture/TextureReader.cs
@@ -56,7 +56,7 @@ namespace Ryujinx.HLE.Gpu.Texture
byte[] Output = new byte[Width * Height];
- ISwizzle Swizzle = TextureHelper.GetSwizzle(Texture, Width, 1);
+ ISwizzle Swizzle = TextureHelper.GetSwizzle(Texture, 1, 1);
(AMemory CpuMem, long Position) = TextureHelper.GetMemoryAndPosition(
Memory,
@@ -89,7 +89,7 @@ namespace Ryujinx.HLE.Gpu.Texture
byte[] Output = new byte[Width * Height * 2];
- ISwizzle Swizzle = TextureHelper.GetSwizzle(Texture, Width, 2);
+ ISwizzle Swizzle = TextureHelper.GetSwizzle(Texture, 1, 2);
(AMemory CpuMem, long Position) = TextureHelper.GetMemoryAndPosition(
Memory,
@@ -127,7 +127,7 @@ namespace Ryujinx.HLE.Gpu.Texture
byte[] Output = new byte[Width * Height * 2];
- ISwizzle Swizzle = TextureHelper.GetSwizzle(Texture, Width, 2);
+ ISwizzle Swizzle = TextureHelper.GetSwizzle(Texture, 1, 2);
(AMemory CpuMem, long Position) = TextureHelper.GetMemoryAndPosition(
Memory,
@@ -164,7 +164,7 @@ namespace Ryujinx.HLE.Gpu.Texture
byte[] Output = new byte[Width * Height * 2];
- ISwizzle Swizzle = TextureHelper.GetSwizzle(Texture, Width, 2);
+ ISwizzle Swizzle = TextureHelper.GetSwizzle(Texture, 1, 2);
(AMemory CpuMem, long Position) = TextureHelper.GetMemoryAndPosition(
Memory,
@@ -197,7 +197,7 @@ namespace Ryujinx.HLE.Gpu.Texture
byte[] Output = new byte[Width * Height * 4];
- ISwizzle Swizzle = TextureHelper.GetSwizzle(Texture, Width, 4);
+ ISwizzle Swizzle = TextureHelper.GetSwizzle(Texture, 1, 4);
(AMemory CpuMem, long Position) = TextureHelper.GetMemoryAndPosition(
Memory,
@@ -230,7 +230,7 @@ namespace Ryujinx.HLE.Gpu.Texture
byte[] Output = new byte[Width * Height * 8];
- ISwizzle Swizzle = TextureHelper.GetSwizzle(Texture, Width, 8);
+ ISwizzle Swizzle = TextureHelper.GetSwizzle(Texture, 1, 8);
(AMemory CpuMem, long Position) = TextureHelper.GetMemoryAndPosition(
Memory,
@@ -263,7 +263,7 @@ namespace Ryujinx.HLE.Gpu.Texture
byte[] Output = new byte[Width * Height * 16];
- ISwizzle Swizzle = TextureHelper.GetSwizzle(Texture, Width, 16);
+ ISwizzle Swizzle = TextureHelper.GetSwizzle(Texture, 1, 16);
(AMemory CpuMem, long Position) = TextureHelper.GetMemoryAndPosition(
Memory,
@@ -298,7 +298,7 @@ namespace Ryujinx.HLE.Gpu.Texture
byte[] Output = new byte[Width * Height * 8];
- ISwizzle Swizzle = TextureHelper.GetSwizzle(Texture, Width, 8);
+ ISwizzle Swizzle = TextureHelper.GetSwizzle(Texture, 4, 8);
(AMemory CpuMem, long Position) = TextureHelper.GetMemoryAndPosition(
Memory,
@@ -331,7 +331,7 @@ namespace Ryujinx.HLE.Gpu.Texture
byte[] Output = new byte[Width * Height * 16];
- ISwizzle Swizzle = TextureHelper.GetSwizzle(Texture, Width, 16);
+ ISwizzle Swizzle = TextureHelper.GetSwizzle(Texture, BlockWidth, 16);
(AMemory CpuMem, long Position) = TextureHelper.GetMemoryAndPosition(
Memory,