Commit graph

2898 commits

Author SHA1 Message Date
riperiperi
18183a5d1f Move partial unmap handler to the native signal handler (#3437)
* Initial commit with a lot of testing stuff.

* Partial Unmap Cleanup Part 1

* Fix some minor issues, hopefully windows tests.

* Disable partial unmap tests on macos for now

Weird issue.

* Goodbye magic number

* Add COMPlus_EnableAlternateStackCheck for tests

`COMPlus_EnableAlternateStackCheck` is needed for NullReferenceException handling to work on linux after registering the signal handler, due to how dotnet registers its own signal handler.

* Address some feedback

* Force retry when memory is mapped in memory tracking

This case existed before, but returning `false` no longer retries, so it would crash immediately after unprotecting the memory... Now, we return `true` to deliberately retry.

This case existed before (was just broken by this change) and I don't really want to look into fixing the issue right now. Technically, this means that on guest code partial unmaps will retry _due to this_ rather than hitting the handler. I don't expect this to cause any issues.

This should fix random crashes in Xenoblade Chronicles 2.

* Use IsRangeMapped

* Suppress MockMemoryManager.UnmapEvent warning

This event is not signalled by the mock memory manager.

* Remove 4kb mapping
2024-02-22 19:16:32 -05:00
rna0
08a45405d2 Avalonia changes (#3497)
Co-authored-by: RNA <wQSZSQS2UQf5zun>
2024-02-22 19:16:32 -05:00
Ac_K
4944a0f826 Avalonia: Another Cleanup (#3494)
* Avalonia: Another Cleanup

This PR is a cleanup to the avalonia code recently added:

- Some XAML file are autoformatted like a previous PR.
- Dlc is renamed to DownloadableContent (Locale exclude).
- DownloadableContentManagerWindow is a bit improved (Fixes #3491).
- Some nits here and there.

* Fix GTK

* Remove AttachDebugDevTools

* Fix last warning

* Fix JSON fields
2024-02-22 19:16:32 -05:00
Ac_K
6135cd70dc Avalonia: Cleanup UserEditor a bit (#3492)
This PR cleanup the UserEditor code a bit, 2 texts are added for "Name" and "User Id", because when you create a new profile, the textbox is empty without any hints. `axaml` files are autoformated too.
2024-02-22 19:16:32 -05:00
gdkchan
d4f95c77b6 Fix DMA linear texture copy fast path (#3496)
* Fix DMA linear texture copy fast path

* Formatting
2024-02-22 19:16:32 -05:00
gdkchan
8299eb5ed8 Add a sampler pool cache and improve texture pool cache (#3487)
* Add a sampler pool cache and improve texture pool cache

* Increase disposal timestamp delta more to be on the safe side

* Nits

* Use abstract class for PoolCache, remove factory callback
2024-02-22 19:16:32 -05:00
EmulationFanatic
7c69c96839 update settings and main window tooltips (#3488) 2024-02-22 19:16:32 -05:00
Mary-nyan
efc888e839 misc: Reformat Ryujinx.Audio with dotnet-format (#3485)
This is the first commit of a series of reformat around the codebase as
discussed internally some weeks ago.

This project being one that isn't touched that much, it shouldn't cause
conflict with any opened PRs.
2024-02-22 19:16:32 -05:00
MutantAura
d10008cd0c Resolution scaling hotkeys (#3185)
* hotkeys

* comments

* update implementation to include custom scales

* copypasta

* review changes

* hotkeys

* comments

* update implementation to include custom scales

* copypasta

* review changes

* Remove outdated configuration and force hotkeys unbound

* Add avalonia support

* Fix configuration file

* Update GTK implementation and fix config... again.

* Remove legacy implementation + nits

* Avalonia locales (DeepL)

* review

* Remove colon from chinese locale

* Update ConfigFile

* locale fix
2024-02-22 19:16:31 -05:00
gdkchan
8a3bcc003f Add support for conditional (with CC) shader Exit instructions (#3470)
* Add support for conditional (with CC) shader Exit instructions

* Shader cache version bump

* Make CSM conditions default to false for EXIT.CC
2024-02-22 19:16:31 -05:00
菘菘
8691cfc659 feat: add traditional chinese translate (Avalonia) (#3474)
* feat: add traditional chinese translate

* update translate
2024-02-22 19:16:31 -05:00
MutantAura
59cc53a730 Change MenuHeaders to embedded textblocks (#3469) 2024-02-22 19:16:31 -05:00
Emmanuel Hansen
b11cd9287f Avalonia - Use content dialog for user profile manager (#3455)
* remove content dialog placeholder from all windows

* remove redundant window argument

* redesign user profile window

* wip

* use avalonia auto name generator

* add edit and new user options

* move profile image selection to content dialog

* remove usings

* fix updater

* address review

* adjust avatar dialog size

* add validation for user editor

* fix typo

* Shorten some labels
2024-02-22 19:16:31 -05:00
Mary-nyan
f8ac5f6e59 fix: Ensure to load latest version of ffmpeg libraries first (#3473)
Fix a possible crash related to older version of ffmpeg being loaded
instewad of the one shipped with the emulator.
2024-02-22 19:16:31 -05:00
EmulationFanatic
5dcc90649b GTK & Avalonia changes (#3480) 2024-02-22 19:16:31 -05:00
gdkchan
5f4f0d3984 Fix decoding of block after shader BRA.CC instructions without predicate (#3472)
* Fix decoding of block after BRA.CC instructions without predicate

* Shader cache version bump
2024-02-22 19:16:31 -05:00
gdkchan
5fe4382ea3 Avoid adding shader buffer descriptors for constant buffers that are not used (#3478)
* Avoid adding shader buffer descriptors for constant buffers that are not used

* Shader cache version
2024-02-22 19:16:31 -05:00
riperiperi
a74cf96834 Avoid scaling 2d textures that could be used as 3d (#3464) 2024-02-22 19:16:31 -05:00
Logan Stromberg
7403132bbb Reduce some unnecessary allocations in DMA handler (#2886)
* experimental changes to try and reduce allocations in kernel threading and DMA handler

* Simplify the changes in this branch to just 1. Don't make unnecessary copies of data just for texture-texture transfers and 2. Add a fast path for 1bpp linear byte copies

* forgot to check src + dst linearity in 1bpp DMA fast path. Fixes the UE4 regression.

* removing dev log I left in

* Generalizing the DMA linear fast path to cases other than 1bpp copies

* revert kernel changes

* revert whitespace

* remove unneeded references

* PR feedback

Co-authored-by: Logan Stromberg <lostromb@microsoft.com>
Co-authored-by: gdk <gab.dark.100@gmail.com>
2024-02-22 19:16:31 -05:00
Mary
7a23bc4a6d Remove dependency for FFmpeg.AutoGen and Update FFmpeg to 5.0.1 for Windows (#3466)
* Remove dependency for FFMpeg.AutoGen

Also prepare for FFMpeg 5.0 and 5.1

* Update Ryujinx.Graphics.Nvdec.Dependencies to 5.0.1-build10

* Address gdkchan's comments

* Address Ack's comment

* Address gdkchan's comment
2024-02-22 19:16:31 -05:00
Fruityloops
7f37a95ecc BSD: Allow use of DontWait flag in Receive (#3462) 2024-02-22 19:16:31 -05:00
merry
7b0ce63757 Ava/MainWindow: Do not show Show Console menu item on non-Windows (#3461) 2024-02-22 19:16:30 -05:00
riperiperi
e98ff233b8 Handle the case where byte optionValues are sent to BSD (#3405)
Some games and the Mario Odyssey Multiplayer mod do this.

The SMO multiplayer mod also needs you to revert #3394 as it uses a blocking socket to receive (otherwise it hangs), and it doesn't seem to like being forced as non-blocking.
2024-02-22 19:16:30 -05:00
Emmanuel Hansen
86e88ae410 Avalonia - Add border to Flyouts (#3341)
* add borders to menus

* apply to dropdowns

* darken the border for dark theme

* fix duplicate keys
2024-02-22 19:16:30 -05:00
gdkchan
12c54a97cf Propagate Shader phi nodes with the same source value from all blocks (#3457)
* Propagate Shader phi nodes with the same source value from all incoming blocks

* Shader cache version bump
2024-02-22 19:16:30 -05:00
MetrosexualGarbodor
cc37f79ca6 Avalonia - Make tooltips more useful and descriptive, update Spanish localization (#3453)
* expand English tooltips and clean up

* small oversight

* update Spanish locale

* wording

* Internet

* address feedback

* update localization accordingly
2024-02-22 19:16:30 -05:00
Emmanuel Hansen
ae885581d2 Avalonia - Couple fixes and improvements (#3451)
* fix updater check crash

* remove line

* reduce cheat window sizes

* enable tiered compilation and r2r

* remove warning on LaunchState

* remove warnings related to tasks

* addressed review

* undo csproj indentation

* fix tabs in axaml file

* remove double line

* remove R2R
2024-02-22 19:16:30 -05:00
Narugakuruga
ef24c174cb Avalonia - Further Optimize Chinese Translation (#3452)
* Optimize Chinese Translation

* Update zh_CN.json

* Update zh_CN.json

* Update zh_CN.json

* Update zh_CN.json

* Update zh_CN.json

* Update zh_CN.json

* Update zh_CN.json

* test

* Update zh_CN.json

* Update zh_CN.json

* Update zh_CN.json

* Update zh_CN.json

* Delete zh_CN.json

* Add files via upload

* Update zh_CN.json

* Update zh_CN.json
2024-02-22 19:16:30 -05:00
Emmanuel Hansen
d07b62fbe0 UI - Avalonia Part 3 (#3441)
* Add all other windows

* addreesed review

* Prevent "No Update" option from being deleted

* Select no update is the current update is removed from the title update window

* fix amiibo crash
2024-02-22 19:16:30 -05:00
Emmanuel Hansen
fe101dc47c Avalonia - Use loaded config when assigning controller input (#3447)
* Use loaded config when assigning controller input

* Fix crash when switch player in controller window
2024-02-22 19:16:30 -05:00
Emmanuel Hansen
f8f5ce35a8 ensure mouse cursor is only hidden when mouse is in renderer (#3448) 2024-02-22 19:16:30 -05:00
Mary
bc01301aaf misc: Relicense Ryujinx.Audio under the terms of the MIT license (#3449)
* Ryujinx.Audio: Remove BOM from files

* misc: Relicense Ryujinx.Audio under the terms of the MIT license

With the approvals of all the Ryujinx.Audio contributors, this commit
changes Ryujinx.Audio license from LGPLv3 to MIT.
2024-02-22 19:16:29 -05:00
Emmanuel Hansen
2a89c47744 Fix deadlock in mouse input on Avalonia (#3444)
* fix deadlock in mouse input

* apply @AcK77 changes
2024-02-22 19:16:29 -05:00
gdkchan
6e88fb0053 Fix Vi managed and stray layers open/close/destroy (#3438)
* Fix Vi managed and stray layers open/close/destroy

* OpenLayer should set the state to ManagedOpened
2024-02-22 19:16:29 -05:00
gdkchan
5f956bfd04 Implement CPU FCVT Half <-> Double conversion variants (#3439)
* Half <-> Double conversion support

* Add tests, fast path and deduplicate SoftFloat code

* PPTC version
2024-02-22 19:16:29 -05:00
gdkchan
db79dde93c Add support for alpha to coverage dithering (#3069)
* Add support for alpha to coverage dithering

* Shader cache version bump

* Fix wrong alpha register

* Ensure support buffer is cleared

* New shader specialization based approach
2024-02-22 19:16:29 -05:00
Emmanuel Hansen
875063612a UI - Avalonia Part 2 (#3351)
* add settings windows and children views

* Expose hotkeys configuration on the UI

* Remove double spacing from locale JSON

* simplify button assigner

* add cemuhook buttons and title to locale

* move common button assigner to own class

* cancel button assigner when window is closed

* remove unused setting

* address review. fix controller profile not loading default when switching devices

* fix updater file name

* Input cleanup (#37)

* addressed review

* add device type to controller device checks

* change accessibility modifier of public classes to internal

* Update Ryujinx.Ava/Ui/ViewModels/ControllerSettingsViewModel.cs

Co-authored-by: gdkchan <gab.dark.100@gmail.com>

* Update de_DE.json

* Update de_DE.json

* Update tr_TR.json

Translated newly added lines

* Update it_IT.json

* fix rebase

* update avalonia

* fix wrong key used for button text

* Align settings window elements

* Tabs to spaces

* Update brazilian portuguese translation

* Minor improvement on brazilian portuguese translation

* fix turkish translation

* remove unused text

* change view related classes to public

* unsubscribe from deferred event if dialog is closed

* Load the default language before loading any other when switching languages

* Make controller settings more compact

* increase default width of settings window, reduce profile buttons width

Co-authored-by: gdk <gab.dark.100@gmail.com>
Co-authored-by: MutantAura <44103205+MutantAura@users.noreply.github.com>
Co-authored-by: Niwu34 <67392333+Niwu34@users.noreply.github.com>
Co-authored-by: aegiff <99728970+aegiff@users.noreply.github.com>
Co-authored-by: Antonio Brugnolo <36473846+AntoSkate@users.noreply.github.com>
2024-02-22 19:16:28 -05:00
Ac_K
dffe91ba38 Stub GetTemperature (#3429) 2024-02-22 19:16:28 -05:00
gdkchan
3873e2fbd4 Bindless elimination for constant sampler handle (#3424)
* Bindless elimination for constant sampler handle

* Shader cache version bump

* Update TextureHandle.ReadPackedId for new bindless elimination
2024-02-22 19:16:28 -05:00
Mary
7907828122 ui: Fix timezone abbreviation since #3361 (#3430)
As title say
2024-02-22 19:16:28 -05:00
Narugakuruga
0f5a08c499 Add Simplified Chinese to Avalonia (V2) (#3416)
* Add files via upload

* Update Ryujinx.Ava.csproj

* Update MainWindow.axaml
2024-02-22 19:16:28 -05:00
gdkchan
fadec80890 Account for pool change on texture bindings cache (#3420)
* Account for pool change on texture bindings cache

* Reduce the number of checks needed
2024-02-22 19:16:28 -05:00
Mary
786ab19fa6 timezone: Fix regression caused by #3361 (#3418)
Because of that PR, TimeZoneRule was bigger than 0x4000 thanks to a
misuse of a constant.

This commit address this issue and add a new unit test to ensure the size of
TimeZoneRule is 0x4000 bytes.

Also address suggestions that were lost on the original PR.
2024-02-22 19:16:28 -05:00
Mary
7e403da216 time: Make TimeZoneRule blittable and avoid copies (#3361)
* time: Make TimeZoneRule blittable and avoid copies

This drastically reduce overhead of using TimeZoneRule around the
codebase.

Effect on games is unknown

* Add missing Box type

* Ensure we clean the structure still

This doesn't perform any copies

* Address gdkchan's comments

* Simplify Box
2024-02-22 19:16:28 -05:00
gdkchan
d33a8375b9 Fix ThreadingLock deadlock on invalid access and TerminateProcess (#3407) 2024-02-22 19:16:28 -05:00
gdkchan
b1022c7320 Ensure texture ID is valid before getting texture descriptor (#3406) 2024-02-22 19:16:28 -05:00
Ac_K
7fa1869d7a UI: Some Avalonia cleanup (#3358) 2024-02-22 19:16:28 -05:00
gdkchan
28332dd189 Rewrite kernel memory allocator (#3316)
* Rewrite kernel memory allocator

* Remove unused using

* Adjust private static field naming

* Change UlongBitSize to UInt64BitSize

* Fix unused argument, change argument order to be inline with official code and disable random allocation
2024-02-22 19:16:28 -05:00
RhavoX
b0254abb08 Fix doubling of detected gamepads on program start (#3398)
* Fix doubling of detected gamepads (sometimes the connected event is fired when the app starts even though the pad was connected for some time now).

The fix rejects the gamepad if one with the same ID is already present.

* Fixed review findings
2024-02-22 19:16:28 -05:00
riperiperi
ea8b1461ca Account for res scale changes when updating bindings (#3403)
Fixes a regression introduced by the texture bindings PR.

Also renames TextureStatePerStage, as it's no longer per stage.
2024-02-22 19:16:28 -05:00