This pr aims to make a first step into giving Eden's Vulkan backend maintenance with better formatting, understanding and reduce the redundancy between some wrong implementations:
-> ProvokingVertex: Has been reworked completely, now the wiring to ExtendedDynamicState3 (ProvokingVertexMode) it works safe, the gating of the extension no longer requires user enabling on UI, it will be enabled automatically based on what features of the extension are available on driver, depending if first or last mode are available and also will be properly set under TrasformFeedback operations; this way we're gonna ensure all drivers, including Android stock drivers on QCOM, Mali and other mobile vendors drivers access correctly to the extension, fixing some graphical issues (flickering textures or wrong sccisors on vertex that required first mode) generated by the missing first mode handling or the proper clearing on pipeline state. This change will increase/ decrease slightly the performance on some games that changes dynamically between first and last modes, but will also ensure a clear path to GPU to use resources smartly, reducing VRAM consumption in PC and MEM/GPU percentage of use on Android (marginal to 5 - 8% approx).
-> Removal VK_EXT_multi_draw: It has passed some months since the first try to implement this feature, but wasn't completed so functionality was null to negative, taking space in source and using small CPU cicles for initialization during device creation that reduced CPU effectiveness by 2 - 5%, aside that, after reviewing the situation of formally introducing handling for multidraws to reduce the floods of constants draw calls into 1 per batch, seems to not pay the overhead when the multidraw capacity is less or equal to 1, aside that, for the time being batching multidraws will introduce indirections on each batch of command draws, that graphical issues will appear and reducing performance can happen, something it was gonna solve. For the time being it's discarded, but, may be analyzed the chance to introduce it properly in a later date.
-> Removal VK_EXT_indexing_descriptor: Currently the implementation of this feature was partial, with not proper handling on layouts; just the initial checks on device creation and chained up to the pNext feature, currently this extension will require a buffer cache and texture cache rework to set layouts and reduce the amount of use of descriptor into making it a less expensive cost effective, aside that to generate a path for the Bindless Texture and Bindless Buffer, allowing to track state of textures in runtime and ensuring the state of some compiled shaders doesn't change if it's no needed, among other benefits, besides that, enabling this feature was only generating innecessary checks on GPU, so consumption would be higher than it should be.
-> Removal of VK_EXT_swapchain_maintenance1: The use of this feature was really conditional to certain support on newer drivers and cards, which wasn't available for all platforms, I concluded that if the support for this instance wasn't really there, the cost effective between the try to initialize it and running it, won't be good as when it didn't exist on our Vulkan device, with also the constant factor of not being completely implemented, right now I'm aiming to reduce the complexity on Vulkan side to keep it as simple as it could for a future video_core rework, which may start somewhere these weeks.
-> Refined the Maintenance features: Meawhile this features are usually inherent to Vulkan core functionality, sometimes drivers doesn't expose them well, which leads to Eden run Vulkan without really noticing the existence of maintenance features on driver to improve stability, so we're tied to declare them and load them when a device creation starts by asking if driver supports and which, currently 1 - 5 are core maintenance features, meanwhile the 7 - 9 are more experimental and not being available everywhere, so right now to help drivers give attention to this features we not only load them, but also calculate with features bits which features inside Maintenance5 are available to use, that was the initial purpose, but we weren't using the full potential of the extension; I made cleaned part of the unneeded log code for the initialization of this Maintenance5 and it's feature flags, but also making an operation to sanitize depth/ stencil when One is not available in swizzle operations, making it easier to draw it; it's also needed to mention that Maintenance9 was removed from source code until we can have better handling on Arrays2D, aside that, the use of the extension was really conditional to certain drivers being capable of use it, so I remove it.
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3839
Co-authored-by: CamilleLaVey <camillelavey99@gmail.com>
Co-committed-by: CamilleLaVey <camillelavey99@gmail.com>
This pr content and goal is to provide following to Eden's user base issues with settings, adjust default values on settings and refactor some handlings to improve the plug-and-play factor:
-> Combo-box for ASTC Recompression Method Removed: The removal of this toggle was due to the redundant process inside Android devices, most drivers do suppot ASTC handling natively and meanwhile this option provided some benefits to some older Mali devices, the specifications from those and the real compatibility doesn't pay the need for this setting, unless something else is provided to be wrong, the default setting will be uncompressed and no longer available in UI to change. Removed some dead code along with it.
-> Removal of ASTC Decode Method ifdef block for Android: Since Yuzu's, the handling for this option was strangely set on CPU, having a specific block for Android in settings, possibly due to the constant spikes on GPU usage that wouldn't be good to load GPU with the whole flow of operations; but since then and until today, Eden's constant effort to make operations more accurate and smartly resolved, have marked the difference that now CPU default on Android no longer provides the benefit to relief GPU stress than reducing performance in some heavy draw commands on some games; the default will be set to GPU to keep parity with PC configuration aiming for a global configuration with all platforms. The setting will be kept to user range, unless is proved to no longer be needed, right now low end devices could still have benefit from CPU/Async, but requires testing from community to show real potential.
-> Adjusted default value of ExtendedDynamicState: Currently we're facing some issues of logic inside of ExtendedDynamicState implementation, that makes it a bit unstable when it comes to use the disabled mode, right now we jump to ExtendedDynamicState1 for more stability, meanwhile we fix the remaining issues in future updates (currently one fix will be presented - or would be merged along this pr, the 1st Global Vulkan Maintenance which has some fixes for this situation), so stock drivers and other mobile drivers will behave and benefit from this.
-> Exposed hidden and defaulted settings to user's UI: Yuzu implemented some settings that were available on PC's UI but weren't presented on Android's UI or wasn't something expected to do, either way there are some strange behaviors due to this default settings and each of them do something different, i'm not gonna dive into a deep explanation, but to make it short, they stablish asynchronous operations for GPU operations, like Async GPU Emulation (to use a CPU thread to boost performance with GPU emulation, currently a performance hack), Asynchronous Vulkan Presentation this does something a like to disperse draw's/ syncing from TimelineSemaphores and set a thread of CPU to help in running some Vulkan operations (another performance Hack), meanwhile most of the Desktop drivers are mostly nice with this setting, Nvidia aren't due to the nature of the hack, so provokes black screen or failing into initialize games. Mostly Asynchronous operations are fast-paths/ hacks to improve performance to the cost of some graphical issues like the pop-in with Asynchronous Shader Building during the shader compilations, sometimes the trade-off could give random crashes and other issues. Android it's not the exception and currently by disabling GPU Async Emulation user's will be able to fix some strange flickering on Zelda - Link's Awakening (NCE) and other games suffering from similar issues, may also fix random crashes on games that are supposed to work. These settings will be exposed for a short amount of time, meanwhile I receive feedback of the usefulness of having them active or the whole operation being used on Android, aside that, disabling them or one of them will inevitable reduce performance a bit, not so notorious, but it will be up to user's decision now to use them or not.
-> AMD FidelityFX's Super Resolution UI handling (a personal request): Now the slider default value will be 0% and will only appear whenever FSR is choosed among other window adapting filters, this will also work with the quick setting menu during runtime.
-> Fixed the issue of changing drivers removing all games compiled shader cache: Currently our implementation to safeguard users from unknown issues when a different driver tries to load/ read compiled shaders from another version of Turnip/ QCOM driver, that will delete shaders if the driver is removed or changed; deleted all games compiled shader cache, which increased the annoyance on Android users along with adding unneeded complexity, this used to happen whenever a driver was changed in global settings or per-game settings. Now no longer will happen if the driver is changed on global settings and changing drivers in per-game configuration will only delete current game where the driver was change without affecting others, from here, I'll apologize for this unneeded situation.
-> Refactored the input controller detection (another request of mine, hehehe...): This implementation will work to reduce the burden on a new installation (since I have to test everything personally, cuz testers are lazy ass mfs), the input detection is now more accurate to what kind of input a device has, whether is in-built or wireless gamepad, will map it once Eden detect's physical input by reading the controllers inputs that OS provides natively and set or disable touchscreen controllers automatically:
- If in-built is detected (Ayaneo, Ayn, Retroid or any Android handheld), Eden will map it automatically and will disable touchscreen controller.
- If Wireless gamepad is detected, the same behavior as described above will happen with the extra to recover touchscreen controller whenever the gamepad goes off.
It was quite funny to do this, cuz Xiaomi and some other manufacturers always do strange shenanigans with how the inputs are detected (wasn't funny).
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3832
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Co-authored-by: CamilleLaVey <camillelavey99@gmail.com>
Co-committed-by: CamilleLaVey <camillelavey99@gmail.com>
For some unknown reason, bundled OpenSSL likes the `https` scheme,
whereas system OpenSSL (on Gentoo at least) does not... even when the
bundled OpenSSL is built exactly like the Gentoo one, certificate and
all...
Signed-off-by: crueter <crueter@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3843
This is the version in Trixie and is thus far the oldest known version
that works. We know for a fact that Bookworm's doesn't work, so drop
that entirely.
Signed-off-by: crueter <crueter@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3830
Closes#3707
All this does is anchor the left and right-most cards to their
respective edges, and then equally distributes the gaps between cards
thereafter.
Don't even bother trying to figure out what the hell I just wrote. I'm a
UI designer, not a mathematician.
Signed-off-by: crueter <crueter@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3829
Some (Mali) drivers particularly are afraid to unroll loops with more than 7 constant iterations (?); hence manual unrolling is potentially beneficial due to avoiding extra branching + the uniform runtime expectations
Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3754
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Reviewed-by: crueter <crueter@eden-emu.dev>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
The non-immediate path in IsScaled was incorrectly using index_value as the source for OpBitFieldUExtract, instead of loading the corresponding word from the push constant bitmask.
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3789
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-by: crueter <crueter@eden-emu.dev>
Co-authored-by: MaranBr <maranbr@outlook.com>
Co-committed-by: MaranBr <maranbr@outlook.com>
httplib stuff done by @crueter on #3797
+ some extra stuff since the warning push/pop should be in header i fear :)
Signed-off-by: lizzie <lizzie@eden-emu.dev>
Co-authored-by: crueter <crueter@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3800
Reviewed-by: crueter <crueter@eden-emu.dev>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
PrepareImage() is on a very hot path and previously called SynchronizeAliases() unconditionally. For most images, aliased_images` is empty, so this created unnecessary overhead, now we only synchronize only when image requires it
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3740
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Co-authored-by: wildcard <wildcard@eden-emu.dev>
Co-committed-by: wildcard <wildcard@eden-emu.dev>
Required so that frontends can launch a game while there is already one running (for CocoonFE usage)
Fix for mounting external content was merged.
This patch also fixes multiple reasons for infinite game "Shutting down..." issue (hope all, who knows...)
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3755
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Co-authored-by: xbzk <xbzk@eden-emu.dev>
Co-committed-by: xbzk <xbzk@eden-emu.dev>
This fixes two problems:
1. After a crash, it was possible to launch a game before external content gets mounted. Now the button will wait for it to complete.
2. Directory initialization was init system before init globalconfig, so after a crash firmware was not being remounted
(have you ever noticed fw version = N/A in device overlay, after fiddling with applets?)
(this had been fixed in 3755, which was not thoroughly tested by cocoon dev)
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3803
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Co-authored-by: xbzk <xbzk@eden-emu.dev>
Co-committed-by: xbzk <xbzk@eden-emu.dev>
Implementations for SSE3 CPUs (prescott)
Instead of fixing some of the bugs with HostCall when paired with vectors, i'll simply remove as many host calls as I can within the most used vector instructions - then just minimize their usage to memory read/writes.
Emitting the raw assembly code is faster than doing a HostCall, HostCalls are VERY expensive. So this is the desired output anyways.
Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3301
Reviewed-by: crueter <crueter@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
Fix the bug reported by Pavel in which when per-game settings screen is rotated a reloadGames() call causes external content reference to be missing.
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3788
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Co-authored-by: xbzk <xbzk@eden-emu.dev>
Co-committed-by: xbzk <xbzk@eden-emu.dev>
crueter will love this one
mcl nuked off externals, i did however copy some important headers (notably intrusive list and bit.hpp); because grand part of dynarmic still uses them
but i made the appropriate adjustments anyways
solves mcl for #3373
depends on #3718
Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3777
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>