aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Texture/Bpp12Pixel.cs
diff options
context:
space:
mode:
authorriperiperi <rhy3756547@hotmail.com>2020-06-13 23:31:06 +0100
committerGitHub <noreply@github.com>2020-06-13 19:31:06 -0300
commitbea1fc2e8d40ec792964852f57e7b884dfbd8306 (patch)
tree8cbbb5bb49d8c1ff635ddd1bb81e58f39a1b7eaf /Ryujinx.Graphics.Texture/Bpp12Pixel.cs
parentce983f360b3353bbcd73f3e58c24a23a22e1c94d (diff)
Optimize texture format conversion, and MethodCopyBuffer (#1274)
* Improve performance when converting texture formats. Still more work to do. * Speed up buffer -> texture copies. No longer copies byte by byte. Fast path when formats are identical. * Fix a few things, 64 byte block fast copy. * Spacing cleanup, unrelated change. * Fix base offset calculation for region copies. * Fix Linear -> BlockLinear * Fix some nits. (part 1 of review feedback) * Use a generic version of the Convert* functions rather than lambdas. This is some real monkey's paw shit. * Remove unnecessary span constructor. * Revert "Use a generic version of the Convert* functions rather than lambdas." This reverts commit aa43dcfbe8bba291eea4e10c68569af7a56a5851. * Fix bug with rectangle destination writing, better rectangle calculation for linear textures.
Diffstat (limited to 'Ryujinx.Graphics.Texture/Bpp12Pixel.cs')
-rw-r--r--Ryujinx.Graphics.Texture/Bpp12Pixel.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Texture/Bpp12Pixel.cs b/Ryujinx.Graphics.Texture/Bpp12Pixel.cs
new file mode 100644
index 00000000..5a38259e
--- /dev/null
+++ b/Ryujinx.Graphics.Texture/Bpp12Pixel.cs
@@ -0,0 +1,11 @@
+using System.Runtime.InteropServices;
+
+namespace Ryujinx.Graphics.Texture
+{
+ [StructLayout(LayoutKind.Sequential, Pack = 1, Size = 12)]
+ public struct Bpp12Pixel
+ {
+ private ulong _elem1;
+ private uint _elem2;
+ }
+}