R/Ryujinx/Ui
riperiperi b4d8d893a4
Memory Read/Write Tracking using Region Handles (#1272)
* WIP Range Tracking

- Texture invalidation seems to have large problems
- Buffer/Pool invalidation may have problems
- Mirror memory tracking puts an additional `add` in compiled code, we likely just want to make HLE access slower if this is the final solution.
- Native project is in the messiest possible location.
- [HACK] JIT memory access always uses native "fast" path
- [HACK] Trying some things with texture invalidation and views.

It works :)

Still a few hacks, messy things, slow things

More work in progress stuff (also move to memory project)

Quite a bit faster now.
- Unmapping GPU VA and CPU VA will now correctly update write tracking regions, and invalidate textures for the former.
- The Virtual range list is now non-overlapping like the physical one.
- Fixed some bugs where regions could leak.
- Introduced a weird bug that I still need to track down (consistent invalid buffer in MK8 ribbon road)

Move some stuff.

I think we'll eventually just put the dll and so for this in a nuget package.

Fix rebase.

[WIP] MultiRegionHandle variable size ranges

- Avoid reprotecting regions that change often (needs some tweaking)
- There's still a bug in buffers, somehow.
- Might want different api for minimum granularity

Fix rebase issue

Commit everything needed for software only tracking.

Remove native components.

Remove more native stuff.

Cleanup

Use a separate window for the background context, update opentk. (fixes linux)

Some experimental changes

Should get things working up to scratch - still need to try some things with flush/modification and res scale.

Include address with the region action.

Initial work to make range tracking work

Still a ton of bugs

Fix some issues with the new stuff.

* Fix texture flush instability

There's still some weird behaviour, but it's much improved without this. (textures with cpu modified data were flushing over it)

* Find the destination texture for Buffer->Texture full copy

Greatly improves performance for nvdec videos (with range tracking)

* Further improve texture tracking

* Disable Memory Tracking for view parents

This is a temporary approach to better match behaviour on master (where invalidations would be soaked up by views, rather than trigger twice)

The assumption is that when views are created to a texture, they will cover all of its data anyways. Of course, this can easily be improved in future.

* Introduce some tracking tests.

WIP

* Complete base tests.

* Add more tests for multiregion, fix existing test.

* Cleanup Part 1

* Remove unnecessary code from memory tracking

* Fix some inconsistencies with 3D texture rule.

* Add dispose tests.

* Use a background thread for the background context.

Rather than setting and unsetting a context as current, doing the work on a dedicated thread with signals seems to be a bit faster.

Also nerf the multithreading test a bit.

* Copy to texture with matching alignment

This extends the copy to work for some videos with unusual size, such as tutorial videos in SMO. It will only occur if the destination texture already exists at XCount size.

* Track reads for buffer copies. Synchronize new buffers before copying overlaps.

* Remove old texture flushing mechanisms.

Range tracking all the way, baby.

* Wake the background thread when disposing.

Avoids a deadlock when games are closed.

* Address Feedback 1

* Separate TextureCopy instance for background thread

Also `BackgroundContextWorker.InBackground` for a more sensible idenfifier for if we're in a background thread.

* Add missing XML docs.

* Address Feedback

* Maybe I should start drinking coffee.

* Some more feedback.

* Remove flush warning, Refocus window after making background context
2020-10-16 17:18:35 -03:00
..
assets Improvements to input and input configuration in the GUI. (#849) 2020-05-03 04:00:53 +02:00
Diagnostic ui: Initial better user error reporting (#1503) 2020-09-01 11:09:42 +02:00
AboutWindow.cs ui: Initial better user error reporting (#1503) 2020-09-01 11:09:42 +02:00
AboutWindow.glade Add features to GUI (#757) 2019-11-29 15:32:51 +11:00
ApplicationAddedEventArgs.cs Fix application list (#891) 2020-01-31 19:21:46 +01:00
ApplicationCountUpdatedEventArgs.cs Fix application list (#891) 2020-01-31 19:21:46 +01:00
ApplicationData.cs Remember GUI column sort and separate hotkey settings from emulated input settings (#1223) 2020-06-26 12:30:16 +02:00
ApplicationLibrary.cs hle/ui: Basic multi programs support (#1560) 2020-09-21 13:45:30 +10:00
ApplicationMetadata.cs Create method to LoadAndSave ApplicationMetaData and get rid of code duplication (#872) 2020-01-12 04:01:04 +01:00
ControllerWindow.cs Add Motion controls (#1363) 2020-09-29 23:32:42 +02:00
ControllerWindow.glade Add Motion controls (#1363) 2020-09-29 23:32:42 +02:00
DlcWindow.cs Update to LibHac 0.12.0 (#1485) 2020-09-01 17:08:59 -03:00
DlcWindow.glade Implement dlc management window (#1313) 2020-06-23 10:32:07 +10:00
ErrorAppletDialog.cs Basic impl of Error Applet (#1551) 2020-09-28 00:00:38 +02:00
GameTableContextMenu.cs hle/ui: Basic multi programs support (#1560) 2020-09-21 13:45:30 +10:00
GLRenderer.cs Memory Read/Write Tracking using Region Handles (#1272) 2020-10-16 17:18:35 -03:00
GtkDialog.cs Rollback the CreateExitDialog function that was lost with auto updater 2020-10-10 01:22:25 +02:00
GtkHostUiHandler.cs Basic impl of Error Applet (#1551) 2020-09-28 00:00:38 +02:00
InputDialog.cs Implement Software Keyboard GTK frontend (#1434) 2020-08-03 03:30:58 +02:00
JoystickController.cs system: Make index 0 of keyboards in configuration 'all keyboards' 2020-05-03 15:00:29 +02:00
KeyboardController.cs Remember GUI column sort and separate hotkey settings from emulated input settings (#1223) 2020-06-26 12:30:16 +02:00
MainWindow.cs Replace Host FPS with GPU command queue load ("Fifo %") (#1585) 2020-10-14 07:54:42 +11:00
MainWindow.glade Replace Host FPS with GPU command queue load ("Fifo %") (#1585) 2020-10-14 07:54:42 +11:00
Migration.cs Allow launching with custom data directories (#1505) 2020-08-30 18:51:53 +02:00
ProfileDialog.cs Improvements to input and input configuration in the GUI. (#849) 2020-05-03 04:00:53 +02:00
ProfileDialog.glade Improvements to input and input configuration in the GUI. (#849) 2020-05-03 04:00:53 +02:00
SaveImporter.cs Update to LibHac 0.12.0 (#1485) 2020-09-01 17:08:59 -03:00
SettingsWindow.cs Add Motion controls (#1363) 2020-09-29 23:32:42 +02:00
SettingsWindow.glade Add Motion controls (#1363) 2020-09-29 23:32:42 +02:00
StatusUpdatedEventArgs.cs Replace Host FPS with GPU command queue load ("Fifo %") (#1585) 2020-10-14 07:54:42 +11:00
TitleUpdateWindow.cs hle/ui: Basic multi programs support (#1560) 2020-09-21 13:45:30 +10:00
TitleUpdateWindow.glade Implement update loader and log loaded application info (#1023) 2020-04-12 23:02:37 +02:00
UrlHelper.cs ui: Initial better user error reporting (#1503) 2020-09-01 11:09:42 +02:00