Commit graph

2549 commits

Author SHA1 Message Date
Ac_K
ebc5c65b3d ffmpeg: Attempt to fix RootPath on some linux distributions (#2292)
* fix ffmpeg lib path

* Check if ffmpeg isn't found

* Move code to FFmpegContext

* Call it in static constructor

* revert static instance

* rollback

* lazy initialization

* Revert "lazy initialization"

This reverts commit f675d26a5d.
2024-02-22 19:15:47 -05:00
riperiperi
34cf27d3a0 Assign _backgroundContext before starting its worker thread. (#2299)
Fixes a random crash when starting an embedded game.
2024-02-22 19:15:47 -05:00
FICTURE7
f13be861bc Use branch instead of tailcall for recursive calls (#2282)
* Use branch instead of tailcall for recursive calls

Use a branch instead of doing a tailcall for recursive calls. This
avoids having to store the dispatch address, setting up the epilogue and
keeps guest registers in host registers for longer.

The rejit check is moved down into the entry block so that the rejit
behaviour remains the same as before.

* Set PTC version

Co-authored-by: gdkchan <gab.dark.100@gmail.com>
2024-02-22 19:15:47 -05:00
FICTURE7
27b06daedf Add BIC/ORR Vd.T, #imm fast path (#2279)
* Add fast path for BIC Vd.T, #imm

* Add fast path for ORR Vd.T, #imm

* Set PTC version

* Fixup Exception to InvalidOperationException
2024-02-22 19:15:47 -05:00
gdkchan
139a73217c Move shader resource descriptor creation out of the backend (#2290)
* Move shader resource descriptor creation out of the backend

* Remove now unused code, and other nits

* Shader cache version bump

* Nits

* Set format for bindless image load/store

* Fix buffer write flag
2024-02-22 19:15:46 -05:00
riperiperi
cccb6206b1 Remove ForceDedicatedGpu, as the driver utilities will now do that. 2024-02-22 19:15:46 -05:00
riperiperi
4cfc72a077 Data should not be public for nvapi unicode string 2024-02-22 19:15:46 -05:00
riperiperi
c539a3efc4 Fix skipping missing shaders 2024-02-22 19:15:46 -05:00
riperiperi
b45ee71d69 Use IntPtr for handles, remove unsafe keyword 2024-02-22 19:15:46 -05:00
riperiperi
37bb02dd79 Forcibly enable threaded optimization on boot. 2024-02-22 19:15:46 -05:00
riperiperi
5fe9108929 Nit 2024-02-22 19:15:46 -05:00
riperiperi
bcd1fa44b8 The task isn't required for loading compute binary. 2024-02-22 19:15:46 -05:00
riperiperi
17969e31ce Use event to wake the main thread on task completion 2024-02-22 19:15:46 -05:00
riperiperi
2bf0287ead The new host program needs to be saved even if it isn't valid. 2024-02-22 19:15:46 -05:00
riperiperi
1d03cf3ff4 Implement parallel host shader cache compilation. 2024-02-22 19:15:46 -05:00
riperiperi
0877cc30fa Pass CbufSlot when getting info from the texture descriptor (#2291)
* Pass CbufSlot when getting info from the texture descriptor

Fixes some issues with bindless textures, when CbufSlot is not equal to the current TextureBufferIndex.

Specifically fixes a random chance of full screen colour flickering in Super Mario Party.

* Apply suggestions from code review

Oops

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

Co-authored-by: gdkchan <gab.dark.100@gmail.com>
2024-02-22 19:15:46 -05:00
FICTURE7
3da4219b4f Allow LocalVariable to be assigned more than once (#2288)
* Allow `LocalVariable` to be assigned more than once

This allows us to write flow controls like loops and if-elses with
LocalVariables participating in phi nodes.

* Add `GetLocalNumber` to operand
2024-02-22 19:15:46 -05:00
riperiperi
d38da19e51 Use copy dependencies for the Intel/AMD view format workaround (#2144)
* This might help AMD a bit

* Removal of old workaround.
2024-02-22 19:15:46 -05:00
Mary
e59a6e04c7 misc: Move configuration management to the Ryujinx project (#2269)
* Decouple configuration from Ryujinx.HLE and Ryujinx.Input

* Move Configuration to the Ryujinx project
2024-02-22 19:15:45 -05:00
Mary
dec59cfff2 ci: Do not enforce userid on nightly PR comment
This avoid issues when two different users work on a single PR.
2024-02-22 19:15:45 -05:00
gdkchan
1c0c72d278 Fold constant offsets and group constant addresses (#2285)
* Fold constant offsets and group constant addresses

* PPTC version bump
2024-02-22 19:15:45 -05:00
LDj3SNuD
4904996f01 PPTC meets ExeFS Patching. (#1865)
* PPTC meets ExeFS Patching.

* InternalVersion = 1865

* Ready!

* Optimized the PtcProfiler Load/Save methods.
2024-02-22 19:15:45 -05:00
gdkchan
23a07cba14 Fix race in SM initialization (#2280) 2024-02-22 19:15:45 -05:00
gdkchan
64627a7c6d Fix a specific core migration bug on the scheduler (#2271) 2024-02-22 19:15:45 -05:00
Mary
3876d2f601 Miria: Fix GTK3 keyboard mapping (#2273)
I found some mistake I made back when I first wrote the mapping for
Miria.

This fix:
- an offset by one after the tilde key in the mapping.
- F30 being mapped to F29.
2024-02-22 19:15:45 -05:00
Mary
eef48ffacf Fix embedded game rendering (#2275)
This fix an issue when after a relaunch of a game containing other
games (embedded games), the renderer window size would be 1x1.

This bug was introduced by #2260.
2024-02-22 19:15:45 -05:00
Mary
4e79901a14 misc: Fix default value for GraphicsConfig.MaxAnisotropy (#2274)
As title say.
Doesn't change anything as the Ryujinx project set it.
2024-02-22 19:15:45 -05:00
Mary
9e9c3078e6 SM instance & TIPC fixes (#2241)
This PR addresses the following issues:
- SM was previously instancied once and reused on all sessions. This
  could cause inconsistency on the service initialization.
- TIPC replies were not matching what is generated on hardware.
2024-02-22 19:15:45 -05:00
Mary
fcf0753d0a audio: Implement a SDL2 backend (#2258)
* audio: Implement a SDL2 backend

This adds support to SDL2 as an audio backend.
It has the same compatibility level as OpenAL without its issues.

I also took the liberty of restructuring the SDL2 code to have one
shared project between audio and input.

The configuration version was also incremented.

* Address gdkchan's comments

* Fix update logic

* Add an heuristic to pick the correct target sample count wanted by the game

* Address gdkchan's comments

* Address Ac_k's comments

* Fix audren output

* Address gdkchan's comments
2024-02-22 19:15:45 -05:00
Ac_K
a2153e86f1 ffmpeg: Redirect log output (#2266)
* ffmpeg: Redirect log output

* Remove leftover delegate

* Logging -> Log
2024-02-22 19:15:45 -05:00
Ac_K
6c8e9f3a9c nsd: Cleanup the service and implement some calls (#2250)
* nim: Cleanup the service and implement some calls

* Fix symbol typo

* add ApplicationServerEnvironmentType enum

* Change condition
2024-02-22 19:15:45 -05:00
Mary
7e67e26d47 gtk3: Add base for future Vulkan integration (#2260)
* gtk3: Add base for future Vulkan integration

This PR puts in place the fondation for the future Vulkan integration on
the GTK3 UI.

This also updated SPB to 0.0.3-build14 that fixed a use after free on
XErrorHandler on Linux.

* Address rip's comments

* Merge GLWidget inside GLRenderer

* Clean up and deduplicate renderer implementations

* Address shahil's comments

* Address Ac_K's comments

* Address gdkchan's comments
2024-02-22 19:15:44 -05:00
Mary
06092d6821 Set FFmpeg.AutoGen library search path on Linux
This fix FFmpeg.AutoGen being unable to find system ffmpeg libraries on
Linux.
2024-02-22 19:15:44 -05:00
Ac_K
4efa816973 misc: Cleanup Discord Presence (#2262)
* ui: Cleanup Discord Presence

* Clean Timestamps
2024-02-22 19:15:44 -05:00
Mary
cff4c432a3 Update to FFmpeg 4.4.0 (#2259)
* Update to FFmpeg 4.4.0

As the title say

* Fix warning from 4.4.0
2024-02-22 19:15:44 -05:00
Mary
4b6606c584 hid: Rewrite shared memory management (#2257)
* hid: Rewrite shared memory management

This entirely rewrite our ancient (and original) HID shared memory
interface to be more usable and accurate.

HID update logics were updated to reflect those changes but should work
still the same way it previously did.

This need heavy testing just in case to avoid possible regressions.

* Silence warnings

* Address gdkchan's comments

* Address Ac_K's comments

* Address one missing nit
2024-02-22 19:15:44 -05:00
gdkchan
eba35f9ee0 Fix shader buffer write flag on atomic instructions (#2261)
* Fix shader buffer write flag on atomic instructions

* Shader cache version bump
2024-02-22 19:15:44 -05:00
Mark Araujo
ffdb7e7f3b Changes ordering of config.json and configuration files (#2253)
This allows configuration values to be written to log file for analysis
2024-02-22 19:15:44 -05:00
Ac_K
caec8b9a99 nfp: Increase Amiibo scanning delay (#2256) 2024-02-22 19:15:44 -05:00
gdkchan
1787a690d9 Fix GetClockSnapshot not writing steady clock timepoint (#2249) 2024-02-22 19:15:44 -05:00
Caian Benedicto
601cee1f75 Initialize hid inputs on activation (#2246) 2024-02-22 19:15:44 -05:00
EmulationFanatic
848d1cf300 Fix uint -> int typo. (#2245) 2024-02-22 19:15:44 -05:00
gdkchan
fa753fce03 Fix IsRegionInUse check on NV memory allocator (#2243) 2024-02-22 19:15:44 -05:00
Mary
f12b01c907 HLE: Fix integer sign inconcistency accross the codebase (#2222)
* Make all title id instances unsigned

* Replace address and size with ulong instead of signed types

Long overdue change.
Also change some logics here and there to optimize with the new memory
manager.

* Address Ac_K's comments

* Remove uneeded cast all around

* Fixes some others misalignment
2024-02-22 19:15:43 -05:00
Ac_K
138a5661d8 account: add Custom User Profiles support (#2227)
* Initial Impl

* Fix names

* remove useless ContentManager

* Support backgrounds and improve avatar loading

* Fix firmware checks

* Addresses gdkchan feedback
2024-02-22 19:15:43 -05:00
Ac_K
5cab20b51f mm: Cleaned up the service a bit (#2233) 2024-02-22 19:15:43 -05:00
Mary
511e31537c Miria: Do not try to query keyboard input when controller isn't set (#2231)
This fix a possible crash with raw keyboard input since Miria.
I took the liberty to move the the keyboard update to avoid possible duplicate update if we end up having two keyboards in use.
2024-02-22 19:15:43 -05:00
gdkchan
868b371796 Only enable clip distance if written to on shader (#2217)
* Only enable clip distance if written to on shader

* Signal InstanceId use through FeatureFlags

* Shader cache version bump
2024-02-22 19:15:43 -05:00
FICTURE7
334f5278dd Add inlined on translation call counting (#2190)
* Add EntryTable<TEntry>

* Add on translation call counting

* Add Counter

* Add PPTC support

* Make Counter a generic & use a 32-bit counter instead

* Return false on overflow

* Set PPTC version

* Print more information about the rejit queue

* Make Counter<T> disposable

* Remove Block.TailCall since it is not used anymore

* Apply suggestions from code review

Address gdkchan's feedback

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

* Fix more stale docs

* Remove rejit requests queue logging

* Make Counter<T> finalizable

Most certainly quite an odd use case.

* Make EntryTable<T>.TryAllocate set entry to default

* Re-trigger CI

* Dispose Counters before they hit the finalizer queue

* Re-trigger CI

Just for good measure...

* Make EntryTable<T> expandable

* EntryTable is now expandable instead of being a fixed slab.
* Remove EntryTable<T>.TryAllocate
* Remove Counter<T>.TryCreate

Address LDj3SNuD's feedback

* Apply suggestions from code review

Address LDj3SNuD's feedback

Co-authored-by: LDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com>

* Remove useless return

* POH approach, but the sequel

* Revert "POH approach, but the sequel"

This reverts commit 5f5abaa247.

The sequel got shelved

* Add extra documentation

Co-authored-by: gdkchan <gab.dark.100@gmail.com>
Co-authored-by: LDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com>
2024-02-22 19:15:43 -05:00
Mary
6d74bf5cc7 Amadeus: Fix low pass base gain related issues on delay effect in mono (#2224)
This adds missing parenthesis around low pass z computation.

This fixes FEZ audio gain issues inside rooms. (Ryujinx/Ryujinx-Games-List#3526)
2024-02-22 19:15:43 -05:00