Commit graph

1664 commits

Author SHA1 Message Date
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
HorrorTroll
441d1b0faf Add GPU name in status bar (#984)
* Add GPU name in status bar

* Fixed like Ac_K suggest

* Nit.

* Minor fix

* Minor change.

* Nit.

* Fixed for ATI vendor

* Minor fix, again...
2024-02-22 19:14:51 -05:00
LDj3SNuD
dccce0b7ce Add Fcvtas_S/V & Fcvtau_S/V. (#1018) 2024-02-22 19:14:51 -05:00
Chenj168
0822400096 Fix the item name cannot be displayed in profiler view. (#1021) 2024-02-22 19:14:51 -05:00
Thog
d23058a1b3 friends: Stub GetBlockedUserListIds (#1017) 2024-02-22 19:14:51 -05:00
Ac_K
7d8ef32ac3 Fix Prepo parsing reports (#1016)
This fix the parsing of prepo service reports which could failed in some edge case. I've improved the parsing of the object to a JSON string too.
2024-02-22 19:14:51 -05:00
gdkchan
69f28d6c94 Implement ICMP shader instruction (#1010) 2024-02-22 19:14:50 -05:00
gdkchan
47d44cb369 Keep sRGB enabled for texture blits (#1009) 2024-02-22 19:14:50 -05:00
gdkchan
43ffa1f151 Implement textureQueryLevels (#1007) 2024-02-22 19:14:50 -05:00
Chenj168
8a8661f953 Move the MakeOp to OpCodeTable class, for reduce the use of ConcurrentDictionary (#996) 2024-02-22 19:14:50 -05:00
gdkchan
c6e6b8cb55 Support partial invalidation on texture access (#1000)
* Support partial invalidation on texture access

* Fix typo

* PR feedback

* Fix modified size clamping
2024-02-22 19:14:50 -05:00
Ac_K
64c2cc429c Implement GetRegionCode and add the RegionCode to settings (#999)
This implement `GetRegionCode` accordingly to RE. I've added a setting in the GUI and a field in the Configuration file with a way to update the Configuration file if needed.
2024-02-22 19:14:50 -05:00
Chenj168
30efe79dfc Modify TranslatedFunction.GetPointer () to optimize performance (#995)
* add local var to reduce calling Marshal.GetFunctionPointerForDelegate

* modify code style
2024-02-22 19:14:50 -05:00
riperiperi
53eec5a3fb CodeGen Optimisations (LSRA and Translator) (#978)
* Start of JIT garbage collection improvements

- thread static pool for Operand, MemoryOperand, Operation
- Operands and Operations are always to be constructed via their static
helper classes, so they can be pooled.
- removing LinkedList from Node for sources/destinations (replaced with
List<>s for now, but probably could do arrays since size is bounded)
- removing params constructors from Node
- LinkedList<> to List<> with Clear() for Operand assignments/uses
- ThreadStaticPool is very simple and basically just exists for the
purpose of our specific translation allocation problem. Right now it
will stay at the worst case allocation count for that thread (so far) -
the pool can never shrink.

- Still some cases of Operand[] that haven't been removed yet. Will need
to evaluate them (eg. is there a reasonable max number of params for
Calls?)

* ConcurrentStack instead of ConcurrentQueue for Rejit

* Optimize some parts of LSRA

- BitMap now operates on 64-bit int rather than 32-bit
- BitMap is now pooled in a ThreadStatic pool (within lrsa)
- BitMap now is now its own iterator. Marginally speeds up iterating
through the bits.
- A few cases where enumerators were generated have been converted to
forms that generate less garbage.
- New data structure for sorting _usePositions in LiveIntervals. Much
faster split, NextUseAfter, initial insertion. Random insertion is
slightly slower.
- That last one is WIP since you need to insert the values backwards. It
would be ideal if it just flipped it for you, uncomplicating things on
the caller side.

* Use a static pool of thread static pools. (yes.)

Prevents each execution thread creating its own lowCq pool and making me cry.

* Move constant value to top, change naming convention.

* Fix iteration of memory operands.

* Increase max thread count.

* Address Feedback
2024-02-22 19:14:50 -05:00
Thog
93d0e26e6b audren: Accept REV8 (#993)
REV8 only added changes on performance buffer and wavebuffer dsp command
generation.

As we don't support any of those, we can just increment the revision
number for now.
2024-02-22 19:14:50 -05:00
gdkchan
710be12d80 Improve shader sampler type selection (#989) 2024-02-22 19:14:50 -05:00
riperiperi
fb05c3898b Fix GTK window crash by using 24 bit surface on unix, 32 bit on windows. (#976)
* Use 24 bit surface on unix, 32 bit on windows.

* Address jd's comment

Co-authored-by: Thomas Guillemard <me@thog.eu>
2024-02-22 19:14:50 -05:00
riperiperi
fa09e9ae64 Implement AESMC, AESIMC, AESE, AESD and VEOR AArch32 instructions (#982)
* Add VEOR and AES instructions.

* Add tests for crypto instructions.

* Update ValueSource name.
2024-02-22 19:14:50 -05:00
gdkchan
a5449c71a3 Implement MME shadow RAM (#987) 2024-02-22 19:14:49 -05:00