diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2018-10-12 22:37:01 -0300 |
|---|---|---|
| committer | Ac_K <Acoustik666@gmail.com> | 2018-10-13 01:37:01 +0000 |
| commit | aa1cd849cfe254dc7c8c9a0783a546a4b9b3c0ab (patch) | |
| tree | e7d0f9d7399a835818068d7ca034b179cd95b91e /Ryujinx.Graphics/Texture/TextureFactory.cs | |
| parent | dd3cb33c9f43412617e2b2b76d9e2a4dec9a2a23 (diff) | |
Quads, QuadStrip, const attributes and half-float attributes support (#447)
* Quads, QuadStrip and const attributes support
* Add support for half float attributes and fix texture pitch alignment
* Throw when an unsupported float type is used as const attribute aswell
Diffstat (limited to 'Ryujinx.Graphics/Texture/TextureFactory.cs')
| -rw-r--r-- | Ryujinx.Graphics/Texture/TextureFactory.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Ryujinx.Graphics/Texture/TextureFactory.cs b/Ryujinx.Graphics/Texture/TextureFactory.cs index 766c53da..c0c53b06 100644 --- a/Ryujinx.Graphics/Texture/TextureFactory.cs +++ b/Ryujinx.Graphics/Texture/TextureFactory.cs @@ -40,7 +40,7 @@ namespace Ryujinx.Graphics.Texture int Width = (Tic[4] & 0xffff) + 1; int Height = (Tic[5] & 0xffff) + 1; - return new GalImage( + GalImage Image = new GalImage( Width, Height, TileWidth, @@ -51,6 +51,13 @@ namespace Ryujinx.Graphics.Texture YSource, ZSource, WSource); + + if (Layout == GalMemoryLayout.Pitch) + { + Image.Pitch = (Tic[3] & 0xffff) << 5; + } + + return Image; } public static GalTextureSampler MakeSampler(NvGpu Gpu, NvGpuVmm Vmm, long TscPosition) |
