Commit Graph

1878 Commits

Author SHA1 Message Date
lynxnb
485bd2031c Only hide validation_layer setting on release instead of debug category 2023-02-27 19:56:53 +01:00
lynxnb
b2228a93da Reorder settings pt.2 2023-02-27 19:56:53 +01:00
lynxnb
ddfa9013a9 Use a proper tag for AppItem in intent extras and arguments 2023-02-27 19:56:53 +01:00
lynxnb
2f4778247c Use per-game settings during emulation 2023-02-27 19:56:53 +01:00
lynxnb
1a11aaa651 Add per-game settings configuration functionality 2023-02-27 19:56:53 +01:00
lynxnb
0467614dc0 Add per-game support to EmulationSettings
Implements support for retrieving per-game emulation settings
2023-02-27 19:56:53 +01:00
lynxnb
cd426d9f18 Split PreferenceSettings into AppSettings and EmulationSettings
`PreferenceSettings` was removed in favor of:
* `AppSettings`: stores general purpose settings mostly used for UI configuration and state
* `EmulationSettings`: stores emulation-related settings, most of these are passed to native emulation code
2023-02-27 19:56:53 +01:00
lynxnb
854ea1a42d Make NativeSettings a serializable data class 2023-02-27 19:56:53 +01:00
lynxnb
ee98aaaed1 Add a method to return format in AppItem 2023-02-27 19:56:53 +01:00
lynxnb
d1fd44e32e Move preference fragment to a separate file for modularity 2023-02-27 19:56:53 +01:00
lynxnb
a683978e8c Split preferences to multiple files for reusability 2023-02-27 19:56:53 +01:00
lynxnb
e7c176a8e5 Reorder preferences and introduce new categories 2023-02-27 19:56:53 +01:00
lynxnb
a1ca84f95e Move Kotlin settings to a dedicate package 2023-02-27 19:56:53 +01:00
lynxnb
180d1efd4d Revert "Toggle DisableFrameThrottling setting by clicking on FPS"
This commit reverts PR #2037. Passing `NativeSettings` to emulation code through a member reference, instead of a local variable, caused unpredictable crashes when using custom GPU drivers (v615+) on some Qualcomm SoCs.
The exact cause of the issue remains unknown, my best guess is that it was caused by an incorrect optimization performed on the Kotlin bytecode in release mode, which caused an issue when reading memory that had been forked, because of running emulation in a separate process.
Runtime settings modification will be reimplemented in the future via an alternative method.
2023-02-27 19:00:52 +01:00
PixelyIon
22f8cc5970 Stub indirect layer VI service functions
Indirect layers are used by the game to render layer on its own, the game allocates a buffer with the size from `GetIndirectLayerImageRequiredMemoryInfo` and uses `GetIndirectLayerImageMap` to draw the applet contents into the buffer. 

As we don't LLE applet implementations nor do our HLE implementations draw equivalent applets, we cannot submit this to the guest. As a result, these functions are stubbed with the framebuffer being cleared to red. 

