* memory: Check results of pinvoke calls
* Increase vm.max_map_count when running Ryujinx
* Add SupportedOSPlatform attribute for WindowsApiException
* Revert increasing vm.max_map_count via script
* Add LinuxHelper to detect and increase vm.max_map_count
With GUI dialogs, this should be a bit more user-friendly.
* Supply arguments as a list to RunPkExec
* Add error logging in case RunPkExec() fails
* Prevent Gtk from crashing
* Linux: Detect if gamemode is installed and start it when launching Ryujinx.
When using the Ryujinx.sh script to start the emulator check if gamemoderun exists and use it if it does.
Gamemode mode on Linux changes some system settings to make performance during gaming more consistent mainly by changing the CPU governor to performance.
https://github.com/FeralInteractive/gamemode
* Removed if statement.
* Fix due to wrong assumption about the output of which.
Checks if the which output contains a no match response, otherwise use gamemoderun.
Using a case statement because it makes substring matching possible in sh and also it turns out that adding an empty string after env throws an error because env attempts to parse it as a paramater.
* Missed a couple semicolons.
* Different approach for checking if gamemode is available.
Should hopefully work across all implementations of which.
* Remove unneeded which command.
* Change code to keep launch command to a single line.
* Add support for VK_EXT_depth_clip_control.
* Code review feedback
Minor formatting
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* Check .DepthClipControl to make sure the host actually supports the feature.
* Review feedback: remove Vulkan platform switch, relying on QueryHostSupportsDepthClipControl to drive the behaviour - OpenGL returns true, and any future platforms that don't support the [-1, 1] depth mode can return false for the transformation.
---------
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* Attempt at fixing hang on exit by ending the WindowNotificationManager notification loop, so that the Thread running it can exit.
* explicitly apply the NotificationManager template to allow the notification loop to begin
* NotificationHelper - remove explicity call to ApplyTemplate(). Change to ManualResetEventSlim so we can cancel the Wait on it.
* add a timeout to AudioRenderSystem.Stop()'s waiting for the termination signal, log a warning if this timeout occurs, and continue execution
* NotifiationHelper - cancel first, the CompleteAdding()
* Remove AudioRenderSystem._terminationEvent, redundant
* NotificationHelper - use host.Closing event to trigger cancellation instead of _notifationManager.DetachedFromLogicalTree
* Change NotificationHelper to use an explicit Thread for background work. Wait on the cancellationToken's WaitHandle so the Thread doesn't have to deal with async. Wrap foreach in try/catch (OperationCanceledException) to swallow the escaping exception from the GetConsumingEnumerable().
* adjust formatting of AsyncWorkQueue constructor to use object initializers consistently
* use AsyncWorkQueue to do everything I added in SetNotificationManager()
* Revert "use AsyncWorkQueue to do everything I added in SetNotificationManager()"
This reverts commit f0e78366b8776ec8e2fef8ab023c0db1833155d3.
* use AsyncWorkQueue to handle the Thread-related changes previously made to NotificationHelper.SetNotificationHelper(). Wrap it in Lazy<T> and force instantiation in the TemplateApplied event handler to accomodate for the fact that AsyncWorkQueue starts immediately, and the notification dispatch loop was being delayed by _templateAppliedEvent.
* impl changes suggested by AcK77
* impl changes suggested by AcK77 (more)
* Generate scaling helper functions on IR
* Delete unused code
* Split RewriteTextureSample and move gather bias add to an earlier pass
* Remove using
* Shader cache version bump
* Truncate vertex attribute format if it exceeds stride on MoltenVK
* Fix BGR format
* Move vertex attribute check to pipeline creation to avoid costs
* No need for this to be public
* fix crash when Vulkan isn't available
* add VulkanRenderer.GetPhysicalDevices() overload that provides its own Vk API object and logs on failure
* adjustments per AcK77
* Add guard against ServerBase.Dispose() being called multiple times. Add reset event to avoid Dispose() being called while the ServerLoop is still running.
* remove unused usings
* rework ServerBase to use one collection each for sessions and ports, and make all accesses thread-safe.
* fix Logger call
* use GetSessionObj(int) instead of using _sessions directly
* move _threadStopped check inside "dispose once" test
* - Replace _threadStopped event with attempt to Join() the ending thread (if that isn't the current thread) instead.
- Use the instance-local _selfProcess and (new) _selfThread variables to avoid suggesting that the current KProcess and KThread could change. Per gdkchan, they can't currently, and this old IPC system will be removed before that changes.
- Re-order Dispose() so that the Interlocked _isDisposed check is the last check before disposing, to increase the likelihood that multiple callers will result in one of them succeeding.
* code style suggestions per AcK77
* add infinite wait for thread termination
* Introduce ResourceLayout
* Part 1: Use new ResourceSegments array on UpdateAndBind
* Part 2: Use ResourceLayout to build PipelineLayout
* Delete old code
* XML docs
* Fix shader cache load NRE
* Fix typo
* GPU: Avoid using garbage size for non-cb0 storage buffers
In the depths area, Tears of the Kingdom uses a global memory access with address on constant buffer slot 6. This isn't standard and thus doesn't actually have a size 8 bytes after it, so we were reading back a garbage size that ended up very large (at least in version 1.1.0), and would synchronize a lot of data per frame.
This PR makes storage buffers created from addresses outside constant buffer slot 0 get their size as the number of bytes remaining in the GPU mapping starting at the given virtual address. This should bound the buffer to a reasonable size, and ideally stop it crossing into other memory.
* Limit max size
* Add TODO
* Feedback
* gtk: Add missing isMouseInClient check for hide-cursor
* ava: Add missing events and default isCursorInRenderer to true
This is necessary because we don't receive a initial PointerEnter event for some reason.
* amadeus: adjust VirtualDevice channel configuration reporting with HardwareDevice
* audio: sdl2: Do not report 5.1 if device doesn't support it
SDL2 5.1 to Stereo conversion is terrible and make everything sound
quiet.
Let's not expose 5.1 if not truly supported by the device.
* Fix macOS build name in CI
Fixes updater
* Update build.yml
Don't publish x86 Mac builds
* Naming nitpick
* Berry changes
* Use the same prefix for PR and release build archives
---------
Co-authored-by: TSR Berry <20988865+TSRBerry@users.noreply.github.com>