diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2018-05-17 15:25:42 -0300 |
|---|---|---|
| committer | gdkchan <gab.dark.100@gmail.com> | 2018-05-17 15:25:42 -0300 |
| commit | b19c4740823ed8fcebf62bf5741a7614a2ac0aa0 (patch) | |
| tree | 8cdede3fdb90aa35ffe50c004559b80d4704bea3 /Ryujinx.Core/Gpu | |
| parent | 9b9ead94cd2f25a85468ecf91b7898bf34e10825 (diff) | |
Added more shader instructions, including BFE, BRA (partial), FMNMX, ISCADD, SHL, LD_C, some shader related fixes, added support for texture component selection
Diffstat (limited to 'Ryujinx.Core/Gpu')
| -rw-r--r-- | Ryujinx.Core/Gpu/TextureFactory.cs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/Ryujinx.Core/Gpu/TextureFactory.cs b/Ryujinx.Core/Gpu/TextureFactory.cs index 68b48a1f..5206c125 100644 --- a/Ryujinx.Core/Gpu/TextureFactory.cs +++ b/Ryujinx.Core/Gpu/TextureFactory.cs @@ -11,6 +11,11 @@ namespace Ryujinx.Core.Gpu GalTextureFormat Format = (GalTextureFormat)(Tic[0] & 0x7f); + GalTextureSource XSource = (GalTextureSource)((Tic[0] >> 19) & 7); + GalTextureSource YSource = (GalTextureSource)((Tic[0] >> 22) & 7); + GalTextureSource ZSource = (GalTextureSource)((Tic[0] >> 25) & 7); + GalTextureSource WSource = (GalTextureSource)((Tic[0] >> 28) & 7); + long TextureAddress = (uint)Tic[1]; TextureAddress |= (long)((ushort)Tic[2]) << 32; @@ -37,7 +42,15 @@ namespace Ryujinx.Core.Gpu byte[] Data = TextureReader.Read(Vmm, Texture); - return new GalTexture(Data, Width, Height, Format); + return new GalTexture( + Data, + Width, + Height, + Format, + XSource, + YSource, + ZSource, + WSource); } public static GalTextureSampler MakeSampler(NvGpu Gpu, NvGpuVmm Vmm, long TscPosition) |
