Commit graph

2882 commits

Author SHA1 Message Date
gdkchan
c5057d77d7 Initial conditional rendering support (#1012)
* Initial conditional rendering support

* Properly reset state

* Support conditional modes and skeleton a counter cache for future host conditional rendering

* Address PR feedback
2024-02-22 19:14:55 -05:00
Michael Kuklinski
dc8365216a Update .NET Core to 3.1, and update NuGet Packages (#1121)
* Updated all NuGet packages to latest, and updated the framework from .NET Core 3.0 to 3.1.

* Updating appveyor settings for 3.1

Updating appveyor to use the netcoreapp3.1 path instead of 3.0.

* Removing unneeded NuGet package System.Runtime.CompilerServices.Unsafe.

* Removing unused NuGet package SharpFontCore.

* Removing unused NuGet package TimeZoneConverter.Posix

* Cleaning up by adding newline to a csproj.

* Simplfying a NuGet conditional include, and adding a warning disable for an annoying NuGet package.

* I'm not sure if .travis.yml is still used, but I'm updating its 'dotnet' version to the correct SDK.

* Making the runtime version into its own environment variable so it's a bit easier to change in the future.

* Removing OpenTK.NetStandard reference from Ryujinx.Common

* Fixing indentation in Common.csproj

* Updating the README to specify .NET Core 3.1.

* Reverting the update of the GTKSharp package so it doesn't block the PR.
2024-02-22 19:14:55 -05:00
Thog
eebfe80d49 SurfaceFlinger v2 (#981)
* Rewrite SurfaceFlinger

Reimplement accurately SurfaceFlinger (based on my 8.1.0 reversing of it)

TODO: support swap interval properly and reintroduce disabled "game vsync" support.

* Some fixes for SetBufferCount

* uncomment a test from last commit

* SurfaceFlinger: don't free the graphic buffer in SetBufferCount

* SurfaceFlinger: Implement swap interval correctly

* SurfaceFlinger: Reintegrate Game VSync toggle

* SurfaceFlinger: do not push a fence on buffer release on the consumer side

* Revert "SurfaceFlinger: do not push a fence on buffer release on the consumer side"

This reverts commit 586b52b0bfab2d11f361f4b59ab7b7141020bbad.

* Make the game vsync toggle work dynamically again

* Unregister producer's Binder object when closing layer

* Address ripinperi's comments

* Add a timeout on syncpoint wait operation

Syncpoint aren't supposed to be waited on for more than a second.

This effectively workaround issues caused by not having a channel
scheduling in place yet.

PS: Also introduce Android WaitForever warning about fence being not
signaled for 3s

* Fix a print of previous commit

* Address Ac_K's comments

* Address gdkchan's comments

* Address final comments
2024-02-22 19:14:55 -05:00
gdkchan
6fa3fe7290 Implement SULD shader instruction (#1117)
* Implement SULD shader instruction

* Some nits
2024-02-22 19:14:54 -05:00
Cristallix
024be57c8d Suppress warnings from fields never used or never assigned (CS0169 and CS0649) (#919)
* chore : disable unwanted warnings and minor code cleanup

* chore : remove more warnings

* fix : reorder struct correctly

* fix : restore _isKernel and remove useless comment

* fix : copy/paste error

* fix : restore CallMethod call

* fix : whitespace

* chore : clean using

* feat : remove warnings

* fix : simplify warning removal on struct

* fix : revert fields deletion and code clean up

* fix : re-add RE value

* fix : typo
2024-02-22 19:14:54 -05:00
gdkchan
ec851d980d Report more realistic GPU timestamps when FastGpuTime is enabled (#1139) 2024-02-22 19:14:54 -05:00
Ficture Seven
650578c673 Avoid temporaries when pre-allocating Store %x, imm8/16/32 (#1123) 2024-02-22 19:14:54 -05:00
Thog
d2a249d472 Implement GPU syncpoints (#980)
* Implement GPU syncpoints

This adds support for GPU syncpoints on the GPU backend & nvservices.

Everything that was implemented here is based on my researches,
hardware testing of the GM20B and reversing of nvservices (8.1.0).

Thanks to @fincs for the informations about some behaviours of the pusher
and for the initial informations about syncpoints.

* syncpoint: address gdkchan's comments

* Add some missing logic to handle SubmitGpfifo correctly

* Handle the NV event API correctly

* evnt => hostEvent

* Finish addressing gdkchan's comments

* nvservices: write the output buffer even when an error is returned

* dma pusher: Implemnet prefetch barrier

lso fix when the commands should be prefetch.

* Partially fix prefetch barrier

* Add a missing syncpoint check in QueryEvent of NvHostSyncPt

* Address Ac_K's comments and fix GetSyncpoint for ChannelResourcePolicy == Channel

* fix SyncptWait & SyncptWaitEx cmds logic

* Address ripinperi's comments

* Address gdkchan's comments

* Move user event management to the control channel

* Fix mm implementation, nvdec works again

* Address ripinperi's comments

* Address gdkchan's comments

* Implement nvhost-ctrl close accurately + make nvservices dispose channels when stopping the emulator

* Fix typo in MultiMediaOperationType
2024-02-22 19:14:53 -05:00
mageven
1bb898b8ed Implement Depth Clamping (#1120)
* Implement Depth Clamping and add misc enums

* Fix formatting
2024-02-22 19:14:53 -05:00
CJ Bok
fea57a3c92 System Time Offset Implementation (#1101)
* System Time Offset Implementation

* Addressed @Thog's comments

* Addressed JD's comments

* Addressed @Thog's and @AcK77's comments

* formatting correction
2024-02-22 19:14:53 -05:00
Ficture Seven
df91d3a1b2 Improve V128 (#1097)
* Improve V128

* Use LayoutKind.Sequential instead

* Add As<T>, Get<T> & Set<T>

* Fix CpuTest

* Rename Get<T> & Set<T> to Extract<T> & Insert<T>

* Add XML documentation

* Nit
2024-02-22 19:14:53 -05:00
mageven
d16f6b728d Fix oversight in depth range initialization from PR #1093 (#1112) 2024-02-22 19:14:53 -05:00
Alex Barney
a55884be14 Ensure account save data exists when launching an extracted game (#1108)
Also fix a regression from cecbd256 where the dummy control data wouldn't be used
2024-02-22 19:14:53 -05:00
gdkchan
05f27aa1bc Fix negation of HADD2 constant buffer source (#1116) 2024-02-22 19:14:53 -05:00
Xpl0itR
5e017b93e2 Implement update loader and log loaded application info (#1023)
* Implement update loader

* Add title version to titlebar and log loaded application info

* nits

* requested changes
2024-02-22 19:14:53 -05:00
Alex Barney
e80acc7037 Print the result name in SetTerminateResult if possible (#1105) 2024-02-22 19:14:53 -05:00
Ficture Seven
76623d8028 Optimize %x ^ %x = 0 (#1094)
* JIT: Optimize %x ^ %x = 0

* Address feedback

* Fix typo
2024-02-22 19:14:53 -05:00
Elise
dba95ee5bd Use libhac for loading NSO and KIP (#1047)
* Use libhac for loading NSOs and KIPs

* Fix formatting

* Refactor KIP and NSO executables for libhac

* Fix up formatting

* Remove Ryujinx.HLE.Loaders.Compression

* Remove reference to Ryujinx.HLE.Loaders.Compression in NxStaticObject.cs

* Remove reference to Ryujinx.HLE.Loaders.Compression in KernelInitialProcess.cs

* Rename classes in Ryujinx.HLE.Loaders.Executables

* Fix space alignment

* Fix up formatting
2024-02-22 19:14:53 -05:00
mageven
e14c484a7d Simple GPU fixes (#1093)
* Implement RasterizeEnable

* Match viewport count to hardware

* Simplify ScissorTest tracking around Blits

* Disable RasterizerDiscard around Blits and track its state

* Read RasterizeEnable reg as bool and add doc
2024-02-22 19:14:53 -05:00
riperiperi
68c86c6a72 Use the jump table for HighCq tail continues. (#1088)
* Use the jump table for tail continues.

This path is always reached when a function larger than our current length limit (currently 5000) is compiled.

* Use Call Flag rather than 1L
2024-02-22 19:14:53 -05:00
Thog
02d22f2e26 libhac: use ApplicationControlProperty instead of Nacp (#1073)
* libhac: use ApplicationControlProperty instead of Nacp

Nacp was marked as deprecated in 0.10.0, this PR remove all usage of it
from Ryujinx and use the new struct ApplicationControlProperty.

* Address Moose's comment
2024-02-22 19:14:53 -05:00
mageven
632b895f25 Revert SwKbd Applet ReadStruct and fix IApplet's ReadStruct to catch (#1087)
error at compile time
2024-02-22 19:14:53 -05:00
gdkchan
c5c84df1fb Better IPA shader instruction implementation (#1082)
* Fix varying interpolation on fragment shader

* Some nits

* Alignment
2024-02-22 19:14:53 -05:00
mageven
e34c4b51ec HID SharedMem Rework (#1003)
* Delete old HLE.Input

* Add new HLE Input.

git shows Hid.cs as modified because of the same name. It is new.

* Change HID Service

* Change Ryujinx UI to reflect new Input

* Add basic ControllerApplet

* Add DebugPad

Should fix Kirby Star Allies

* Address Ac_K's comments

* Moved all of HLE.Input to Services.Hid
* Separated all structs and enums each to a file
* Removed vars
* Made some naming changes to align with switchbrew
* Added official joycon colors

As an aside, fixed a mistake in touchscreen headers and added checks to
important SharedMem structs at init time.

* Further address Ac_K's comments

* Addressed gdkchan's and some more Ac_K's comments

* Address AcK's review comments

* Address AcK's second review comments

* Replace missed Marshal.SizeOf and address gdkchan's comments
2024-02-22 19:14:52 -05:00
gdkchan
b0397fcbd2 Remove output interpolation qualifier (#1070) 2024-02-22 19:14:52 -05:00
Xpl0itR
cdb1805e0f fix tooltip (#1080) 2024-02-22 19:14:52 -05:00
Xpl0itR
70ff630e60 Set default width and height based on monitor resolution (#1046) 2024-02-22 19:14:52 -05:00
Xpl0itR
e78a53d317 Add warning with an option to disable for settings that impact performance (#1002)
* Add warning and option to disable when loading game with debug logs

* Add warning and option to disable when shader dumping is enabled

* Edit text and add title
2024-02-22 19:14:52 -05:00
Xpl0itR
2d1ec3dd5d Make max anisotropy configurable (#1043)
* Make max anisotropy configurable

* Move opengl command to opengl project

* Add GUI option
2024-02-22 19:14:52 -05:00
Thog
5553584752 Retrigger CI 2024-02-22 19:14:52 -05:00
gdkchan
179ded8b39 Implement FCMP shader instruction (#1067) 2024-02-22 19:14:52 -05:00
gdkchan
abcb26d2a3 Support constant attributes (with a value of zero) (#1066)
* Support constant attributes (with a value of zero)

* Remove extra line
2024-02-22 19:14:52 -05:00
Thog
718042028a Reduce requirements for running homebrew (#1053)
* Reduce requirements for running homebrews

This commit change the following behaviours:

- TimeZoneBinary system archive isn't required until guest code call LoadTimeZoneRule.
- Fonts system archives aren't requred until a "pl:u" IPC call is made.
- Custom font support was dropped.
- TimeZoneBinary missing message is now an error and not a warning.

* Address comments
2024-02-22 19:14:52 -05:00
riperiperi
cf6fcd990c Index constant buffer vec4s using ternary expressions. (#1015)
* Index constant buffer vec4s using ternary expressions.

* Remove indexed path.

We determined that it had negligible impact.

* Revert "Remove indexed path."

This reverts commit 25ec4eddfa.

* Revert "Revert "Remove indexed path.""

This reverts commit 7cd52fecb5.
2024-02-22 19:14:52 -05:00
gdkchan
00d399dd39 Workaround for AMD and Intel view format bug (#1050)
* Workaround for Intel view format bug

* Dispose of the intermmediate texture aswell

* Apply workaround on AMD aswell
2024-02-22 19:14:52 -05:00
Elise
1b249fe9ab Escape key now brings up a dialog to confirm you want to stop emulation (#1044)
* Add a dialog to make sure user wants to stop emulation when esc is pressed

* Remove unneccesary space

* Fix formatting

* Remove unnessecary spaces

* Fix formatting for member of GtkDialog
2024-02-22 19:14:52 -05:00
Chenj168
25265e5782 Move the OpActivator to OpCodeTable class for improve performance (#1001)
* Move the OpActivator to OpCodeTable class, for reduce the use of ConcurrentDictionary

* Modify code style.
2024-02-22 19:14:52 -05:00
Xpl0itR
ec84e22f06 Discord Rich Presence update (#1029)
* Fix bug

* Add a few more titles and move the list from dat file into the code

* requested changes
2024-02-22 19:14:51 -05:00
gdkchan
0ba1c69dce Implement GPU scissors (#1058)
* Implement GPU scissors

* Remove unused using

* Add missing changes for Clear
2024-02-22 19:14:51 -05:00
Elise
436f16ad86 Implement NOP and stub DEPBAR shader instructions (#1041)
* Implement NOP and stub DEPBAR shader instruction

* Fix a few issues and formatting stuff

* Remove OpCodeNop/Depbar and use OpCode instead

* Fix NOP shader instruction opcode

* Fix formatting
2024-02-22 19:14:51 -05:00
Thog
124152dcb1 Make Device Location Name configuration (custom TZ) (#1031)
This permit to use arbitrary timezone (instead of UTC).

Useful for games like ACNH.
2024-02-22 19:14:51 -05:00
jduncanator
fa6cfd82a1 prepo: Add a MessagePack object formatter (#1034) 2024-02-22 19:14:51 -05:00
Thog
9f654a3bb8 ui: Make it possible to open the device save directory (#1040)
* Add an open device folder option

* Simplify logic from previous commit

* Address Xpl0itR's comments

* Address Ac_K comment
2024-02-22 19:14:51 -05:00
Elise
9d2f746ae5 Fix unhandled UnauthorizedAccessException causing crash while listing… (#1025)
* Fix unhandled UnauthorizedAccessException causing crash while listing directories

* Actually handle not having privileges for a directory

* Fix log message when not having privileges for a directory

* Remove unneccesary empty lines

* Remove unneccecssary space
2024-02-22 19:14:51 -05:00
gdkchan
c755cd2292 Implement VMNMX shader instruction (#1032)
* Implement VMNMX shader instruction

* No need for the gap on the enum

* Fix typo
2024-02-22 19:14:51 -05:00
Ac_K
16a8cac9ac prepo: Implement RequestImmediateTransmission and GetTransmissionStatus (#1033)
* prepo: Implement RequestImmediateTransmission and GetTransmissionStatus

This implement RequestImmediateTransmission and GetTransmissionStatus of the prepo service accurately to RE.
Since we don't use reports, I've explained what the calls do in the real service.

Close #958

* fix comment
2024-02-22 19:14:51 -05:00
Alex Barney
8346cb9542 Add IMultiCommitManager (#1011)
* Update LibHac

* Add IMultiCommitManager

* Updates

* Delete NuGet.Config

* Add command version
2024-02-22 19:14:51 -05:00
riperiperi
6660b430f1 Add Fast Paths for Crypto instructions (A32/A64) (#1026)
* Add Fast Paths for Crypto instructions (A32/A64)

* Replace additional XOR with passing in const zero.
2024-02-22 19:14:51 -05:00
Ac_K
f7ca94df52 Fix gpu vendor name parsing (#1030)
* Update GLRenderer.cs

* print the vendor name fully
2024-02-22 19:14:51 -05:00
jduncanator
a148b05da8 prepo: Resolve JSON parsing issues in prepo report handling (#1022)
It seems MsgPack.Cli incorrectly converts some unicode control characters directly to JSON literal Unicode strings (eg. '\1'). As these are invalid, pretty printing the JSON report fails.

This removes pretty printing, pending a proper implementation, and tidies up MsgPack deserialization.
2024-02-22 19:14:51 -05:00