Commit graph

16000 commits

Author SHA1 Message Date
ReinUsesLisp 4f5bbe56ba vk_query_cache: Hack counter destructor to avoid reserving queries
This is a hack to destroy all HostCounter instances before the base
class destructor is called. The query cache should be redesigned to have
a proper ownership model instead of using shared pointers.

For now, destroy the host counter hierarchy from the derived class
destructor.
2020-09-19 01:47:29 -03:00
ReinUsesLisp 58b0ae84b5 renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore
This reworks how host<->device synchronization works on the Vulkan
backend. Instead of "protecting" resources with a fence and signalling
these as free when the fence is known to be signalled by the host GPU,
use timeline semaphores.

Vulkan timeline semaphores allow use to work on a subset of D3D12
fences. As far as we are concerned, timeline semaphores are a value set
by the host or the device that can be waited by either of them.

Taking advantange of this, we can have a monolithically increasing
atomic value for each submission to the graphics queue. Instead of
protecting resources with a fence, we simply store the current logical
tick (the atomic value stored in CPU memory). When we want to know if a
resource is free, it can be compared to the current GPU tick.

This greatly simplifies resource management code and the free status of
resources should have less false negatives.

To workaround bugs in validation layers, when these are attached there's
a thread waiting for timeline semaphores.
2020-09-19 01:46:37 -03:00
bunnei 1eae35621e
Merge pull request #4663 from ReinUsesLisp/wswitch
video_core: Enforce -Werror=switch
2020-09-16 20:43:23 -07:00
Rodrigo Locatti 62de0220fe
Merge pull request #4662 from lioncash/factory
bis_factory/romfs_factory: Eliminate dependencies on the global system instance
2020-09-16 23:43:30 +00:00
Lioncash a62c1999c5 file_sys/romfs_factory: Eliminate usage of the global system accessor 2020-09-16 19:15:19 -04:00
Lioncash 0e80567bef file_sys/bis_factory: Eliminate usage of the global system accessor 2020-09-16 18:16:04 -04:00
Lioncash aa8d6fc041 loader/nso: Remove unnecessary [[maybe_unused]] 2020-09-16 18:09:01 -04:00
Rodrigo Locatti b0ae8265ea
Merge pull request #4661 from lioncash/system-loader
core/loader: Remove dependencies on the global system instance
2020-09-16 20:59:44 +00:00
ReinUsesLisp eb914b6c50 video_core: Enforce -Werror=switch
This forces us to fix all -Wswitch warnings in video_core.
2020-09-16 17:48:01 -03:00
Lioncash 113a3972a6 core/loader: Remove dependencies on the global system instance
Now all that remains is:

18 instances in file_sys code
14 instances in GDB stub code (this can be tossed wholesale)
4 instances in HLE code
2 instances in settings code.
2020-09-16 08:46:59 -04:00
Rodrigo Locatti 004bfefeb5
Merge pull request #4658 from lioncash/copy3
nca_patch: Reduce stack usage size within SearchBucketEntry()
2020-09-16 00:25:11 +00:00
Rodrigo Locatti 9cd1ea338b
Merge pull request #4657 from lioncash/cheatparser
cheat_engine: Remove unnecessary system argument to CheatParser's Parse function
2020-09-16 00:24:14 +00:00
Lioncash 66fc037ef2 nca_patch: Significantly reduce the stack usage size within SearchBucketEntry()
Previously this function was using ~16KB of stack (16528 bytes), which
was caused by the function arguments being taken by value rather than by
reference.