Stubbing these functions allows titles such as Dark Souls to not crash while initializing indirect layers.
2023-02-22 23:23:08 +05:30
lynxnb
dba191d2dc Fix deadlock on settings in PresentationEngine after callback
Accessing the settings class during the execution of the `OnChangedCallback` results in a deadlock, as accesses to values are protected by a mutex. Instead, we now keep a local copy of the relevant settings and update those with the new value.
2023-02-20 21:45:30 +00:00
lynxnb
fc9b34846c Fix KtSettings JNI usage
* Use a global ref for NativeSettings JNI instance
* Always use the JNI env from the JNI call to ensure it's safe to use in the current thread
2023-02-20 21:45:30 +00:00
lynxnb
5b0a397165 Update native settings after toggling frame throttling 2023-02-20 21:45:30 +00:00
Matesic Darko
f850271e2d toggle DisableFrameThrottling setting by clicking on FPS display
s/jSurface/vkSurface
2023-02-20 21:45:30 +00:00
TheASVigilante
3168e8efc0 Address review 2023-02-20 18:17:35 +00:00
TheASVigilante
b780e2b755 Deallocate Unmapped memory pages
Reduces memory usage buildup over time, may affect performance.
2023-02-20 18:17:35 +00:00
Billy Laws
7296f8503d Enable always attempt to enable robustness 2023-02-20 18:01:49 +00:00
Billy Laws
d45f9e4d26 Loosen some texture WaR sync when possible
By keeping track of the stages reading the image we can do more fine-grained WaR prevention, as opposed to waiting for all commands to complete.
2023-02-20 18:01:49 +00:00
Billy Laws
6ee8a919e5 Use pipeline barriers, as opposed to an ext dependency for RP barrier
Allows for waiting on compute shaders, which are not a graphics stage.
2023-02-20 18:01:49 +00:00
Billy Laws
ee68facc5d Apply RP barrier masks for every draw, rather than the 1st in RP
I missed that addSubpass was only called once-per-subpass, meaning that if a new barrier req was discovered several draws into the RP it wouldn't be applied. Split out barriers into a seperate function to avoid this.
2023-02-20 18:01:49 +00:00
Billy Laws
bb20b145a8 Hash subpass dependencies in RP cache 2023-02-20 18:01:49 +00:00
Billy Laws
99bf7dbb36 Implement usage based implicit renderpass barrier generation
Full pipeline barriers between every RP can be extremely expensive on HW, by analysing the inputs and outputs of a draw it's possible to construct a much more optimal barrier that only syncs what is neccessary.
2023-02-20 18:01:49 +00:00
Billy Laws
7a759326b3 Don't break RPs on view pointer changes
Sometimes view pointers may change despite the underlying Vulkan image view not actually changing, so use vk::ImageViews for tracking to keep RP breaks to a minimum.
2023-02-20 18:01:49 +00:00
Billy Laws
a02e1a2536 R.I.P. Subpasses 2023-02-20 18:01:49 +00:00
Billy Laws
a47f010653 Add an option to allow CPU writes when fast readback is used 2023-02-20 18:01:49 +00:00
Billy Laws
2d56ed053d Implement all remaining ASTC formats 2023-02-20 18:01:49 +00:00
Billy Laws
d93c96de83 Fix sign error when decoding bc5s images
Using an unsigned loop counter caused an implicit conversion breaking the decoder logic.
2023-02-20 18:01:49 +00:00
Billy Laws
2d97b9fc2c Keep track of buffer dirtiness within an execution 2023-02-20 18:01:49 +00:00
Billy Laws
6ea1483c9a Fix a race with multiple threads pushing data into circular queue
If the 'end' changes when waiting for data to be consumed our 'waitNext' would be invalid leading to a deadlock.
2023-02-20 18:01:49 +00:00
Billy Laws
f55b135243 Assert on geometry stream usage 2023-02-20 18:01:49 +00:00
Billy Laws
2e64199640 Add host shader replacement and dumping support
This is useful for debugging, but shouldn't generally be used as bindings in SPIR-V etc are unstable.
2023-02-20 18:01:49 +00:00
Billy Laws
02786839a5 Flush pipeline after texture uploads 2023-02-20 18:01:49 +00:00
Billy Laws
ffdd50bdf3 Fix geometry and compute shaders on mali GPUs 2023-02-20 18:01:49 +00:00
mk73ds
cb62e15748 Ignore new layer creations instead of replacing previous ones while waiting for proper multiple layers support. 2023-02-18 12:06:37 +00:00
Erwin Spitaler
2855d12f31 quick and dirty implementation for GetFreeSpaceSize 2023-02-18 12:06:18 +00:00
Abandoned Cart
b20c6e9fc4 onBackPressed -> onBackPressedDispatcher 2023-02-16 14:50:02 +01:00
MrPurple666
bc3c49bc28 Add TIC format: 0x58D24946
Cult of the Lamb must be in-game and should fix some textures in Bayonetta 3

Co-authored-by: neogan-bot <neogan-bot@users.noreply.github.com>
2023-02-13 12:10:29 +00:00
PixelyIon
3407f5a6d1 Fix Depth RT layer stride
The layer stride provided by the depth register in Maxwell3D needs to be shifted by 2, this caused the stride to be 1/4th of what it needed to be resulting in OOB access.
2023-02-13 12:02:29 +00:00
PixelyIon
df3b961d5d Fix mipmapped GOB dimensions calculation
When calculating mip-level dimensions in terms of GOBs, they need to be divided by 2 while rounding upwards rather than downwards. This fixes corrupted textures and OOB access on lower mip levels across a substantial amount of titles, reducing arbitrary crashes as a result.
2023-02-13 12:02:29 +00:00
lynxnb
c9b055d0e3 Build reldebug instead of debug in CI 2023-02-12 22:21:25 +01:00
Niccolò Betto
439c18d8eb Fix ccache not working in CI
The default `compiler_check` strategy used by ccache was causing a 0% hit rate, as it was using the compiler's "modified time" as part of the hash. Since the script installs dependencies from scratch for every run, mtime was always different, causing different hashes even when source files were unchanged. To avoid this, use the NDK version as part of the hash instead.
2023-02-12 22:09:11 +01:00
lynxnb
9a96ea84ba Trigger an edge patch update on modified edge PRs 2023-02-12 03:22:00 +01:00
lynxnb
e9907d2fac Trigger an edge patch update on edge label added/removed 2023-02-09 23:49:20 +01:00
Billy Laws
bff232f326 Update edge names 2023-02-07 16:52:33 +00:00
Billy Laws
754a9dfd77 Avoid storing guest shader hash in generated spirv
This accidentally broke VK spec and could harm driver caching.
2023-02-07 16:50:46 +00:00