Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
4c3d2d5d75 | |||
fab11ba3f1 |
@ -644,5 +644,6 @@
|
|||||||
"UserEditorTitleCreate" : "Create User",
|
"UserEditorTitleCreate" : "Create User",
|
||||||
"SettingsTabNetworkInterface": "Network Interface:",
|
"SettingsTabNetworkInterface": "Network Interface:",
|
||||||
"NetworkInterfaceTooltip": "The network interface used for LAN features",
|
"NetworkInterfaceTooltip": "The network interface used for LAN features",
|
||||||
"NetworkInterfaceDefault": "Default"
|
"NetworkInterfaceDefault": "Default",
|
||||||
|
"PackagingShaders": "Packaging Shaders"
|
||||||
}
|
}
|
||||||
|
@ -1099,6 +1099,10 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||||||
LoadHeading = LocaleManager.Instance[LocaleKeys.CompilingShaders];
|
LoadHeading = LocaleManager.Instance[LocaleKeys.CompilingShaders];
|
||||||
IsLoadingIndeterminate = false;
|
IsLoadingIndeterminate = false;
|
||||||
break;
|
break;
|
||||||
|
case ShaderCacheLoadingState.Packaging:
|
||||||
|
LoadHeading = LocaleManager.Instance[LocaleKeys.PackagingShaders];
|
||||||
|
IsLoadingIndeterminate = false;
|
||||||
|
break;
|
||||||
case ShaderCacheLoadingState.Loaded:
|
case ShaderCacheLoadingState.Loaded:
|
||||||
LoadHeading = LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.LoadingHeading, TitleName);
|
LoadHeading = LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.LoadingHeading, TitleName);
|
||||||
IsLoadingIndeterminate = true;
|
IsLoadingIndeterminate = true;
|
||||||
|
@ -299,10 +299,13 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
|
|||||||
|
|
||||||
if (_programList.Count != 0)
|
if (_programList.Count != 0)
|
||||||
{
|
{
|
||||||
|
_stateChangeCallback(ShaderCacheState.Packaging, 0, _programList.Count);
|
||||||
|
|
||||||
Logger.Info?.Print(LogClass.Gpu, $"Rebuilding {_programList.Count} shaders...");
|
Logger.Info?.Print(LogClass.Gpu, $"Rebuilding {_programList.Count} shaders...");
|
||||||
|
|
||||||
using var streams = _hostStorage.GetOutputStreams(_context);
|
using var streams = _hostStorage.GetOutputStreams(_context);
|
||||||
|
|
||||||
|
int packagedShaders = 0;
|
||||||
foreach (var kv in _programList)
|
foreach (var kv in _programList)
|
||||||
{
|
{
|
||||||
if (!Active)
|
if (!Active)
|
||||||
@ -311,7 +314,10 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
|
|||||||
}
|
}
|
||||||
|
|
||||||
(CachedShaderProgram program, byte[] binaryCode) = kv.Value;
|
(CachedShaderProgram program, byte[] binaryCode) = kv.Value;
|
||||||
|
|
||||||
_hostStorage.AddShader(_context, program, binaryCode, streams);
|
_hostStorage.AddShader(_context, program, binaryCode, streams);
|
||||||
|
|
||||||
|
_stateChangeCallback(ShaderCacheState.Packaging, ++packagedShaders, _programList.Count);
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger.Info?.Print(LogClass.Gpu, $"Rebuilt {_programList.Count} shaders successfully.");
|
Logger.Info?.Print(LogClass.Gpu, $"Rebuilt {_programList.Count} shaders successfully.");
|
||||||
|
@ -7,6 +7,8 @@ namespace Ryujinx.Graphics.Gpu.Shader
|
|||||||
Start,
|
Start,
|
||||||
/// <summary>Shader cache is loading</summary>
|
/// <summary>Shader cache is loading</summary>
|
||||||
Loading,
|
Loading,
|
||||||
|
/// <summary>Shader cache is written to disk</summary>
|
||||||
|
Packaging,
|
||||||
/// <summary>Shader cache finished loading</summary>
|
/// <summary>Shader cache finished loading</summary>
|
||||||
Loaded
|
Loaded
|
||||||
}
|
}
|
||||||
|
@ -92,6 +92,15 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService
|
|||||||
return ResultCode.Success;
|
return ResultCode.Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[CommandCmif(23)]
|
||||||
|
// GetAppletCommonFunctions() -> object<nn::am::service::IAppletCommonFunctions>
|
||||||
|
public ResultCode GetAppletCommonFunctions(ServiceCtx context)
|
||||||
|
{
|
||||||
|
MakeObject(context, new IAppletCommonFunctions());
|
||||||
|
|
||||||
|
return ResultCode.Success;
|
||||||
|
}
|
||||||
|
|
||||||
[CommandCmif(1000)]
|
[CommandCmif(1000)]
|
||||||
// GetDebugFunctions() -> object<nn::am::service::IDebugFunctions>
|
// GetDebugFunctions() -> object<nn::am::service::IDebugFunctions>
|
||||||
public ResultCode GetDebugFunctions(ServiceCtx context)
|
public ResultCode GetDebugFunctions(ServiceCtx context)
|
||||||
|
@ -9,8 +9,10 @@ using System;
|
|||||||
|
|
||||||
namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.SystemAppletProxy
|
namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.SystemAppletProxy
|
||||||
{
|
{
|
||||||
class ICommonStateGetter : IpcService
|
class ICommonStateGetter : DisposableIpcService
|
||||||
{
|
{
|
||||||
|
private readonly ServiceCtx _context;
|
||||||
|
|
||||||
private Apm.ManagerServer _apmManagerServer;
|
private Apm.ManagerServer _apmManagerServer;
|
||||||
private Apm.SystemManagerServer _apmSystemManagerServer;
|
private Apm.SystemManagerServer _apmSystemManagerServer;
|
||||||
private Lbl.LblControllerServer _lblControllerServer;
|
private Lbl.LblControllerServer _lblControllerServer;
|
||||||
@ -23,11 +25,18 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys
|
|||||||
private int _messageEventHandle;
|
private int _messageEventHandle;
|
||||||
private int _displayResolutionChangedEventHandle;
|
private int _displayResolutionChangedEventHandle;
|
||||||
|
|
||||||
|
private KEvent _acquiredSleepLockEvent;
|
||||||
|
private int _acquiredSleepLockEventHandle;
|
||||||
|
|
||||||
public ICommonStateGetter(ServiceCtx context)
|
public ICommonStateGetter(ServiceCtx context)
|
||||||
{
|
{
|
||||||
|
_context = context;
|
||||||
|
|
||||||
_apmManagerServer = new Apm.ManagerServer(context);
|
_apmManagerServer = new Apm.ManagerServer(context);
|
||||||
_apmSystemManagerServer = new Apm.SystemManagerServer(context);
|
_apmSystemManagerServer = new Apm.SystemManagerServer(context);
|
||||||
_lblControllerServer = new Lbl.LblControllerServer(context);
|
_lblControllerServer = new Lbl.LblControllerServer(context);
|
||||||
|
|
||||||
|
_acquiredSleepLockEvent = new KEvent(context.Device.System.KernelContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
[CommandCmif(0)]
|
[CommandCmif(0)]
|
||||||
@ -117,6 +126,34 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys
|
|||||||
return ResultCode.Success;
|
return ResultCode.Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[CommandCmif(10)]
|
||||||
|
// RequestToAcquireSleepLock()
|
||||||
|
public ResultCode RequestToAcquireSleepLock(ServiceCtx context)
|
||||||
|
{
|
||||||
|
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
|
return ResultCode.Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
[CommandCmif(13)]
|
||||||
|
// GetAcquiredSleepLockEvent() -> handle<copy>
|
||||||
|
public ResultCode GetAcquiredSleepLockEvent(ServiceCtx context)
|
||||||
|
{
|
||||||
|
if (_acquiredSleepLockEventHandle == 0)
|
||||||
|
{
|
||||||
|
if (context.Process.HandleTable.GenerateHandle(_acquiredSleepLockEvent.ReadableEvent, out _acquiredSleepLockEventHandle) != Result.Success)
|
||||||
|
{
|
||||||
|
throw new InvalidOperationException("Out of handles!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(_acquiredSleepLockEventHandle);
|
||||||
|
|
||||||
|
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
|
return ResultCode.Success;
|
||||||
|
}
|
||||||
|
|
||||||
[CommandCmif(50)] // 3.0.0+
|
[CommandCmif(50)] // 3.0.0+
|
||||||
// IsVrModeEnabled() -> b8
|
// IsVrModeEnabled() -> b8
|
||||||
public ResultCode IsVrModeEnabled(ServiceCtx context)
|
public ResultCode IsVrModeEnabled(ServiceCtx context)
|
||||||
@ -281,5 +318,17 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys
|
|||||||
|
|
||||||
return ResultCode.Success;
|
return ResultCode.Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void Dispose(bool isDisposing)
|
||||||
|
{
|
||||||
|
if (isDisposing)
|
||||||
|
{
|
||||||
|
if (_acquiredSleepLockEventHandle != 0)
|
||||||
|
{
|
||||||
|
_context.Process.HandleTable.CloseHandle(_acquiredSleepLockEventHandle);
|
||||||
|
_acquiredSleepLockEventHandle = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user