aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2023-06-01Vulkan: Include DepthMode in ProgramPipelineState (#5185)1.1.849riperiperi
2023-05-31GPU: Dispose Renderer after running deferred actions (#5144)1.1.848riperiperi
* GAL: Dispose Renderer after running deferred actions Deferred actions from disposing physical memory instances always dispose the resources in their caches. The renderer can't be disposed before these resources get disposed, otherwise the dispose actions will not actually run, and the ThreadedRenderer may get stuck trying to enqueue too many commands when there is nothing consuming them. This should fix most instances of the emulator freezing on close. * Wait for main render commands to finish, but keep RenderThread alive til dispose * Address some feedback. * No parameterize needed * Set thread name as part of constructor * Port to Ava and SDL2
2023-05-31Avalonia UI: Fix letter "x" in Ryujinx logo being cut off (#5176)1.1.847yell0wsuit
Also make the pronunciation center-aligned
2023-05-31Skip draws with zero vertex count (#5149)1.1.846gdkchan
2023-05-31Share ResourceManager vertex vertex A and B shaders (#5181)1.1.845gdkchan
2023-05-31macOS Headless Fixes (#5167)1.1.844Isaac Marovitz
* Default hypervisor to disabled * Include MVK on macOS * Properly sign headless builds on macOS * Force Vulkan on macOS * Suggestions
2023-05-30Add Context Menu Option to Run Application (#5154)1.1.843Patrick Hovsepian
2023-05-30Linux: Automatically increase vm.max_map_count if it's too low (#4702)1.1.842TSRBerry
* 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
2023-05-29Make sure blend is disabled if render target has integer format (#5122)1.1.840gdkchan
* Make sure blend is disabled if render target has integer format * Change approach to avoid permanently mutating state
2023-05-29Workaround for MoltenVK barrier issues (#5118)1.1.839gdkchan
2023-05-29Fix incorrect vertex attribute format change (#5112)1.1.838gdkchan
* Fix incorrect vertex attribute format change * Only change vertex format if the host supports the new format
2023-05-29Fix #5108: Allow surround sound for SDL2 in more scenarios (#5131)1.1.837Simon Wegendt
2023-05-28Add support for VK_EXT_depth_clip_control. (#5027)1.1.835cstamford
* 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>
2023-05-28About window: Add changelog link under ver. number (#5095)1.1.833yell0wsuit
2023-05-28Update LastPlayed date on emulation end. (#5056)1.1.832Théo Arrouye
2023-05-28Added Custom Path case when saving screenshots (#5086)1.1.830Daniel Shala
2023-05-26Ryujinx.Ava: fixes for random hangs on exit (#4827)1.1.826jhorv
* 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)
2023-05-26Force reciprocal operation with value biased by constant to be precise on ↵1.1.825gdkchan
macOS (#5110) * Force operations to be precise in some cases on SPIR-V * Make it a bit more strict, add comments * Shader cache version bump
2023-05-25Fix resolution scaling of image operation coordinates (#5102)1.1.824gdkchan
* Fix resolution scaling of image operation coordinates * Shader cache version bump
2023-05-25Fix mod names (#5088)1.1.823TSRBerry
2023-05-25Generate scaling helper functions on IR (#4714)1.1.822gdkchan
* 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
2023-05-25Truncate vertex attribute format if it exceeds stride on MoltenVK (#5094)1.1.821gdkchan
* 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
2023-05-23Vulkan: Do not set storage flag for multisample textures if not supported ↵1.1.819gdkchan
(#5060)
2023-05-22Implement p2rc, p2ri, p2rr and r2p.cc shaders (#5031)1.1.818makigumo
* implement P2rC, P2rI, P2rR shaders * implement R2p.CC shader * bump CodeGenVersion * address feedback
2023-05-22Ava UI: Input Menu Redesign (#4990)1.1.815Isaac Marovitz
* Cleanup * Remove redundant locales * Start SVG Fixes… Better +/- buttons Fix the grips Bumpers Better directional pad More SVG stuff Grip adjustments Final stuff * Make image bigger * Border radius * More cleanup * Restructure * Restructure Rumble View * Use compiled bindings where possible * Round those pesky corners * Ack Suggestions * More suggestions * Update src/Ryujinx.Ava/UI/Views/Input/RumbleInputView.axaml.cs Co-authored-by: Ac_K <Acoustik666@gmail.com> --------- Co-authored-by: Ac_K <Acoustik666@gmail.com>
2023-05-21Fix crash in SettingsViewModel when Vulkan isn't available (#4985)1.1.814jhorv
* 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
2023-05-21ServerBase thread safety (#4577)1.1.813jhorv
* 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
2023-05-21Replace ShaderBindings with new ResourceLayout structure for Vulkan (#5025)1.1.812gdkchan
* 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
2023-05-20Replace constant buffer access on shader with new Load instruction (#4646)1.1.811gdkchan
2023-05-20Limit compute storage buffer size (#5028)1.1.810gdkchan
2023-05-20SPIR-V: Only allow implicit LOD sampling on fragment (#5026)1.1.809riperiperi
2023-05-19Eliminate redundant multiplications by gl_FragCoord.w on the shader (#4578)1.1.807gdkchan
* Eliminate redundant multiplications by gl_FragCoord.w on the shader * Shader cache version bump
2023-05-18Fix Vulkan blit-like operations swizzle (#5003)1.1.805gdkchan
2023-05-18GPU: Avoid using garbage size for non-cb0 storage buffers (#4999)1.1.804riperiperi
* 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
2023-05-17ava: Fix crash when extracting sections from NCA with no data section (#5002)1.1.803Mary
Tested against Omega Strickers.
2023-05-17Start GPU performance counter at 0 instead of host GPU value (#4992)1.1.802OpaqueReptile
* Start performance counter at 0 instead of host perf counter value * whitespace * init _firstTimestamp in constructer per feedback * change comment * punctuation * address feedback * revise comment
2023-05-14[GUI] Fix always hide cursor mode not hiding the cursor until it was moved ↵1.1.800TSRBerry
(#4927) * 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.
2023-05-13Vulkan: Device map buffers written more than flushed (#4911)1.1.799riperiperi
2023-05-13audio: sdl2: Do not report 5.1 if the device doesn't support it (#4908)1.1.797Mary
* 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.
2023-05-13Set OpenGL PixelPackBuffer to 0 when done (#4921)1.1.796gdkchan
2023-05-12Ava: Fix wrong MouseButton (#4900)1.1.794Ac_K
2023-05-12Bump shader cache codegen version1.1.793Mary
That was missing from #4892
2023-05-11Vulkan: Partially workaround MoltenVK InvalidResource error (#4880)1.1.792riperiperi
* Add MVK stage flags workaround * Actually do the workaround * Remove GS on VS stuff * Address feedback
2023-05-11GPU: Remove swizzle undefined matching and rework depth aliasing (#4896)1.1.791riperiperi
* GPU: Remove swizzle undefined matching and rework depth aliasing @gdkchan pointed out that UI textures in TOTK seemed to be setting their texture swizzle incorrectly (texture was RGB but was sampling A, swizzle for A was wrong), so I determined that SwizzleComponentMatches was the problem and set on eliminating it. This PR combines existing work to select the most recently modified texture (now used when selecting which aliased texture to use) with some additional changes to remove the swizzle check and support aliased view creation. The original observation (#1538) was that we wanted to match depth textures for the purposes of aliasing with color textures, but they often had different swizzle from what was sampled (as it's generally the identity swizzle once rendered). At the time, I decided to allow swizzles to match if only the defined components matched, which fixed the issue in all known cases but could easily be broken by a game _expecting_ a given swizzle, such as a 1/0 value on a component. This error case could also occur in textures that don't even depth alias, such as R11G11B10, as the rule was created to generally apply to all cases. The solution is now to fail this exact match test, and allow the search for an R32 texture to create a swizzled view of a D32 texture (and other such cases). This allows the creation of a view that mismatches the requested format, which wasn't present before and was the reason for the swizzle matching approach. The exact match and view creation rules now follow the same rules over what textures to select when there are multiple options (such as a "perfect" match and an "aliased" match at the same time). It now selects the most recently modified texture, which is done with a new sequence number in the GpuContext (because we don't have enough of these). Reportedly fixes UI having weird coloured backgrounds in TOTK. This also fixes an issue in MK8D where returning from a race resulted in the character selection cubemaps being broken. May work around issues introduced by the "short texture cache" PR due to modification ordering, though they won't be truly fixed. Should allow (#4365) to avoid copies in more cases. Need to test that. I tested a bunch of games #1538 originally affected and they seem to be fine. This change affects all games so it would be good to get some wide testing on it. * Address feedback 1, fix an issue * Workaround: Do not allow copies for format alias. These should be removed when D32<->R32 copy dependencies become legal
2023-05-12Fix the restart after an update. (#4869)1.1.790John
* Fix the restart after an update. * Fix the updater for the Ava UI too. * Fixing up the code after some change requests. Removed a line of code that was accidentally left in. * Fix restarting on Linux Avalonia. * Fix issues with escaped arguments.
2023-05-12Changed LastPlayed field from string to nullable DateTime (#4861)1.1.789SamusAranX
* Changed LastPlayed field from string to nullable DateTime Added ApplicationData.LastPlayedString property Added NullableDateTimeConverter for the DateTime->string conversion in Avalonia * Added migration from string-based last_played to DateTime-based last_played_utc * Updated comment style * Added MarkupExtension to NullableDateTimeConverter and changed its usage Cleaned up leftover usings * Missed one comment
2023-05-12amadeus: Allow 5.1 sink output (#4894)1.1.788Mary
* amadeus: Allow 5.1 sink output Also add a simple Stereo to 5.1 change for device sink. Tested against NES - Nintendo Switch Online that output stereo on the audio renderer. * Remove outdated comment
2023-05-11UI: Adjust input mapping view (#4866)1.1.787Nico
* refactor: clean up controller settings ui - Remove inconsistencies between left and right side - Use style to set ToggleButton properties (since they are all the same) - Move topmost controller settings from one line to 2x2 grid for improved clarity - Properly adjust borders, text widths, etc. to neighboring elements to eliminate misaligned visual lines * fix: merge issues * fix: prevent sliders from jumping by giving text block fixed width * refactor: add more separators and increase margin * refactor: center deadzone and range descriptions * refactor: move rumble border top margin to -1 and prevent double border * refactor: remove margins & double borders + switch profile & input selection * style: apply suggestions from code review Co-authored-by: Ac_K <Acoustik666@gmail.com> --------- Co-authored-by: Ac_K <Acoustik666@gmail.com>
2023-05-11Enable explicit LOD for array textures with depth compare on SPIR-V (#4892)1.1.785gdkchan
2023-05-11Fix incorrect ASTC endpoint color when using LuminanceDelta mode (#4890)1.1.784gdkchan