Commit graph

1549 commits

Author SHA1 Message Date
gdkchan
beadf3e332 Simplify depth test state updates (#1695) 2024-02-22 19:15:21 -05:00
gdkchan
a722d393e2 Fix buffer to texture copy with remap enabled (#1721) 2024-02-22 19:15:21 -05:00
EmulationFanatic
1bfd4f9e1d Specify the X64 version of .NET 5, and change the build command to be the right one (#1719) 2024-02-22 19:15:21 -05:00
Mary
6abb78213a shader cache: Fix Linux boot issues (#1709)
* shader cache: Fix Linux boot issues

This rollback the init logic back to previous state, and replicate the
way PTC handle initialization.

* shader cache: set default state of ready for translation event to false

* Fix cpu unit tests
2024-02-22 19:15:21 -05:00
Mary
f735007f1b shader cache: Fix possible race causing crashes on manifest at startup (#1718)
* shader cache: Fix possible race causing crashes on manifest at startup

This fix a misplace function call ending up causing possibly two write
on the cache.info at the same time.

* shader cache: Make RemoveManifestEntries async too to be sure all operations are perform before starting the game
2024-02-22 19:15:21 -05:00
Mary
689056f15b shader cache: Fix invalid virtual address clean up (#1717)
* shader cache: Fix invalid virtual address clean up

This fix an issue causing the virtual address of texture descriptors to
not be cleaned up when caching and instead cleaning texture format and swizzle.

This should fix duplicate high duplication in the cache for certain
games and possible texture corruption issues.

**THIS WILL INVALIDATE ALL SHADER CACHE LEVELS CONSIDERING THE NATURE OF THE ISSUE**

* shader cache: Address gdk's comment
2024-02-22 19:15:20 -05:00
gdkchan
e96c053dc3 Propagate zeta format properly (#1716) 2024-02-22 19:15:20 -05:00
Ac_K
a6e5e2470e am: Fix VR enabled by default (#1715)
This PR fix an issue I've made in #1688 which is enabled VR as default.
It could cause rendering issues in games when VR mode isn't used, as users have reported in Smash:
2024-02-22 19:15:20 -05:00
Ac_K
33f60a64a9 am/lbl/hid/pctl: Enabled VR Rendering (#1688)
* am/lbl/hid/pctl: Enabled VR Rendering

This PR enable VR rendering on games which support it through the Toy-Con VR Goggles.

Please remember Ryujinx currently don't support console SixAxis sensor and for now, in some games, the view can't be moved.

Everything is implemented accordingly to RE:
- am: ICommonStateGetter: SetVrModeEnabled, BeginVrModeEx, EndVrModeEx.
- lbl: ILblController: SetBrightnessReflectionDelayLevel, GetBrightnessReflectionDelayLevel, SetCurrentAmbientLightSensorMapping, GetCurrentAmbientLightSensorMapping, SetCurrentBrightnessSettingForVrMode, GetCurrentBrightnessSettingForVrMode, EnableVrMode, DisableVrMode, IsVrModeEnabled.
- pctl: IParentalControlService: ConfirmStereoVisionPermission, ConfirmStereoVisionRestrictionConfigurable, GetStereoVisionRestriction, SetStereoVisionRestriction, ResetConfirmedStereoVisionPermission, IsStereoVisionPermitted.
- hid: IHidServer: ResetSevenSixAxisSensorTimestamp is stubbed because we don't support console SixAxisSensor for now.

Maybe we could add a setting later to enable or disable VR. But I think it's fine to keep this always available since you have to enable it in games.

* Fix permission flag check

* Address gdkchan feedback
2024-02-22 19:15:20 -05:00
Mary
a9ddd875d1 ui diag: Add missing error message for ApplicationNotFound (#1693)
I missed to add the error messages for this error code on the initial
PR, this fix it.
2024-02-22 19:15:20 -05:00
EmulationFanatic
493cfe408b Standardize to camel-case: option to check for updates on launch (#1698)
* Standardize to camel-case: option to check for updates on launch

Updates the "Check for updates on launch" to read instead "Check For Updates On Launch" to be consistent with camel-case options elsewhere in the UI. This time done with manual editing instead of with the Glade app.

* Updated to match general English rules on articles and conjunctions
2024-02-22 19:15:20 -05:00
Xpl0itR
f72e76c49b Don't warn when debug feature is enabled in debug mode (#1707) 2024-02-22 19:15:20 -05:00
Mary
56bb2ec0da infra: Migrate to .NET 5 (#1694)
* infra: Migrate to .NET 5

This migrate projects and CI to .NET 5

* Remove language version restrictions (now on 9.0 by default)

* infra: pin .NET 5 to avoid later issues

* infra: Cleanup csproj files

* infra: update dependencies

* infra: Add temporary workaround for a bug in Vector128.Create

see https://github.com/dotnet/runtime/issues/44704 for more informations
2024-02-22 19:15:20 -05:00
mageven
88aa4cea6c IPSwitch: Quick fix to patch sets toggling (#1668)
* IPSwitch: Quick fix to patch sets toggling

* fmt fix: newlines before continue and return
2024-02-22 19:15:20 -05:00
Sera
3b2dfd6117 SettingsWindow: Add an Apply button (#1562)
* SettingsWindow: Add an Apply button

Adds an apply button that doesnt close the settings window when saving
the changes.

* fix the apply button staying turned on after clicking it
2024-02-22 19:15:20 -05:00
riperiperi
67feb9b599 Use "Screen Scissor" as size hint for render targets (#1703)
"Screen scissor" is the minimum size of all render targets, and is set when any render target is bound on NVN or OpenGL. Since it works on all active texture's real sizes, it is therefore more reliable than viewport 0's width, and is actually set before clear.

This fixes a regression with Hyrule Warriors: Age Of Calamity's cubemaps, which did not set viewport dimensions before clear. This resulted in attempting to create a cubemap with rectangular sides, which is logically and physically impossible. (also it just fails)
2024-02-22 19:15:20 -05:00
Mary
2f1f7a3c4e Salieri: shader cache (#1701)
Here come Salieri, my implementation of a disk shader cache!

"I'm sure you know why I named it that."
"It doesn't really mean anything."

This implementation collects shaders at runtime and cache them to be later compiled when starting a game.
2024-02-22 19:15:19 -05:00
riperiperi
cdbb624d6e Update performance mode when docked mode changes. (#1696) 2024-02-22 19:15:19 -05:00
gdkchan
42a3d5bc24 Do not report unmapped pages as dirty (#1672)
* Do not report unmapped pages as dirty

* Make tests pass again

* PR feedback
2024-02-22 19:15:19 -05:00
riperiperi
b5329b93c9 Size hints for copy regions and viewport dimensions to avoid data loss (#1686)
* Size hints for copy regions and viewport dimensions to avoid data loss

* Reword comment.

* Use info for the rule rather than calculating aligned size.

* Reorder min/max, remove spaces
2024-02-22 19:15:19 -05:00
gdkchan
af62d3260b Implement ATOM shader instruction (#1687)
* Implement ATOM shader instruction

* Fix reduction type decoding
2024-02-22 19:15:19 -05:00
gdkchan
55cfb97c13 Simplify logic for bindless texture handling (#1667)
* Simplify logic for bindless texture handling

* Nits
2024-02-22 19:15:19 -05:00
Ac_K
ef64b7ad1f apm/am: Refactoring/Unstub services (#1662)
* apm: Refactoring/Unstub service

This PR implement some IPC calls of apm service:
- nn::apm::IManager is fully implemented.
- nn::apm::ISession is fully implemented (close #1633).
- nn::apm::ISystemManager is partially implemented.

nn::appletAE::ICommonStateGetter have some calls which are just a layer of apm IPC calls. What we did in some calls was wrong, it's fixed now!

Everything is checked with RE.

* abstract Apm *Server as Thog requested

* abstract ISession and fix other classes

* Address gdkchan feedback

* Fix class

* Fix Logging
2024-02-22 19:15:19 -05:00
gdkchan
6254881097 Use explicit buffer and texture bindings on shaders (#1666)
* Use explicit buffer and texture bindings on shaders

* More XML docs and other nits
2024-02-22 19:15:19 -05:00
riperiperi
d4f14b456c Synchronize Rasterizer State before Clear (#1680) 2024-02-22 19:15:19 -05:00
riperiperi
42539db295 Only report that GPU commands are available when the queue is not empty. (#1656)
* Only report that commands are available when the queue is not empty.

* Address Feedback

Co-authored-by: FICTURE7 <FICTURE7@gmail.com>

Co-authored-by: FICTURE7 <FICTURE7@gmail.com>
2024-02-22 19:15:19 -05:00
EmulationFanatic
4287751989 Update game compatibility list info in README.md (#1675)
* Update game compatibility list info in README.md

* clarity on playable games
2024-02-22 19:15:19 -05:00
Ac_K
247c677f26 Loaders: Log extra NSO informations (#1661)
NSO files can contains useful informations who aren't currently logged.
This PR fix that by logging Module name, Libraries and SDK Version when they are available.
2024-02-22 19:15:19 -05:00
Mary
f720d8a90b updater: Ignore first commandline argument when passing commandline to updated binary (#1674)
Fix a regression caused by #1643.
2024-02-22 19:15:19 -05:00
gdkchan
eb86433ffb Support single precision contants for double precision operations (#1673) 2024-02-22 19:15:19 -05:00
riperiperi
91ca9aa34c Do not align sizes for buffer texture targets. (#1671)
This should fix a random crash in Hyrule Warriors, and potentially other games that use buffer textures.
2024-02-22 19:15:19 -05:00
gdkchan
02f2f03bc3 Correct BPP of buffer to texture copies (#1670) 2024-02-22 19:15:19 -05:00
gdkchan
1097d33518 Separate zeta from color formats (#1647) 2024-02-22 19:15:19 -05:00
FICTURE7
91f543a8f9 Fix LiveInterval.Split (#1660)
Before when splitting intervals, the end of the range would be included
in the split check, this can produce empty ranges in the child split.

This in turn can affect spilling decisions since the child split will
have a different start position and this empty range will get a register
and move to the active set for a brief moment.

For example:

  A = [153, 172[; [1899, 1916[; [1991, 2010[; [2397, 2414[; ...

  Split(A, 1916)

  A0 = [153, 172[; [1899, 1916[
  A1 = [1916, 1916[; [1991, 2010[; [2397, 2414[; ...
2024-02-22 19:15:19 -05:00
riperiperi
8f749f510e Add seamless cubemap flag in sampler parameters. (#1658)
* Add seamless cubemap flag in sampler parameters.

* Check for the extension
2024-02-22 19:15:18 -05:00
riperiperi
913d1ffbe0 Support res scale on images, correctly blacklist for SUST, move logic out of backend. (#1657)
* Support res scale on images, correctly blacklist for SUST, move logic
out of backend.

* Fix Typo
2024-02-22 19:15:18 -05:00
gdkchan
be5a83540d Support 3D BC4 and BC5 compressed textures (#1655)
* Support 3D BC4 and BC5 compressed textures

* PR feedback

* Fix some typos
2024-02-22 19:15:18 -05:00
gdkchan
8e59c5c1bb Fix compressed to non-compressed texture copy size (#1649) 2024-02-22 19:15:18 -05:00
gdkchan
2ebf0ad310 Remove unused texture and sampler pool invalidation code (#1648) 2024-02-22 19:15:18 -05:00
CeruleanSky
08ad8372fc Preserve command line arguments when updater restarts Ryujinx (#1643)
Command line arguements are not preserved by the updater, and this causes an issue when the updater restarts Ryujinx in portable mode as it will create/use/modify its default directory instead.

This simple pull addresses the first part of #1594 

As far as the second part of the issue, where the updater perhaps overzealously deletes everything but log files and folders, which causes problems in portable installs with a user subfolder or something else inside the Ryujinx folder. 

Perhaps an UpdateList.txt containing a list of files that the updater deletes is included in the ryujinx.zip/tar.gz/etc and placed in the upacked directory for the updater to use upon the next upgrade.

The build system can run something like `forfiles /s /m *.txt /c "cmd /c echo @relpath"` or the correct command for the OS and include it in the distribution, or it could be generated by the updater itself.
2024-02-22 19:15:18 -05:00
gdkchan
0905ce132d Scale texture resolution before sending to backend (#1646)
* Work

* Propagate scale factor to copy temp. Not really needed, just here for consistency

* PR feedback
2024-02-22 19:15:18 -05:00
riperiperi
a1814ee43c Add scaling for Texture2DArray when using TexelFetch. (#1645)
* Add scaling for Texture2DArray when using TexelFetch.

* Should only really trigger for Texture2D. (do not emit texelfetch for
TextureBufferArray(?) and Texture1DArray)

* Address nit.
2024-02-22 19:15:18 -05:00
gdkchan
725ae83560 Avoid sampler conflicts on bindless samplers with the same name (#1642) 2024-02-22 19:15:18 -05:00
emmauss
8f3d1dfb92 Motion Fixes (#1589)
* fix stalling when server is offline

* add retry timer to fail server connections, fix alt slot number

* fix alt slot key issue

* fix crash when saving controller config with empty fields

* code fixes

* add index check in motion hid update, made HandleResponse async

Co-authored-by: Emmanuel <nhv3@localhost.localdomain>
2024-02-22 19:15:18 -05:00
gdkchan
f74c05fa0f Fix vertex buffer handle null check (#1638) 2024-02-22 19:15:18 -05:00
gdkchan
04f60adaf2 Fix transform feedback errors caused by host pause/resume and multiple uses (#1634)
* Fix transform feedback errors caused by host pause/resume

* Fix TFB being used as something else issue with copies

* This is supposed to be StreamCopy
2024-02-22 19:15:18 -05:00
gdkchan
89e98e8c9c Improve the speed of redundant ASTC texture data updates (#1636) 2024-02-22 19:15:18 -05:00
gdkchan
109c253f6e Implement CAL and RET shader instructions (#1618)
* Add support for CAL and RET shader instructions

* Remove unused stuff

* Fix a bug that could cause the wrong values to be passed to a function

* Avoid repopulating function id dictionary every time

* PR feedback

* Fix vertex shader A/B merge
2024-02-22 19:15:18 -05:00
gdkchan
1aab3f1218 Fix shader image load/store array index register (#1637)
* Fix shader image load/store array index register

* Y should come before the array index
2024-02-22 19:15:18 -05:00
gdkchan
8a1ec56496 Get rid of Reflection.Emit dependency on CPU and Shader projects (#1626)
* Get rid of Reflection.Emit dependency on CPU and Shader projects

* Remove useless private sets

* Missed those due to the alignment
2024-02-22 19:15:18 -05:00