We can make this significantly lighter on the stack by taking them by
reference.
2020-09-15 09:10:58 -04:00
Lioncash 99b372a6c5 nca_patch: Make SearchBucketEntry() internally linked
This is only used internally and doesn't depend on any class state, so
we can make it fully internal.
2020-09-15 09:06:46 -04:00
Lioncash 3a8464cde2 cheat_engine: Convert ExtractName into a non-template function
We don't need to create two separate instantiations of the same code, we
can simply make the character template argument a regular function
parameter.
2020-09-15 03:24:44 -04:00
Lioncash ba7eb5abf4 cheat_engine: Remove unnecessary system argument to CheatParser's Parse function
This isn't used within the function at all in any implementations, so we
can remove it entirely.
2020-09-15 03:20:40 -04:00
Rodrigo Locatti b5f4221c3d
Merge pull request #4655 from lioncash/internal2
patch_manager: Minor cleanup
2020-09-15 01:57:13 +00:00
Lioncash 33e4a0b6c1 patch_manager: Resolve implicit truncations in FormatTitleVersion()
We make it explicit that we're truncating arithmetic here to resolve
compiler warnings (even if the sizes weren't u32/u64 arithmetic
generally promotes to int :<)
2020-09-14 19:19:59 -04:00
Lioncash a4392c24cf patch_manager: Make use of type aliases
We can use these to avoid typing the same type redundantly. This way, if
these ever change, only a single location needs to be modified.
2020-09-14 19:17:50 -04:00
Lioncash 637ab14ae6 patch_manager: Make a few functions internally linked
These functions are only used within this translation unit, so we can
make them internally linked.
2020-09-14 19:04:51 -04:00
Rodrigo Locatti 0bac7b6a95
Merge pull request #4652 from lioncash/crypto
crypto/key_manager: Remove dependency on the global system accessor
2020-09-14 22:27:33 +00:00
Lioncash e0dd440b1f crypto/key_manager: Remove dependency on the global system accessor
We can supply the content provider as an argument instead of hardcoding
a global accessor in the implementation.
2020-09-14 16:49:59 -04:00
Rodrigo Locatti 1a9774f824
Merge pull request #4651 from lioncash/kernel-global
kernel: Remove all dependencies on the global system instance
2020-09-14 20:39:05 +00:00
Lioncash ec2a6e5ba8 kernel: Remove all dependencies on the global system instance
With this, the kernel finally doesn't depend directly on the global
system instance anymore.
2020-09-14 14:03:13 -04:00
bunnei 042567e4b2
Merge pull request #4636 from lioncash/kernel-hle
service: Remove two usages of the global system accessor
2020-09-14 09:17:10 -07:00
bunnei 5fc6bf96d8
Merge pull request #4323 from ReinUsesLisp/no-spin
kernel/scheduler: Use std::mutex instead of spin lock
2020-09-11 23:23:53 -07:00
bunnei 508f2072a9
Merge pull request #4645 from v1993/lgtm-less-packages
Remove bad and useless packages from LGTM build
2020-09-11 22:10:27 -07:00
bunnei f4400f3ba2
Merge pull request #4638 from Morph1984/qt-5.12.8
cmake: Update to Qt 5.12.8
2020-09-11 15:19:29 -07:00
bunnei ec634b6a88
Merge pull request #4634 from lioncash/blocking
bsd: Resolve a few warnings
2020-09-11 15:17:34 -07:00
bunnei 324029d4f9
Merge pull request #4310 from ogniK5377/apollo-1-prod
audio_core: Apollo Part 1, AudioRenderer refactor
2020-09-11 10:57:27 -04:00
Valeri 9f6892271f
Remove bad and useless packages from LGTM build
It still fails due to CMake version being 3.13.4, but at
least we are not ones to blame now.
2020-09-11 17:32:22 +03:00
bunnei 03179ecafe
Merge pull request #4597 from Morph1984/mjolnir-p2
Project Mjölnir: Part 2 - Controller Applet
2020-09-10 19:28:23 -04:00
bunnei 41b8ecdeb6
Merge pull request #4608 from lioncash/sign3
configure_input_player: Resolve sign conversion warnings in UpdateMappingWithDefaults()
2020-09-10 13:56:16 -04:00
Rodrigo Locatti 663ea382da
Merge pull request #4633 from ReinUsesLisp/gpu-init
video_core: Remove all Core::System references in renderer
2020-09-10 02:28:54 +00:00
bunnei d90961122c
Merge pull request #4635 from lioncash/gc-adap
gc_adapter: Make DeviceConnected() a const member function
2020-09-09 22:27:49 -04:00
Morph 09126f3a4a cmake: Update to Qt 5.12.8 2020-09-09 08:50:39 -04:00
Lioncash ffdf8c0cb3 service: Remove two usages of the global system accessor
Removes more instances of reliance on global state.
2020-09-07 03:18:45 -04:00
Lioncash c715fc4c5e gc_adapter: Make DeviceConnected() a const member function
This doesn't modify instance state, so it can be made const.
2020-09-07 02:49:13 -04:00
Lioncash 40968e3993 bsd: Resolve unused value within SendToImpl
Previously the address provided to SendToImpl would never be propagated
to SendTo(). This fixes that.
2020-09-07 01:06:30 -04:00
Lioncash cd643ab5c9 bsd: Resolve sign comparison warnings 2020-09-07 01:06:27 -04:00
Lioncash 180fa6859f sockets_translate: Make use of designated initializers
Same behavior, less typing.
2020-09-07 00:53:10 -04:00
Lioncash 188a3cf74c blocking_worker: Make use of templated lambda
We can simplify this a little by explicitly specifying the typename for
the lambda function.
2020-09-07 00:47:46 -04:00
Lioncash 9652973db2 blocking_worker: Resolve -Wdocumentation warning 2020-09-07 00:45:53 -04:00
bunnei 841b295ad0
Merge pull request #4606 from lioncash/constexpr
game_list_p: Mark some constants as constexpr
2020-09-06 23:19:38 -04:00
ReinUsesLisp 9e87193725 video_core: Remove all Core::System references in renderer
Now that the GPU is initialized when video backends are initialized,
it's no longer needed to query components once the game is running: it
can be done when yuzu is booting.

This allows us to pass components between constructors and in the
process remove all Core::System references in the video backend.
2020-09-06 05:28:48 -03:00
bunnei e126021ffe
Merge pull request #4397 from ReinUsesLisp/bsd
services: Implement most of bsd:s and GetCurrentIpAddress from nifm
2020-09-05 22:40:59 -04:00
LC 80a56e8893
Merge pull request #4629 from Morph1984/mergesinglejoyasdualjoy-impl
hid: Implement MergeSingleJoyasDualJoy
2020-09-04 21:31:30 -04:00
Morph 0e33b19ae0 hid: Implement MergeSingleJoyasDualJoy
- Used in multiple games such as Super Mario Odyssey.
2020-09-04 15:38:33 -04:00
Morph 5043036688 Resolve spacing inconsistencies in style.qrc/qss files 2020-09-04 12:23:26 -04:00
Morph b65456b958 applets/controller: Resolve several compiler warnings
Resolves -Wsign-compare and -Wunused-variable
2020-09-04 12:23:26 -04:00