From bea1fc2e8d40ec792964852f57e7b884dfbd8306 Mon Sep 17 00:00:00 2001 From: riperiperi Date: Sat, 13 Jun 2020 23:31:06 +0100 Subject: 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. --- Ryujinx.Graphics.Texture/Bpp12Pixel.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Ryujinx.Graphics.Texture/Bpp12Pixel.cs (limited to 'Ryujinx.Graphics.Texture/Bpp12Pixel.cs') 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; + } +} -- cgit v1.2.3