Archived
1
0
Fork 0
forked from Mirror/Ryujinx
Experimental Nintendo Switch Emulator written in C#
This repository has been archived on 2024-10-11. You can view files and clone it, but cannot push or open issues or pull requests.
Find a file
BaronKiko 92c1726647 GPU Profiling (#570)
* Profiler initial setup

* Capture actual timing data

* Profiling data dumped to file on close

* Support for multiple sessions under the same name

* Service profiling

* Sort output for easier read

* csv output

* Split session into 2 seperate values

* Refactor name to category

* Basic profiling window dummy. Toggle with F1 or set key with config
No actual data displayed yet, just a pretty triangle

* Simple font rendering

* Display some actual timing data

* Fix font bearing being ignored

* x bearing and advance. Fixed y bearing calc

* Different coloured lines to make reading easier

* Scrolling

* Multiple columns for name

* Column titles

* display in ms rather than ticks

* Bars to display times

* Sortable columns

* Regex filtering

* Better instant timing calculation
Fixed minor regex bug

* Better filtering
Better max value calculation
Skip some rendering to reduce profiler weight

* Variable update rate

* Show/hide inactive button
Some other touchups

* Add missing project reference

* Hide inactive and pause

* Fix viewport errors

* Update initial window position

* Variable name cleanup

* Disable timing dump by default

* Internal Profile refactor and cleanup

* Timing info cleanup

* Profile config cleanup

* Settings cleanup

* Button refactor

* Profile refactor

* Profile window cleanup

* Window manager refactor

* Font service cleanup

* Fixed bug in profiling method where method was called twice without profiling enabled

* Allow update rates of less than 1hz

* Stop using window.run because it's apparently not great for performance.
Some other performance things, should only draw a new frame when something has changed

* Improved time tracking to keep history

* Profile window was getting too long so I added regions and split bar rendering out into partial class

* Dummy graph view with button to toggle

* Realtime graphing initial commit

* Display totals on new bar

* Simple zooming support with arrow keys

* Limit graph zoom and label start and stop

* Added support for timing flags

* Stop data running away when paused and frame updated

* Manual step button

* Update at when flag issued (ie every frame)

* Removed useless finish profiling call

* Enable and disable profiling at compile time.

* Better plage for frame swap flag, also kept enough flags to cover larger time spans

* No more stopwatches created, uses PerformanceCounter now

* public and internal fields to props

* Move visible update to update rather than draw as it causes a lockup if called from draw
Also added profile window disposal so closing main window closes profiler too

* Fixed optimization settings for profiled builds

* Appveyer script guess to add profiling builds

* Quotes

* 1 less quote

* Maybe escape space?

* Specify config

* Different approach

* Fix file paths

* Fix another path

* Better artifact naming

* Missing -

* test  string

* Removed for, to test

* readd for

* moved dashes around so artifacts can begin with letters

* quote env vars

* martix

* Removed configs

* Much more efficient capture, ConcurrentDictionary was causing too much overhead

* Skip repeating pixels during draw

* Stop ram usage getting too high. Compensating for cleanup doing more now

* Profile CPU, execute skipped because it's just too much work

* Fixed bug with skipping draws. Furthest needed to be reset every loop

* Less distracting colour for timing flags

* Removed profile method function. It just doesn't play nice with conditional compilation so best to remove it now before it's used a lot

* Profile vertex end

* Null check for category, group and item

* Forgot to reset instant count/time

* Increment line when blank

* Fix threading conflict
Fixed instant count and time. Now accuratly represents the total time and count in the buffer

* Fixed bug in time rendering where times were being trimmed to an int.
Also added  microsecond/millisecond formatting to reduce the number of decimal places needed

* Profiled methods used by VertexEndGl

* Texture 2d copy profiled

* Support for multiple profiling levels

* Sometimes it would have to wait a long time for lock to clear so moved it to a tryenter and skip if already locked

* Dumb bug regarding clearing of timestamps. Start is already removed so no need to add it to the start

* Optimisations in drawing routine:
Only calculate bar top and bottom once per bar rather than once per timestamp
Pre-calculate the right side of the graph as it was being calculated multiple times per bar
Skip rendering timestamps that occupy the same pixel space now uses the raw timestamp to decide. While technically not as accurate it's much easier as the right side of the bar doesn't have to be calculated for a skipped timestamp

* Couple alignment changes

* Engine 3d call method profiled

* Custom equals overload for profile config. The default implpmentation was just too slow

* Bump cleanup thread priority. It clears the timer queue so it need to be run frequently

* Fixed bug with scrolling caused by recent rendering optimisations. Simply forgot to increment the line index on a skipped line

* Stopped blocking memory disposal so much. Also parralised(?) cleanup call

* Profiled M2mf, P2mf and shader compilation

* Missing file

* Removed deprecated config

* Removed legacy npaddebug

* Using statement no longer needed

* Apply suggestions from AcK

Co-Authored-By: Ac_K <Acoustik666@gmail.com>

* Apply suggestions from code review

Co-Authored-By: Ac_K <Acoustik666@gmail.com>
2019-06-01 02:13:57 +02:00
ChocolArm64 Add FCVT <Hd>, <Sn> and FCVT <Sd>, <Hn> Inst.; add Tests. (#692) 2019-05-30 19:51:39 -03:00
Ryujinx Add Discord Rich Presence (#681) 2019-05-30 23:27:43 +03:00
Ryujinx.Audio Built in profiling (#567) 2019-04-26 14:53:10 +10:00
Ryujinx.Common Built in profiling (#567) 2019-04-26 14:53:10 +10:00
Ryujinx.Graphics GPU Profiling (#570) 2019-06-01 02:13:57 +02:00
Ryujinx.HLE Add Discord Rich Presence (#681) 2019-05-30 23:27:43 +03:00
Ryujinx.LLE Built in profiling (#567) 2019-04-26 14:53:10 +10:00
Ryujinx.Profiler GPU Profiling (#570) 2019-06-01 02:13:57 +02:00
Ryujinx.ShaderTools Built in profiling (#567) 2019-04-26 14:53:10 +10:00
Ryujinx.Tests Add FCVT <Hd>, <Sn> and FCVT <Sd>, <Hn> Inst.; add Tests. (#692) 2019-05-30 19:51:39 -03:00
Ryujinx.Tests.Unicorn Built in profiling (#567) 2019-04-26 14:53:10 +10:00
.gitattributes aloha 2018-02-04 20:08:20 -03:00
.gitignore Implement ContentManager and related services (#438) 2018-11-18 17:37:41 -02:00
.travis.yml Add some tests (#18) 2018-02-15 21:04:38 -03:00
appveyor.yml Built in profiling (#567) 2019-04-26 14:53:10 +10:00
CONFIG.md Logger and Configuration Refactoring (#573) 2019-02-11 09:00:32 -03:00
KEYS.md Add XCI, NSP and NCA loading support (#404) 2018-09-08 15:33:27 -03:00
LICENSE.txt aloha 2018-02-04 20:08:20 -03:00
README.md Logger and Configuration Refactoring (#573) 2019-02-11 09:00:32 -03:00
Ryujinx.sln Built in profiling (#567) 2019-04-26 14:53:10 +10:00
Ryujinx.sln.DotSettings Do naming refactoring on Ryujinx.Graphics (#611) 2019-03-04 12:45:25 +11:00

Ryujinx Build status

Experimental Switch emulator written in C#

Many games boot, only a handful are playable, see the compatiblity list here.

Building

To build this emulator, you will need the .NET Core 2.1 (or higher) SDK or just drag'n'drop the homebrew *.NRO / *.NSO or the game *.NSP / *.XCI on the executable if you have a pre-built version.

Features

  • Audio is partially supported.

  • Keyboard Input is supported, see CONFIG.md

  • Controller Input is supported, see CONFIG.md

  • Config File: Config.jsonc should be present in executable folder. For more information you can go here.

Help

If you have some homebrew that currently doesn't work within the emulator, you can contact us through our Discord with the compiled *.NRO / *.NSO (and source code if possible) and then we'll keep whatever is making app / game not work on the watch list and fix it at a later date.

Contact

For help, support, suggestions, or if you just want to get in touch with the team; join our Discord server!

For donation support, please take a look at our Patreon.

Running

To run this emulator, you need the .NET Core 2.1 (or higher) SDK.
Run dotnet run -c Release -- path\to\homebrew.nro inside the Ryujinx project folder to run homebrew apps.
Run dotnet run -c Release -- path\to\game.nsp/xci to run official games.

Compatibility

You can check out the compatibility list here.

Latest build

These builds are compiled automatically for each commit on the master branch. They may be unstable or might not work at all.
The latest automatic build for Windows, Mac, and Linux can be found on the official website.