forked from MeloNX/MeloNX
Reset Ryujinx
This commit is contained in:
parent
8d4f004a59
commit
e170ed01ad
@ -19,7 +19,7 @@ namespace ARMeilleure.Translation.Cache
|
||||
|
||||
private const int CodeAlignment = 4; // Bytes.
|
||||
private const int CacheSize = 2047 * 1024 * 1024;
|
||||
private const int CacheSizeIOS = 512 * 768 * 1024;
|
||||
private const int CacheSizeIOS = 512 * 1024 * 1024;
|
||||
|
||||
private static ReservedRegion _jitRegion;
|
||||
private static JitCacheInvalidation _jitCacheInvalidator;
|
||||
|
@ -518,6 +518,16 @@
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/MeloNX",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
);
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.stossy11.MeloNX;
|
||||
@ -571,6 +581,16 @@
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/MeloNX",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
);
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.stossy11.MeloNX;
|
||||
|
Binary file not shown.
@ -63,8 +63,6 @@ class Ryujinx {
|
||||
self.isRunning = false
|
||||
throw RyujinxError.executionError(code: result)
|
||||
}
|
||||
// Start The Emulation loop (probably not needed)
|
||||
self.runEmulationLoop()
|
||||
} catch {
|
||||
self.isRunning = false
|
||||
Self.log("Emulation failed to start: \(error)")
|
||||
@ -72,17 +70,6 @@ class Ryujinx {
|
||||
}
|
||||
}
|
||||
|
||||
private func runEmulationLoop() {
|
||||
let runLoop = RunLoop.current
|
||||
let port = Port()
|
||||
runLoop.add(port, forMode: .default)
|
||||
|
||||
while isRunning && runLoop.run(mode: .default, before: .distantFuture) {
|
||||
autoreleasepool { }
|
||||
}
|
||||
|
||||
Self.log("Emulation loop ended")
|
||||
}
|
||||
|
||||
func stop() throws {
|
||||
guard isRunning else {
|
||||
@ -109,9 +96,9 @@ class Ryujinx {
|
||||
args.append(contentsOf: ["--memory-manager-mode", "SoftwarePageTable"])
|
||||
if config.fullscreen {
|
||||
// args.append(contentsOf: ["--fullscreen", String(config.fullscreen)])
|
||||
args.append(contentsOf: ["--exclusive-fullscreen", String(config.fullscreen)])
|
||||
args.append(contentsOf: ["--exclusive-fullscreen-width", "1280"])
|
||||
args.append(contentsOf: ["--exclusive-fullscreen-height", "720"])
|
||||
//args.append(contentsOf: ["--exclusive-fullscreen", String(config.fullscreen)])
|
||||
// args.append(contentsOf: ["--exclusive-fullscreen-width", "1280"])
|
||||
// args.append(contentsOf: ["--exclusive-fullscreen-height", "720"])
|
||||
// exclusive-fullscreen
|
||||
}
|
||||
// Debug Logs
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -40,7 +40,7 @@ struct ContentView: View {
|
||||
|
||||
let controller = GCVirtualController(configuration: configuration)
|
||||
self.virtualController = controller
|
||||
controller.connect()
|
||||
self.virtualController?.connect()
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
@ -91,13 +91,13 @@ struct ContentView: View {
|
||||
gamepath: game!.path,
|
||||
additionalArgs: [
|
||||
// "--display-id", String(displayid)
|
||||
"--expand-ram", "false"
|
||||
],
|
||||
debuglogs: true,
|
||||
tracelogs: true,
|
||||
listinputids: false,
|
||||
inputids: [], // "1-1fd70005-057e-0000-0920-0000ff870000"], // "2-1fd70005-057e-0000-0920-0000ff870000"],
|
||||
ryufullscreen: true
|
||||
inputids: ["1-1fd70005-057e-0000-0920-0000ff870000"], // "2-1fd70005-057e-0000-0920-0000ff870000"],
|
||||
ryufullscreen: false
|
||||
|
||||
)
|
||||
|
||||
|
||||
@ -126,15 +126,15 @@ struct ContentView: View {
|
||||
|
||||
|
||||
let settings: [String: String] = [
|
||||
"MVK_DEBUG": "0",
|
||||
"MVK_DEBUG": "1",
|
||||
"MVK_CONFIG_DEBUG": "1",
|
||||
// "MVK_CONFIG_PREALLOCATE_DESCRIPTORS": "1",
|
||||
"MVK_CONFIG_PREALLOCATE_DESCRIPTORS": "1",
|
||||
// "MVK_CONFIG_VK_SEMAPHORE_SUPPORT_STYLE": "1",
|
||||
// "MVK_CONFIG_PREFILL_METAL_COMMAND_BUFFERS": "1",
|
||||
"MVK_CONFIG_PREFILL_METAL_COMMAND_BUFFERS": "3",
|
||||
"MVK_CONFIG_MAX_ACTIVE_METAL_COMMAND_BUFFERS_PER_QUEUE": "512",
|
||||
"MVK_CONFIG_USE_METAL_ARGUMENT_BUFFERS": "1",
|
||||
"MVK_USE_METAL_PRIVATE_API": "1",
|
||||
// "MVK_CONFIG_RESUME_LOST_DEVICE": "1",
|
||||
"MVK_CONFIG_RESUME_LOST_DEVICE": "1",
|
||||
"MVK_CONFIG_USE_METAL_PRIVATE_API": "1",
|
||||
// "MVK_CONFIG_ALLOW_METAL_NON_STANDARD_IMAGE_COPIES": "1"
|
||||
]
|
||||
@ -150,16 +150,9 @@ extension UIWindow {
|
||||
@objc func wdb_makeKeyAndVisible() {
|
||||
print("Making window key and visible...")
|
||||
|
||||
if #available(iOS 13.0, *) {
|
||||
self.windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene
|
||||
}
|
||||
self.windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene
|
||||
|
||||
self.wdb_makeKeyAndVisible()
|
||||
|
||||
// Update ContentView's reference to this window instance
|
||||
if let rootView = self.rootViewController as? UIHostingController<ContentView> {
|
||||
rootView.rootView.theWindow = self
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -48,59 +48,32 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
}
|
||||
|
||||
public unsafe void UpdateBuffers(int setIndex, int baseBinding, ReadOnlySpan<DescriptorBufferInfo> bufferInfo, DescriptorType type)
|
||||
{
|
||||
|
||||
// DEBUG: Validate inputs
|
||||
if (bufferInfo.Length == 0)
|
||||
{
|
||||
Console.WriteLine("bufferInfo is empty.");
|
||||
return;
|
||||
}
|
||||
|
||||
// DEBUG: Check if _descriptorSets and _holder.Device are properly initialized
|
||||
if (_descriptorSets == null || _descriptorSets.Length <= setIndex)
|
||||
{
|
||||
throw new Exception("Descriptor set at the specified index is null or out of range.");
|
||||
}
|
||||
|
||||
if (_holder?.Device == null)
|
||||
{
|
||||
throw new Exception("_holder.Device is null or uninitialized.");
|
||||
}
|
||||
|
||||
// DEBUG: Check each DescriptorBufferInfo in the span
|
||||
foreach (var info in bufferInfo)
|
||||
{
|
||||
if (info.Buffer.Handle == 0)
|
||||
{
|
||||
return;
|
||||
// throw new Exception("One of the buffers in bufferInfo is null or uninitialized.");
|
||||
if (bufferInfo.Length == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
fixed (DescriptorBufferInfo* pBufferInfo = bufferInfo)
|
||||
{
|
||||
var writeDescriptorSet = new WriteDescriptorSet
|
||||
{
|
||||
SType = StructureType.WriteDescriptorSet,
|
||||
DstSet = _descriptorSets[setIndex],
|
||||
DstBinding = (uint)baseBinding,
|
||||
DescriptorType = type,
|
||||
DescriptorCount = (uint)bufferInfo.Length,
|
||||
PBufferInfo = pBufferInfo,
|
||||
};
|
||||
|
||||
_holder.Api.UpdateDescriptorSets(_holder.Device, 1, writeDescriptorSet, 0, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Proceed if all checks pass
|
||||
fixed (DescriptorBufferInfo* pBufferInfo = bufferInfo)
|
||||
{
|
||||
var writeDescriptorSet = new WriteDescriptorSet
|
||||
{
|
||||
SType = StructureType.WriteDescriptorSet,
|
||||
DstSet = _descriptorSets[setIndex],
|
||||
DstBinding = (uint)baseBinding,
|
||||
DescriptorType = type,
|
||||
DescriptorCount = (uint)bufferInfo.Length,
|
||||
PBufferInfo = pBufferInfo
|
||||
};
|
||||
|
||||
// Update descriptor sets
|
||||
_holder.Api.UpdateDescriptorSets(_holder.Device, 1, writeDescriptorSet, 0, null);
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe void UpdateImage(int setIndex, int bindingIndex, DescriptorImageInfo imageInfo, DescriptorType type)
|
||||
{
|
||||
if (imageInfo.ImageView.Handle != 0UL)
|
||||
{
|
||||
|
||||
var writeDescriptorSet = new WriteDescriptorSet
|
||||
{
|
||||
SType = StructureType.WriteDescriptorSet,
|
||||
@ -117,23 +90,11 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
|
||||
public unsafe void UpdateImages(int setIndex, int baseBinding, ReadOnlySpan<DescriptorImageInfo> imageInfo, DescriptorType type)
|
||||
{
|
||||
|
||||
// DEBUG: Check if imageInfo is Empty
|
||||
if (imageInfo.Length == 0)
|
||||
{
|
||||
|
||||
Console.WriteLine("Error: imageInfo is empty.");
|
||||
return;
|
||||
}
|
||||
|
||||
// DEBUG: Check the values inside imageInfo
|
||||
foreach (var info in imageInfo)
|
||||
{
|
||||
Console.WriteLine($"Buffer Handle: {info.ImageView.Handle}");
|
||||
}
|
||||
Console.WriteLine($"BaseBinding: {baseBinding}, Type: {type}, ImageInfo Length: {imageInfo.Length}");
|
||||
|
||||
|
||||
fixed (DescriptorImageInfo* pImageInfo = imageInfo)
|
||||
{
|
||||
var writeDescriptorSet = new WriteDescriptorSet
|
||||
@ -146,8 +107,6 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
PImageInfo = pImageInfo,
|
||||
};
|
||||
|
||||
|
||||
|
||||
_holder.Api.UpdateDescriptorSets(_holder.Device, 1, writeDescriptorSet, 0, null);
|
||||
}
|
||||
}
|
||||
|
@ -105,10 +105,8 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
SupportsConditionalRendering = supportsConditionalRendering;
|
||||
SupportsExtendedDynamicState = supportsExtendedDynamicState;
|
||||
SupportsMultiView = supportsMultiView;
|
||||
// SupportsNullDescriptors = supportsNullDescriptors;
|
||||
SupportsNullDescriptors = supportsNullDescriptors;
|
||||
SupportsPushDescriptors = supportsPushDescriptors;
|
||||
SupportsNullDescriptors = (OperatingSystem.IsIOS() ? false : supportsNullDescriptors);
|
||||
// SupportsPushDescriptors = (OperatingSystem.IsIOS() ? false : supportsPushDescriptors);
|
||||
SupportsPrimitiveTopologyListRestart = supportsPrimitiveTopologyListRestart;
|
||||
SupportsPrimitiveTopologyPatchListRestart = supportsPrimitiveTopologyPatchListRestart;
|
||||
SupportsTransformFeedback = supportsTransformFeedback;
|
||||
|
@ -107,7 +107,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
|
||||
_shaders = internalShaders;
|
||||
|
||||
bool usePushDescriptors = /*!isMinimal && VulkanConfiguration.UsePushDescriptors &&*/ _gd.Capabilities.SupportsPushDescriptors;
|
||||
bool usePushDescriptors = !isMinimal && VulkanConfiguration.UsePushDescriptors && _gd.Capabilities.SupportsPushDescriptors;
|
||||
|
||||
_plce = gd.PipelineLayoutCache.GetOrCreate(gd, device, resourceLayout.Sets, usePushDescriptors);
|
||||
|
||||
|
@ -423,7 +423,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
{
|
||||
SType = StructureType.PhysicalDeviceRobustness2FeaturesExt,
|
||||
PNext = pExtendedFeatures,
|
||||
// NullDescriptor = supportedFeaturesRobustness2.NullDescriptor,
|
||||
NullDescriptor = supportedFeaturesRobustness2.NullDescriptor,
|
||||
};
|
||||
|
||||
pExtendedFeatures = &featuresRobustness2;
|
||||
|
@ -185,7 +185,6 @@ namespace Ryujinx.Headless.SDL2
|
||||
FullscreenFlag = SDL_WindowFlags.SDL_WINDOW_FULLSCREEN_DESKTOP;
|
||||
}
|
||||
|
||||
// WindowHandle = SDL_GetWindowFromID(1);
|
||||
WindowHandle = SDL_CreateWindow($"Ryujinx {Program.Version}{titleNameSection}{titleVersionSection}{titleIdSection}{titleArchSection}", SDL_WINDOWPOS_CENTERED_DISPLAY(DisplayId), SDL_WINDOWPOS_CENTERED_DISPLAY(DisplayId), Width, Height, DefaultFlags | FullscreenFlag | GetWindowFlags());
|
||||
|
||||
if (WindowHandle == IntPtr.Zero)
|
||||
|
Loading…
x
Reference in New Issue
Block a user