aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Core
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2018-05-17 15:25:42 -0300
committergdkchan <gab.dark.100@gmail.com>2018-05-17 15:25:42 -0300
commitb19c4740823ed8fcebf62bf5741a7614a2ac0aa0 (patch)
tree8cdede3fdb90aa35ffe50c004559b80d4704bea3 /Ryujinx.Core
parent9b9ead94cd2f25a85468ecf91b7898bf34e10825 (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')
-rw-r--r--Ryujinx.Core/Gpu/TextureFactory.cs15
-rw-r--r--Ryujinx.Core/OsHle/Kernel/SvcThread.cs7
-rw-r--r--Ryujinx.Core/OsHle/Services/Nifm/IRequest.cs18
-rw-r--r--Ryujinx.Core/OsHle/Services/Prepo/IPrepoService.cs10
4 files changed, 43 insertions, 7 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)
diff --git a/Ryujinx.Core/OsHle/Kernel/SvcThread.cs b/Ryujinx.Core/OsHle/Kernel/SvcThread.cs
index b504f81a..8aa26dd3 100644
--- a/Ryujinx.Core/OsHle/Kernel/SvcThread.cs
+++ b/Ryujinx.Core/OsHle/Kernel/SvcThread.cs
@@ -141,6 +141,13 @@ namespace Ryujinx.Core.OsHle.Kernel
private void SvcSetThreadCoreMask(AThreadState ThreadState)
{
+ //FIXME: This is wrong, but the "correct" way to handle
+ //this svc causes deadlocks when more often.
+ //There is probably something wrong with it still.
+ ThreadState.X0 = 0;
+
+ return;
+
int Handle = (int)ThreadState.X0;
int IdealCore = (int)ThreadState.X1;
long CoreMask = (long)ThreadState.X2;
diff --git a/Ryujinx.Core/OsHle/Services/Nifm/IRequest.cs b/Ryujinx.Core/OsHle/Services/Nifm/IRequest.cs
index 7de5a4d9..0d1aa5e4 100644
--- a/Ryujinx.Core/OsHle/Services/Nifm/IRequest.cs
+++ b/Ryujinx.Core/OsHle/Services/Nifm/IRequest.cs
@@ -18,11 +18,12 @@ namespace Ryujinx.Core.OsHle.Services.Nifm
{
m_Commands = new Dictionary<int, ServiceProcessRequest>()
{
- { 0, GetRequestState },
- { 1, GetResult },
- { 2, GetSystemEventReadableHandles },
- { 3, Cancel },
- { 4, Submit },
+ { 0, GetRequestState },
+ { 1, GetResult },
+ { 2, GetSystemEventReadableHandles },
+ { 3, Cancel },
+ { 4, Submit },
+ { 11, SetConnectionConfirmationOption }
};
Event = new KEvent();
@@ -69,6 +70,13 @@ namespace Ryujinx.Core.OsHle.Services.Nifm
return 0;
}
+ public long SetConnectionConfirmationOption(ServiceCtx Context)
+ {
+ Context.Ns.Log.PrintStub(LogClass.ServiceNifm, "Stubbed.");
+
+ return 0;
+ }
+
public void Dispose()
{
Dispose(true);
diff --git a/Ryujinx.Core/OsHle/Services/Prepo/IPrepoService.cs b/Ryujinx.Core/OsHle/Services/Prepo/IPrepoService.cs
index 42e43841..dbf01c6b 100644
--- a/Ryujinx.Core/OsHle/Services/Prepo/IPrepoService.cs
+++ b/Ryujinx.Core/OsHle/Services/Prepo/IPrepoService.cs
@@ -1,3 +1,4 @@
+using Ryujinx.Core.Logging;
using Ryujinx.Core.OsHle.Ipc;
using System.Collections.Generic;
@@ -13,8 +14,15 @@ namespace Ryujinx.Core.OsHle.Services.Prepo
{
m_Commands = new Dictionary<int, ServiceProcessRequest>()
{
- //...
+ { 10101, SaveReportWithUser }
};
}
+
+ public static long SaveReportWithUser(ServiceCtx Context)
+ {
+ Context.Ns.Log.PrintStub(LogClass.ServicePrepo, "Stubbed.");
+
+ return 0;
+ }
}
} \ No newline at end of file