Commit graph

1504 commits

Author SHA1 Message Date
Ac_K 668720b088
logger: Add build version to the log file names (#1782) 2020-12-07 20:29:22 +11:00
riperiperi 24d316cc92
Extract texture Target from Info for quick access (#1774) 2020-12-03 20:34:27 +01:00
sharmander b479a43939
CPU: Implement VFNMS.F32/64 (#1758)
* Add necessary methods / op-code

* Enable Support for FMA Instruction Set

* Add Intrinsics / Assembly Opcodes for VFMSUB231XX.

* Add X86 Instructions for VFMSUB231XX

* Implement VFNMS

* Implement VFNMS Tests

* Add special cases for FMA instructions.

* Update PPTC Version

* Remove unused Op

* Move Check into Assert / Cleanup

* Rename and cleanup

* Whitespace

* Whitespace / Rename

* Re-sort

* Address final requests

* Implement VFMA.F64

* Simplify switch

* Simplify FMA Instructions into their own IntrinsicType.

* Remove whitespace

* Fix indentation

* Change tests for Vfnms -- disable inf / nan

* Move args up, not description ;)

* Undo vfma

* Completely remove vfms code.,

* Fix order of instruction in assembler
2020-12-03 20:20:02 +01:00
riperiperi c00d39b675
Dummy out gl queries with 0 draws, remove glFlush call (#1773) 2020-12-03 19:42:59 +01:00
riperiperi 2c39a4f15d
Cache delegate for QueryModified, use regular multi handle. (#1771) 2020-12-03 19:34:32 +01:00
Mary 0ab1c42eea
Make sure to not leak copy handles passed in request (#1772)
* Make sure to not leak copy handles passed in request

Following last gdkchan's PR this make sure to close copy handles that
are passed by guest when it should.

* fix comment copy pasta
2020-12-03 19:19:10 +01:00
gdkchan 1b053d2222
Close audio WorkBuffer transfer memory handle (#1770) 2020-12-02 21:58:20 +01:00
gdkchan f7617cae12
Create a single guest process per IPC message processor (#1769) 2020-12-02 13:14:44 +01:00
Mary bc11443621
amadeus: Fix a typo in TapFrame logic (#1767)
This fix a crash at boot in Pang Adventures
2020-12-02 00:46:26 +01:00
gdkchan cf6cd71488
IPC refactor part 2: Use ReplyAndReceive on HLE services and remove special handling from kernel (#1458)
* IPC refactor part 2: Use ReplyAndReceive on HLE services and remove special handling from kernel

* Fix for applet transfer memory + some nits

* Keep handles if possible to avoid server handle table exhaustion

* Fix IPC ZeroFill bug

* am: Correctly implement CreateManagedDisplayLayer and implement CreateManagedDisplaySeparableLayer

CreateManagedDisplaySeparableLayer is requires since 10.x+ when appletResourceUserId != 0

* Make it exit properly

* Make ServiceNotImplementedException show the full message again

* Allow yielding execution to avoid starving other threads

* Only wait if active

* Merge IVirtualMemoryManager and IAddressSpaceManager

* Fix Ro loading data from the wrong process

Co-authored-by: Thog <me@thog.eu>
2020-12-02 00:23:43 +01:00
riperiperi 461c24092a
Implement Force Early Z Register (#1755) 2020-12-02 00:13:27 +01:00
Xpl0itR e383c41b6e
Add a "Remove All" button to the DLC and Update windows (#1579) 2020-12-01 23:51:49 +01:00
Xpl0itR bd8d28c59d
Add option to start games in fullscreen mode (#1580)
* Add option to start games in fullscreen mode

* Add command line option

* Use pascal case on menu item
2020-12-01 23:02:27 +01:00
Mary f6d88558b1
salieri: Fix missing guest GPU accessor missing on hashes (#1759)
This adds the guest GPU accessor to hashes computation.
As this change all the hashes from the cache, I added some migration
logic.

This is required for #1755.
2020-12-01 22:48:31 +01:00
Ac_K 5e6dc37aed
common: Fix last warning in SystemInfo (#1757)
* common: Fix last warning in SystemInfo

* info to Info

* fix MacOSSystemInfo file name by delete the file

* MacOSSysteminfo to MacOSSystemInfo
2020-12-01 22:26:00 +01:00
Ac_K a04a1b663d
config: Fix MaxAnisotropy value parsing (#1764) 2020-12-01 21:44:04 +01:00
Ac_K 7b66cb0d90
audio: Cleanup Ryujinx.Audio and fix OpenAL issue (#1746)
* audio: Cleanup SoundIO and fix OpenAL issue

* fix tabs by spaces

* Fix extra spaces

* Fix SoundIO.cs

* Fix ContainsAudioOutBuffer
2020-11-27 20:55:00 +01:00
riperiperi 0108004691
Prefer truly perfect texture matches over fomat aliased ones (#1754) 2020-11-27 19:46:23 +01:00
riperiperi 88633f4bc2
Blacklist very textures with a very small width or height from scaling (#1753) 2020-11-27 19:23:30 +01:00
Mary 245f8a7eee
ui: Check last played datetime validity against current culture (#1730)
This is an issue happening when you change your datetime format on your
system and try to sort via last played datetime. DateTime.Parse use the
current thread culture and will not parse date correctly, effectively
causing a crash.

As such, I added a check when loading the game list that ensure that the
datetime is valid in current culture.

Fix #1727.
2020-11-27 19:05:36 +01:00
Ac_K b1877632cf
Remove some warnings and cleaning code (#1736) 2020-11-27 18:57:20 +01:00
Ac_K 632a84155b
pctl: Implement IsRestrictionEnabled and fix CheckFreeCommunicationPermission (#1747)
* pctl: Implement IsRestrictionEnabled and fix CheckFreeCommunicationPermission

* fix comment
2020-11-24 21:19:06 +01:00
Ac_K 44c1f16280
am: Fix GetSaveDataSize stub (#1748) 2020-11-24 20:45:23 +01:00
Ac_K fd0b9d1926
am: Cleaning and stub TryPopFromFriendInvitationStorageChannel (#1738) 2020-11-21 23:38:34 +01:00
Mary 9abdba5539
amadeus: Fix reverb 3d mono wrong delay line offset (#1742)
This fix reverb 3d mono rendering using -1 instead of 1 for delay line
offset.

I also did some clean up as this value is now used by all channel
variants.

Now Resident Evil 6 goes in-gane.
2020-11-21 22:52:52 +01:00
Mary 25b9cde8be
salieri: remove a wrong debug assert (#1740)
THis assert is wrong and useless now, remove it because it's annoying in
Debug.
2020-11-21 22:10:08 +01:00
Mary 92bcdcb369
amadeus: Fix possible underflow in delay time delay effect (#1739)
This fix an underflow in the setup of delay time in the delay effect.

THis fix a regression caused by Amadeus on Shovel Knight: Treasure
Trove.
2020-11-21 21:57:49 +01:00
Ac_K 3dc9bab91f
audin: fix wrong id ListAudioInsAuto call (#1737) 2020-11-21 21:43:36 +01:00
Ac_K 57c4e6ef21
audout: Implement and fix some calls (#1725)
* audout: Implement GetAudioOutBufferCount, GetAudioOutPlayedSampleCount and FlushAudioOutBuffers

This PR implement audout service calls:
- GetAudioOutBufferCount
- GetAudioOutPlayedSampleCount
- FlushAudioOutBuffers

The RE calls just give some hints about no extra checks.
Since we use a totally different implementation because of our backend, I can't do something better for now.

SetAudioOutVolume and GetAudioOutVolume are fixed too by set/get the volume of the current opened track, previous implementation was wrong.

This fix #1133, fix #1258 and fix #1519.

Thanks to @jduncanator for this help during the implementation and all his precious advices.

* Fix some debug leftovers

* Address jD feedback
2020-11-20 21:59:01 +01:00
riperiperi 9493cdfe55
Allow copy destination to have a different scale from source (#1711)
* Allow copy destination to have a different scale from source

Will result in more scaled copy destinations, but allows scaling in some games that copy textures to the output framebuffer.

* Support copying multiple levels/layers

Uses glFramebufferTextureLayer to copy multiple layers, copies levels individually (and scales the regions).

Remove CopyArrayScaled, since the backend copy handles it now.
2020-11-20 17:14:45 -03:00
riperiperi cf7044e37b
Perform Compressed<->Uncompressed copies using Pixel Buffer Objects (#1732)
* PBO single layer copy, part 1

Still needs ability to take and set width/height slices. (using pack paramaters)

* PBO Copies pt 2

* Some fixes and cleanup.

* Misc Cleanup

* Move handle into the TextureInfo interface.

This interface is shared between texture storages and views.

* Move unscaled copy to the TextureCopy class.

* Address feedback.
2020-11-20 13:30:59 -03:00
riperiperi 9852cb9c9e
Use backup when PTC compression is corrupt (#1704)
* Use backup when PTC compression is corrupt

* Apply suggestions from code review

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

Co-authored-by: LDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com>
2020-11-20 02:51:59 +01:00
Ac_K c2356a7653
olsc: Add service olsc:u and stub some calls (#1734) 2020-11-20 09:56:23 +11:00
Ac_K f8f23bf899
gui: Toggle Docked/Handheld mode and VSync by clicking status bar (#1726)
* gui: Toggle between docked/handheld mode by clicking status bar

This PR just add a way to toggle between the docked and the handheld mode by clicking the lable in the status bar.
Nothing more.

* Fix glade file formatting

* Add VSync toggle
2020-11-19 11:34:28 +11:00
Sera 41ab43151b
GLRenderer: Change between docked and handheld mode using a keybinding (#1685)
* GLRenderer: Change between docked and handheld mode using a keybinding

* nit
2020-11-19 00:15:44 +01:00
gdkchan 7f536b5a15
Do not perform layout conversion on buffer texture flushes (#1729) 2020-11-18 22:17:40 +01:00
LDj3SNuD 0679084f11
CPU (A64): Add FP16/FP32 fast paths (F16C Intrinsics) for Fcvt_S, Fcvtl_V & Fcvtn_V Instructions. Now HardwareCapabilities uses CpuId. (#1650)
* net5.0

* CPU (A64): Add FP16/FP32 fast paths (F16C Intrinsics) for Fcvt_S, Fcvtl_V & Fcvtn_V Instructions. Switch to .NET 5.0.

Nits.

Tests performed successfully in both debug and release mode (for all instructions involved).

* Address comment.

* Update appveyor.yml

* Revert "Update appveyor.yml"

This reverts commit 27cdd59e8b.

* Remove Assembler CpuId.

* Update appveyor.yml

* Address comment.
2020-11-18 19:35:54 +01:00
gdkchan eafee34fee
Improvements with new .NET 5 functions or bugfixes (#1714)
* Improvements with new .NET 5 functions or bugfixes

* This no longer needs to be unsafe
2020-11-18 19:28:40 +01:00
Ac_K 7c3b559830
loaders: Fix possible parsing errors of informations on some NSO (#1724)
This fix possible parsing errors of informations on some NSO where the "zero" field don't exist introduced by #1661 leading to crashes at start.

References:
https://github.com/Atmosphere-NX/Atmosphere/blob/master/stratosphere/creport/source/creport_modules.cpp#L202
https://github.com/Thog/oss-rtld/blob/master/source/main.cpp#L14
2020-11-18 19:04:42 +01:00
gdkchan 9435d62206
Simplify depth test state updates (#1695) 2020-11-17 23:20:17 +01:00
gdkchan 5189a807c4
Fix buffer to texture copy with remap enabled (#1721) 2020-11-17 19:06:02 -03:00
EmulationFanatic d636e3748d
Specify the X64 version of .NET 5, and change the build command to be the right one (#1719) 2020-11-17 22:55:32 +01:00
Mary 863edae328
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
2020-11-17 22:40:19 +01:00
Mary cc60ba9d22
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
2020-11-17 22:31:05 +01:00
Mary 383c039037
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
2020-11-17 22:20:17 +01:00
gdkchan 787e20937f
Propagate zeta format properly (#1716) 2020-11-16 09:37:16 +01:00
Ac_K fcc9cbf816
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:
2020-11-15 22:38:11 -03:00
Ac_K 313f8d2eb6
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
2020-11-15 22:30:20 +01:00
Mary 4bc4cacdd0
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.
2020-11-15 21:26:49 +01:00
EmulationFanatic d3147bab5a
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
2020-11-15 21:11:23 +01:00