Commit graph

1709 commits

Author SHA1 Message Date
Mai
103997ee56
Merge pull request #8383 from Morph1984/shadow-of-the-past
yuzu: Make variable shadowing a compile-time error
2022-06-14 21:08:58 -04:00
Liam
feaf010fa2 common/assert: rework ASSERT handling to avoid std::function usage 2022-06-13 20:09:32 -04:00
Liam
a29ddcee40 common/assert: add unlikely 2022-06-13 20:09:32 -04:00
Liam
58fea44eb5 common: Don't test ASSERT conditions inline 2022-06-13 20:09:00 -04:00
Liam
084d7d6b01 common: Change semantics of UNREACHABLE to unconditionally crash 2022-06-13 20:09:00 -04:00
Morph
c1bd602e4c common: Eliminate variable shadowing
GCC/Clang treats variables within lambdas as potentially shadowing those outside the lambda, despite them not being captured inside the lambda's capture list.
2022-06-13 18:19:22 -04:00
bunnei
5282efac1b
Merge pull request #8413 from behunin/bounded-queue
gpu_thread: Move to bounded queue
2022-06-11 00:07:18 -07:00
bunnei
ae83d5c6d3
Merge pull request #8393 from lat9nq/default-vulkan
general: Set renderer_backend's default to Vulkan
2022-06-11 00:06:59 -07:00
Liam
3c313a43fd common: consolidate ELF structure definitions 2022-06-05 09:42:05 -04:00
Levi Behunin
4dd6bcd206 gpu_thread: Move to bounded queue 2022-06-02 19:37:46 -06:00
Liam
fb4b3c127f core/debugger: Implement new GDB stub debugger 2022-06-01 00:01:25 -04:00
lat9nq
5799fa4d7d settings: Set Vulkan to the default renderer backend 2022-05-29 21:38:36 -04:00
bunnei
d879741ec6
Merge pull request #8374 from german77/asnycvibrations
input_common: Make vibration request async
2022-05-28 00:55:53 -07:00
lat9nq
0e5a6676c3 path_util: Resolve -Wpointer-bool-conversion warning
Clang (rightfully) warns that we are checking for the existence of
pointer to something just allocated on the stack, which is always true.

Instead, check whether GetModuleFileNameW failed.

Co-authored-by: Mai M <mathew1800@gmail.com>
2022-05-26 19:01:26 -04:00
Narr the Reg
bf948b5790 input_common: Make vibration request async 2022-05-23 12:25:02 -05:00
lat9nq
ffd3afcf2f string_util: Add U16StringFromBuffer
Qt's QString::toStdU16String doesn't work when compiling against the
latest libstdc++, at least when using Clang. This function effectively
does the same thing as the aforementioned one.
2022-05-15 18:06:33 -04:00
Fernando Sahmkow
5562ae9cc5 VideoCore: Add option to dump the macros.
Co-Authored-By: liamwhite <liamwhite@users.noreply.github.com>
2022-05-08 21:37:34 -04:00
Mai M
ca28b447ac
Merge pull request #8280 from Tachi107/spdx-fixup
chore: add missing SPDX tags
2022-04-28 23:28:42 -04:00
Liam
709d7fd92c GCC 12 fixes 2022-04-28 16:50:34 -04:00
Andrea Pappacoda
01cf05bc75
chore: add missing SPDX tags
Follow-up to 99ceb03a1c
2022-04-28 18:24:11 +02:00
Morph
99ceb03a1c general: Convert source file copyright comments over to SPDX
This formats all copyright comments according to SPDX formatting guidelines.
Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
2022-04-23 05:55:32 -04:00
german77
d2f9412cf1 yuzu: Add custom ringcon configuration 2022-04-16 00:49:26 -05:00
bunnei
8deaac8bd1 hle: kernel: Use std::mutex instead of spin locks for most kernel locking. 2022-04-11 21:13:40 -07:00
Merry
c589db6add common: Replace lock_guard with scoped_lock 2022-04-07 19:30:55 +01:00
Fernando S
a02fd4cddd
Merge pull request #8143 from merryhime/rdtsc
native_clock: Use lfence with rdtsc
2022-04-07 16:17:45 +02:00
Liam
0cfcee95c7 service: jit: stub JIT service 2022-04-06 20:07:01 -04:00
bunnei
f114436120
Merge pull request #8089 from merryhime/paranoia
configuration: Add Paranoid CPU accuracy level
2022-04-04 11:07:38 -07:00
Merry
4052bfb4ad native_clock: Internal linkage for FencedRDTSC
__forceinline required on MSVC for function to be inlined
2022-04-03 22:38:12 +01:00
merry
fdd4d019ef native_clock: Use lfence with rdtsc 2022-04-03 22:38:10 +01:00
merry
979e53b87b native_clock: Use writeback from CAS to avoid double-loading 2022-04-02 22:22:48 +01:00
merry
084bd225dc atomic_ops: Implement AtomicCompareAndSwap with writeback 2022-04-02 22:22:48 +01:00
Merry
c562c1d6be native_clock: Use AtomicLoad128 2022-04-02 20:55:36 +01:00
Merry
b4746529e1 atomic_ops: Implement AtomicLoad128 2022-04-02 20:55:36 +01:00
merry
3c8547160d configuration: Add Paranoid CPU accuracy level
Disables most optimizations for the paranoid.
2022-03-26 08:46:25 +00:00
bunnei
4d9488033f hle: nvflinger: Merge Rect with Common::Rectangle. 2022-03-24 18:13:33 -07:00
bunnei
0704b645df common: logging: Add a logger for NVFlinger. 2022-03-24 18:13:32 -07:00
ameerj
866b7c20a8 general: Fix clang/gcc build errors 2022-03-20 02:25:09 -04:00
ameerj
923decae5a common: Reduce unused includes 2022-03-19 15:01:31 -04:00
ameerj
8a8ea65fae common: Reduce unused includes 2022-03-19 02:23:33 -04:00
bunnei
0fdf1d2a60 common: tree: Various updates. 2022-03-14 18:14:53 -07:00
bunnei
69c2faeb6a common: intrusive_red_black_tree: Various updates. 2022-03-14 18:14:53 -07:00
Wunkolo
d248c1203e cpu_detect: Add additional x86 flags and telemetry
Adds detection of additional CPU flags to cpu_detect and additions to telemetry output.

This is not exhaustive but guided by features that [dynarmic utilizes](bcfe377aaa/src/dynarmic/backend/x64/host_feature.h (L12-L33)) as well as features that are currently utilized but not reported to telemetry(invariant_tsc). This is intended to guide future optimizations.

AVX512 in particular is broken up into its individual subsets and some other processor features such as [sha](https://en.wikipedia.org/wiki/Intel_SHA_extensions) and [gfni](https://en.wikipedia.org/wiki/AVX-512#GFNI) are added to have some forward-facing data-points.

What used to be a single `CPU_Extension_x64_AVX512` telemetry field
is also broken up into individual `CPU_Extension_x64_AVX512{F,VL,CD,...}` fields.
2022-03-11 10:27:00 -08:00
Wunkolo
29a7a61806 common/telemetry: Update AddField name type to string_view
Non-owning `string_view` is flexable and
avoids some of the many redundant copies made over `std::string`
2022-03-11 10:26:59 -08:00
Merry
22f50c6bc1 backend: Ensure backend_thread is destructed before message_queue
Ensures that stop_token signals that stop has been requested before destruction of conditional_variable
2022-03-10 10:49:15 +00:00
Wunkolo
d9b1199ffb cpu_detect: Revert __cpuid{ex} array-type argument
Restores compatibility with MSVC's `__cpuid` intrinsic.
2022-03-09 19:50:01 -08:00
Wunkolo
873a9fa7e5 cpu_detect: Add missing lzcnt detection 2022-03-09 13:57:47 -08:00
Wunkolo
ec5f3351b6 cpu_detect: Refactor cpu/manufacturer identification
Set the zero-enum value to Unknown
Move the Manufacterer enum into the CPUCaps structure namespace
Add "ParseManufacturer" utility-function
Fix cpu/brand string buffer sizes(!)
2022-03-09 13:57:47 -08:00
Wunkolo
86e9e60f07 cpu_detect: Update array-types to span and array
Update some uses of `int` into some more explicitly sized types as well
2022-03-09 13:57:47 -08:00
Wunkolo
3c33ba7f18 cpu_detect: Utilize Bit<N> utility function 2022-03-09 13:57:47 -08:00
Wunkolo
d233de8194 cpu_detect: Compact capability fields
As this structure gets more explicit, bools can be bitfields and
small enums can use smaller types for their span of values.
2022-03-09 13:57:47 -08:00
Wunkolo
add2cfcb96 bit_util: Add bit utility function
Extracts a singular bit, as a bool, from the specified compile-time index.
2022-03-09 13:57:47 -08:00
Fernando S
5192c64991
Merge pull request #7973 from Morph1984/debug-crash
host_memory: Fix fastmem crashes in debug builds
2022-03-06 04:49:27 +01:00
bunnei
a31c195749
Merge pull request #7935 from Wunkolo/logging-join-fix
logging: Convert `backend_thread` into an `std::jthread`
2022-03-02 19:09:26 -08:00
Morph
b33f23cc46 host_memory: Fix fastmem crashes in debug builds
It is possible for virtual_offset to not be 0 when the iterator is at the beginning, and thus, std::prev(it) may be evaluated, leading to a crash in debug mode.

Co-Authored-By: Fernando S. <1731197+FernandoS27@users.noreply.github.com>
2022-03-02 18:36:59 -05:00
Wunkolo
913c2bd2cb logging: Convert backend_thread into an std::jthread
Was getting an unhandled `invalid_argument` [exception](https://en.cppreference.com/w/cpp/thread/thread/join) during
shutdown on my linux machine. This removes the need for a `StopBackendThread` function entirely since `jthread`
[automatically handles both checking if the thread is joinable and stopping the token before attempting to join](https://en.cppreference.com/w/cpp/thread/jthread/~jthread) in the case that `StartBackendThread` was never called.
2022-02-27 16:23:52 -08:00
merry
16784e5bb3 dynarmic: Inline exclusive memory accesses
Inlines implementation of exclusive instructions into JITted code,
improving performance of applications relying heavily on these
instructions.

We also fastmem these instructions for additional speed, with
support for appropriate recompilation on fastmem failure.

An unsafe optimization to disable the intercore global_monitor is also
provided, should one wish to rely solely on cmpxchg semantics for
safety.

See also: merryhime/dynarmic#664
2022-02-27 19:40:05 +00:00
bunnei
70482e6b26 settings: Add a new "use_extended_memory_layout" setting.
- This will be used to enable emulation of a larger memory arrangement.
2022-02-21 13:07:19 -08:00
bunnei
92b2e92620 fixup! core: hle: kernel: KPageTable: Improve Un/MapPhysicalMemory. 2022-02-19 00:14:27 -08:00
bunnei
1a16d055df core: hle: kernel: KPageTable: Improve Un/MapPhysicalMemory.
- Improves the implementations of MapPhysicalMemory and UnmapPhysicalMemory to more closely reflect latest HOS.
2022-02-18 23:42:27 -08:00
Wunkolo
768fdb269e common: Add NullVisitor default constructor
Addresses https://github.com/yuzu-emu/yuzu/issues/7881 to fix linux
builds.

`YUZU_NON_COPYABLE` deletes the `T(const T&)` constructor which will
cause the implicitly defined default ctor/dtor to no-longer generate.
2022-02-17 06:28:19 -08:00
bunnei
027ff7847c
Merge pull request #7878 from german77/mnpp
service/mnpp: Stub mnpp_app
2022-02-16 18:42:49 -07:00
Morph
4390370a19 common: fs_util: Add buffer to string view utility functions
These functions allow to construct a string view from an input buffer, avoiding the copy done by the non string view counterparts. However, callers must be cognizant of the viewed buffer's lifetime to avoid a use-after-free.
2022-02-13 18:53:21 -05:00
Narr the Reg
6705439cf3 service/mnpp: Stub mnpp_app
Used in Super Nintendo Entertainment System™ - Nintendo Switch Online
2022-02-10 21:55:28 -06:00
Morph
3799c820ca common: uuid: Use sizeof(u64) instead of 8 in Hash() 2022-02-10 15:03:49 -05:00
Morph
ec4d7f71fe common: uuid: Return an invalid UUID if conversion from string fails
The string constructor of UUID states:
Should the input string not meet the above requirements, an assert will be triggered and an invalid UUID is set instead.
2022-02-05 13:56:21 -05:00
Morph
25db62ce15 general: Rename NewUUID to UUID, and remove the previous UUID impl
This completes the removal of the old UUID implementation.
2022-02-05 13:56:21 -05:00
Morph
d94dcaefa0 common: uuid: Add AsU128()
This copies the internal bytes of the UUID into a u128 for backwards compatibility. This should not be used.
2022-02-05 13:56:21 -05:00
Morph
cb30fe50cd input/hid: Migrate to the new UUID implementation 2022-02-05 13:18:41 -05:00
Morph
3271099fea common: Implement NewUUID
This is a fixed and revised implementation of UUID that uses an array of bytes as its internal representation of a UUID instead of a u128 (which was an array of 2 u64s).
In addition to this, the generation of RFC 4122 Version 4 compliant UUIDs is also implemented.
2022-02-05 13:18:31 -05:00
Lioncash
ade44ac2ea common_types: Remove NonCopyable struct
Now that we're moved over to the YUZU_ defines, we can get rid of this
struct.
2022-02-02 13:19:01 -05:00
Lioncash
f785f73e92 general: Replace NonCopyable struct with equivalents 2022-02-02 13:17:12 -05:00
bunnei
72add82ee9
Merge pull request #7807 from german77/moar-buttons
input_common: Add home and hard touch press buttons to UDP controllers
2022-02-01 22:37:13 -07:00
bunnei
50e9ba34b4
Merge pull request #7809 from Morph1984/clock-constants
common: wall_clock: Utilize constants for ms, us, and ns ratios
2022-02-01 18:34:31 -07:00
Lioncash
8f32bab4c9 common/file: Remove [[nodiscard]] from Open()
Since this has a void return value, there's nothing that can actually be
used.
2022-02-01 02:19:21 -05:00
Morph
6267110b69 common: wall_clock: Check precision against the emulated CPU and CNTFRQ
In addition to requiring nanosecond precision, using the native clock requires that the hardware TSC has a precision greater than the emulated CPU and its clock counter.
2022-01-30 12:57:23 -05:00
Morph
4e766280c4 common: wall_clock: Utilize constants for ms, us, and ns ratios 2022-01-30 12:36:56 -05:00
german77
3d2d77eb3f input_common: Add home and hard touch press buttons to UDP controllers 2022-01-30 09:17:22 -06:00
Morph
11099dda2e
Merge pull request #7791 from german77/wall_clock
wall_clock: Use standard wall clock if rtsc frequency is too low
2022-01-28 20:04:24 -05:00
german77
e4c63d432d wall_clock: use standard wall clock if rtsc frequency is too low 2022-01-27 17:07:52 -06:00
Lioncash
f6a049337e common/xbyak_api: Make BuildRegSet() constexpr
This allows us to eliminate any static constructors that would have been
emitted due to the function not being constexpr.
2022-01-26 16:29:15 -05:00
german77
b998aa5504 yuzu: Add setting to disable controller navigation 2022-01-23 21:08:49 -06:00
bunnei
ef7c50b276
Merge pull request #7695 from Morph1984/is-pow2
common: bit_util: Add IsPow2 helper function
2022-01-20 18:06:11 -08:00
bunnei
eceee8e5f4
Merge pull request #7725 from german77/mouse_in_motion
input_common: Reintroduce motion from mouse and use button names
2022-01-18 18:16:27 -08:00
german77
9eab07f863 input_common: Reintroduce motion from mouse and use button names 2022-01-16 20:37:34 -06:00
bunnei
f6de57c1a5 common: fiber: YieldTo: Avoid hard crash on nullptr previous_fiber.
- When the emulator crashes to desktop below, we don't even get this captured in a log, making such issues harder to debug.
2022-01-14 16:17:19 -08:00
Morph
d92b5fc435 common: bit_util: Add IsPow2 helper function
Makes use of std::has_single_bit() to check whether the value is a power of 2.
2022-01-11 16:01:12 -05:00
liushuyu
09f4f3f23b
logging/log.h: move enum class formatter to a separate file ...
... to common/logging/formatter.h
2022-01-09 17:35:33 -07:00
liushuyu
099dd0c0d2
logging/log: use underlying_type instead of hardcoding types 2022-01-08 16:02:49 -07:00
liushuyu
42f653ab6f
logging: adapt to changes in fmt 8.1 2022-01-08 01:49:26 -07:00
Fernando Sahmkow
f58ee3f15f ShaderDecompiler: Add a debug option to dump the game's shaders. 2022-01-04 02:39:00 +01:00
Andrew Udvare
caf38725ae
Allow overriding SCM version info
If the build is from a non-repository, these functions will return empty. This
patch allows using defines to CMake to set version info such as
-DGIT_BRANCH=master.
2021-12-20 19:13:07 -05:00
Mai M
019ae82c94
Merge pull request #7558 from Morph1984/unused-cpu-family-model
common/cpu_detect: Remove CPU family and model
2021-12-14 23:43:16 -05:00
Lioncash
e05d2a70b2 common/input: Avoid numerous large copies of CallbackStatus
CallbackStatus instances aren't the cheapest things to copy around
(relative to everything else), given that they're currently 520 bytes in
size and are currently copied numerous times when callbacks are invoked.

Instead, we can pass the status by const reference to avoid all the
copying.
2021-12-13 21:22:02 -05:00
Morph
4af413623b common/cpu_detect: Remove CPU family and model
We currently do not make use of these fields, remove them for now.
2021-12-13 20:45:18 -05:00
Lioncash
54eafbaf17 common/input: Remove unnecessary returns
Given these return void, these can be omitted.
2021-12-13 20:43:12 -05:00
Lioncash
985599e485 input_engine: Pass LedStatus by const reference
Avoids copies where reasonably applicable
2021-12-13 09:20:58 -05:00
Lioncash
38f3442ea5 input_engine: Pass VibrationStatus by const reference in SetRumble()
Avoids creating copies of the struct where not necessary.
2021-12-13 09:16:10 -05:00
bunnei
5f7e73c74a
Merge pull request #7525 from german77/notifa
service/notif: Add notif:a and stub ListAlarmSettings, Initialize
2021-12-07 23:31:44 -08:00
german77
ac1bfe228f service/notif: Add notif:a and stub ListAlarmSettings,Initialize
Used by ring fit adventure 1.2.0
2021-12-06 10:36:37 -06:00
ameerj
41aec2773f general: Add missing copyright notices 2021-12-05 16:18:53 -05:00
Morph
f919498f8f native_clock: Wait for less time in EstimateRDTSCFrequency
In my testing, waiting for 200ms provided the same level of precision as the previous implementation when estimating the RDTSC frequency.
This significantly improves the yuzu executable launch times since we reduced the wait time from 3 seconds to 200 milliseconds.
2021-12-03 19:55:59 -05:00
Morph
762b8ad448 general: Replace high_resolution_clock with steady_clock
On some OSes, high_resolution_clock is an alias to system_clock and is not monotonic in nature. Replace this with steady_clock.
2021-12-02 14:20:43 -05:00
german77
51df96b7c0 settings: Add debug setting to enable all controllers 2021-11-27 20:24:37 -06:00
german77
182cd9004f config: Remove vibration configuration 2021-11-26 19:31:04 -06:00
Narr the Reg
639402850a input_common: Fully implement UDP controllers 2021-11-26 15:46:36 -06:00
german77
746c85b560 input_common: Move button names to the frontend 2021-11-24 20:30:28 -06:00
german77
654d76e79e core/hid: Fully implement native mouse 2021-11-24 20:30:28 -06:00
german77
bca299e8e0 input_common: Allow keyboard to be backwards compatible 2021-11-24 20:30:28 -06:00
german77
b673857d7d core/hid: Improve accuracy of the keyboard implementation 2021-11-24 20:30:28 -06:00
german77
84c58666a4 config: Cleanup and documentation 2021-11-24 20:30:27 -06:00
german77
157e0b85fd core/hid: Prevent Emulated controller from flapping with multiple inputs devices 2021-11-24 20:30:27 -06:00
german77
136eb9c4c2 core/hid: Fully emulate motion from button 2021-11-24 20:30:27 -06:00
german77
77fa4d4bf6 second commit lion review 2021-11-24 20:30:26 -06:00
german77
730f078302 settings: Fix Debug controller type options 2021-11-24 20:30:26 -06:00
german77
2b1b0c2a30 kraken: Address comments from review
start lion review
2021-11-24 20:30:26 -06:00
german77
c085e54316 core/hid: Add TAS input 2021-11-24 20:30:26 -06:00
german77
c6c32daf40 input_common: Add manual update options to input devices 2021-11-24 20:30:26 -06:00
german77
c3ff0a8ac0 core/hid: Fix rumble too strong at 1% 2021-11-24 20:30:24 -06:00
german77
601ac43495 core/hid: Only signal when needed 2021-11-24 20:30:24 -06:00
german77
06a5ef5874 core/hid: Add output devices 2021-11-24 20:30:24 -06:00
german77
6e2c84042d settings: Cleanup settings 2021-11-24 20:30:23 -06:00
german77
ad5142ac2c common: Rewrite and move core/frontend/input.h to common 2021-11-24 20:30:21 -06:00
Kewlan
8e3371a5c5 configure_general: Allow framerate cap to be used in custom game configs 2021-11-21 16:57:00 +01:00
Fernando Sahmkow
da2fe81905 TextureCache: Refactor and fix linux compiling. 2021-11-20 14:46:19 +01:00
Fernando Sahmkow
282e04bffb TextureCache: Add automatic anisotropic filtering and refactor code. 2021-11-16 23:14:51 +01:00
Fernando Sahmkow
a96c9c803b Yuzu UI: Add button for Anti Alias 2021-11-16 22:11:32 +01:00
Marshall Mohror
510caeefb3 Settings: Add anti-aliasing method setting 2021-11-16 22:11:32 +01:00
FernandoS27
2eff80b47f QtGUI: Add buttton to toggle the filter. 2021-11-16 22:11:32 +01:00
FernandoS27
9e065b9c7d VideoCore: Add gaussian filtering. 2021-11-16 22:11:32 +01:00
FernandoS27
e7fc60406e VideoCore: Add more rescaling option. 2021-11-16 22:11:31 +01:00
Fernando Sahmkow
4ad22c7d2b Video Core: fix building for GCC. 2021-11-16 22:11:31 +01:00
Fernando Sahmkow
b60966041c Presentation: add Nearest Neighbor filter. 2021-11-16 22:11:31 +01:00
Marshall Mohror
37cb0377ae vulkan: Implement FidelityFX Super Resolution 2021-11-16 22:11:31 +01:00
Fernando Sahmkow
b7ccc58f23 Texture Cahe: Fix downscaling on SMO. 2021-11-16 22:11:31 +01:00
ameerj
abd07e4158 video_core: Refactor resolution scale function 2021-11-16 22:11:31 +01:00
ameerj
31478c6c1b video_core: Misc resolution scaling related refactoring 2021-11-16 22:11:30 +01:00
Fernando Sahmkow
a6b88e85bf Renderer: Implement Bicubic and ScaleForce filters. 2021-11-16 22:11:29 +01:00
ReinUsesLisp
43aa695a04 common/settings: Remove unused scaling options 2021-11-16 22:11:28 +01:00
Fernando Sahmkow
71ca84d829 Settings: eliminate rescaling_factor. 2021-11-16 22:11:27 +01:00
Fernando Sahmkow
37ef9c9130 Settings: Add resolution scaling to settings. 2021-11-16 22:11:27 +01:00
Fernando Sahmkow
22f4b290b6 VideoCore: Initial Setup for the Resolution Scaler. 2021-11-16 22:11:27 +01:00
bunnei
0eacc362dd
Merge pull request #7272 from behunin/the-courteous-logger
Logging: Impl refactor
2021-11-13 00:03:54 -08:00
Morph
a41e9e93dd common: Implement a subset of P0323 (std::expected)
This implementation is based on and is a subset of the proposed implementation of std::expected
https://github.com/TartanLlama/expected/blob/master/include/tl/expected.hpp
2021-11-02 15:20:35 -04:00
Levi Behunin
d6b5f64484 Refactor Logging Impl
Loop on stop_token and remove final_entry in Entry.
Move Backend thread out of Impl Constructor to its own function.
Add Start function for backend thread.
Use stop token in PopWait and check if entry filename is nullptr before logging.
2021-11-01 18:36:27 -06:00
ameerj
1841f63a40 common/alignment: Fix VS2022 compilation
VS2022 seems to introduce an optimization when moving vectors to check for equality of the element values. AlignmentAllocator needed to overload the equality operator to fix compilation of its usage in vector moving.
2021-10-20 01:22:00 -04:00
ameerj
ef811c6425 settings: Remove std::chrono usage
Alleviates the dependency on chrono for all files that include settings.h
2021-10-17 00:37:49 -04:00
Morph
0d6057b2fa string_util: Make use of std::string_view and add bounds checking
Makes use of std::string_view in StringFromFixedZeroTerminatedBuffer and add bounds checking
2021-10-14 14:09:34 -04:00
Morph
3ffff78a27 string_util: Prevent out of bounds access in u16string_view buffer 2021-10-14 14:09:34 -04:00
Creak
0b8a7ca213
common/fs/path_util: Slightly refactor PathManagerImpl's constructor
This moves all GenerateYuzuPath calls outside of the platofrm-specific #ifdefs, replacing them with assignments to paths.
2021-10-11 21:56:25 -04:00
bunnei
5b2fa8dd41
Merge pull request #7115 from ameerj/log-compile
common/logging: Reduce dependent header include overhead
2021-10-05 10:05:46 -07:00
bunnei
3a33519598
Merge pull request #7102 from Morph1984/remove-boxcat
Remove Boxcat BCAT backend
2021-10-01 18:41:41 -07:00
ameerj
579f4ea4bd common/logging: Reduce scope of fmt include 2021-10-01 20:48:49 -04:00
ameerj
5daf3abe65 common/logging: Move Log::Entry declaration to a separate header
This reduces the load of requiring to include std::chrono in all files which include log.h
2021-10-01 20:48:49 -04:00
Andrew Strelsky
3fc7aceea7
Fixed invalid iterator usage 2021-09-29 06:58:48 -04:00
Morph
8af9f3216e settings: Remove BCAT settings 2021-09-29 01:24:21 -04:00
ameerj
73666fb262 general: Update style to clang-format-12 2021-09-24 15:52:05 -04:00
Lioncash
40314cc586 common/uuid: Add validity checking functions to interface
Given we have a function to invalidate, we should also have ones to
query the validity. Also makes the code more straightforward to read.
2021-09-22 17:59:00 -04:00
bunnei
a9c3619d26
Merge pull request #7019 from ameerj/videocore-jthread
videocore: Use std::jthread for worker threads
2021-09-18 20:37:40 -07:00
german77
33a1d790e8 input_common/tas: Document the main class 2021-09-18 23:22:48 +02:00
german77
e6c4bf52f0 input_common/tas: Add swap controller 2021-09-18 23:22:42 +02:00
MonsterDruide1
f078b15565 input_common/tas: Fallback to simple update 2021-09-18 23:22:30 +02:00
german77
c01a872c8e config: Move TAS options to it's own menu 2021-09-18 23:22:30 +02:00
MonsterDruide1
4297d2fea2 core: Hacky TAS syncing & load pausing
To keep the TAS inputs synced to the game speed even through lag spikes and loading zones, deeper access is required.

First, the `TAS::UpdateThread` has to be executed exactly once per frame. This is done by connecting it to the service method the game calls to pass parameters to the GPU: `Service::VI::QueueBuffer`.

Second, the loading time of new subareas and/or kingdoms (SMO) can vary. To counteract that, the `CPU_BOOST_MODE` can be detected: In the `APM`-interface, the call to enabling/disabling the boost mode can be caught and forwarded to the TASing system, which can pause the script execution if neccessary and enabled in the settings.
2021-09-18 23:22:20 +02:00
MonsterDruide1
f25d6ebc45 settings: File selector & other settings
First of all, TASing requires a script to play back. The user can select the parent directory at `System -> Filesystem`, next to an option to pause TAS during loads: This requires a "hacky" setup deeper in the code and will be added in the last commit.

Also, Hotkeys are being introduced: CTRL+F5 for playback start/stop, CTRL+F6 for re-reading the script and CTRL+F7 for recording a new script.
2021-09-18 23:22:11 +02:00
MonsterDruide1
b42c3ce21d input_common/tas: Base playback & recording system
The base playback system supports up to 8 controllers (specified by `PLAYER_NUMBER` in `tas_input.h`), which all change their inputs simulataneously when `TAS::UpdateThread` is called.

The recording system uses the controller debugger to read the state of the first controller and forwards that data to the TASing system for recording. Currently, this process sadly is not frame-perfect and pixel-accurate.

Co-authored-by: Naii-the-Baf <sfabian200@gmail.com>
Co-authored-by: Narr-the-Reg <juangerman-13@hotmail.com>
2021-09-18 23:22:00 +02:00
bunnei
35f46fc079
Merge pull request #7020 from Moonlacer/remove_audio_stretching
Remove audio stretching
2021-09-18 11:18:24 -07:00
bunnei
6d7801deb7
Merge pull request #6950 from german77/multiplay
input_common: Add advanced setting for 8 player support
2021-09-17 17:25:51 -07:00
Moonlacer
09ab819040 fix_accidental_deletion 2021-09-15 19:59:10 -05:00
Moonlacer
44135b011f remove-audio-stretching-setting 2021-09-15 19:52:43 -05:00
ameerj
c2ddda2f51 threadsafe_queue: Add std::stop_token overload to PopWait
Useful for jthreads which make use of the threadsafe queues.
2021-09-15 20:49:07 -04:00
Morph
3512cae623 common_funcs: Add enum flag bitwise shift operator overloads
This adds bitwise shift operator overloads (<<, >>, <<=, >>=) in the macro DECLARE_ENUM_FLAG_OPERATORS(type)
2021-09-13 16:01:20 -04:00
Morph
eb1e3f19bb common_funcs: Replace <algorithm> with <iterator> 2021-09-11 17:19:14 -04:00
Morph
290afc00d3 common: Move error handling to error.cpp/h
This allows us to avoid implicitly including <string> every time common_funcs.h is included.
2021-09-11 17:19:14 -04:00
Fernando S
be4e192903
Merge pull request #6846 from ameerj/nvdec-gpu-decode
nvdec: Add GPU video decoding for all capable drivers and platforms
2021-09-11 23:11:32 +02:00
german77
5798537ce4 input_common: Enable steam controllers and 8 player support 2021-09-10 00:58:12 -05:00
german77
c57e0b3b24 common/logging: Add missing include 2021-09-01 19:13:33 -05:00
bunnei
956171f024
Merge pull request #6897 from FernandoS27/pineapple-does-not-belong-in-pizza
Project <tentative title>: Rework Garbage Collection.
2021-08-31 09:11:21 -07:00
Fernando Sahmkow
ff48f06fb9 Garbage Collection: Adress Feedback. 2021-08-29 18:19:53 +02:00
Morph
7d2265b6a8
Merge pull request #6927 from german77/ngct
ngct: Stub NGCT:U service
2021-08-28 23:03:29 -04:00
Fernando Sahmkow
ba82bb359b Garbage Collection: enable as default, eliminate option. 2021-08-28 17:55:37 +02:00
Fernando Sahmkow
d540d284b5 VideoCore: Rework Garbage Collection. 2021-08-28 17:54:12 +02:00
german77
f134a5e56c ngct: Stub NGCT:U service 2021-08-27 14:15:34 -05:00
Morph
790a09bc93
Revert "logging: Display backtrace on crash" 2021-08-27 04:01:22 -04:00
bunnei
d10d480642
Merge pull request #6870 from yzct12345/trace-back-stack-back-stack-back
logging: Display backtrace on crash
2021-08-26 17:41:14 -07:00
ameerj
84b4ac5729 logging: Fix log filter during initialization
The log filter was being ignored on initialization due to the logging instance being initialized before the config instance, so the log filter was set to its default value.

This fixes that oversight, along with using descriptive exceptions instead of abort() calls.
2021-08-24 01:32:38 -04:00
bunnei
f65f8b9097
Merge pull request #6869 from yzct12345/shiny-logs-in-the-fireplace
logging: Simplify and make thread-safe
2021-08-22 20:40:18 -07:00
Morph
c4a1d3cbf4 settings: Amend language_index maximum setting range
The maximum is now 17 with the addition of Brazilian Portuguese
2021-08-21 09:43:15 -04:00
bunnei
455e28790a
Merge pull request #6877 from MerryMage/dyn-ignore-asserts
dynarmic: Update and enable DYNARMIC_IGNORE_ASSERTS
2021-08-19 15:53:14 -07:00
ameerj
cd016d3cb5 configure_graphics: Add GPU nvdec decoding as an option
Some system configurations may see visual regressions or lower performance using GPU decoding compared to CPU decoding. This setting provides the option for users to specify their decoding preference.

Co-Authored-By: yzct12345 <87620833+yzct12345@users.noreply.github.com>
2021-08-16 14:40:53 -04:00
Fernando S
521e6ac174
Merge pull request #6863 from spholz/fix-lan-play
Fix LAN Play
2021-08-16 17:10:00 +02:00
Merry
1770503185 xbyak: Update include path 2021-08-15 19:26:38 +01:00
yzct12345
0ba521e634
threadsafe_queue: Fix deadlock
This fixes a lost wakeup in SPSCQueue. If the reader is in just the right position, the writer's notification will be lost and this will be a problem if the writer then does something to wait on the reader.

This was discovered to affect my upcoming stacktrace PR. I don't think any performance decrease will be noticeable because an uncontended mutex is smart enough to skip the syscall. This PR might also resolve some rare deadlocks but I don't know of any examples.
2021-08-13 19:22:51 +00:00
yzct12345
81ed54d13e
logging: Display backtrace on crash
This implements backtraces so we don't have to tell users how to use gdb anymore.

This prints a backtrace after abort or segfault is detected. It also fixes the log getting cut off with the last line containing only a bracket. This change lets us know what caused a crash not just what happened the few seconds before it.

I only know how to add support for Linux with GCC. Also this doesn't work outside of C/C++ such as in dynarmic or certain parts of graphics drivers. The good thing is that it'll try and just crash again but the stack frames are still there so the core dump will work just like before.
2021-08-13 18:58:35 +00:00
yzct12345
001675dced
logging: Simplify and make thread-safe
This simplifies the logging system.

This also fixes some lost messages on startup.

The simplification is simple. I removed unused functions and moved most things in the .h to the .cpp. I replaced the unnecessary linked list with its contents laid out as three member variables. Anything that went through the linked list now directly accesses the backends. Generic functions are replaced with those for each specific use case and there aren't many. This change increases coupling but we gain back more KISS and encapsulation.

With those changes it was easy to make it thread-safe. I just removed the mutex and turned a boolean atomic. I was planning to use this thread-safety in my next PR about stacktraces. It was actually async-signal-safety at first but I ended up using a different approach. Anyway getting rid of the linked list is important for that because have the list of backends constantly changing complicates things.
2021-08-13 18:39:45 +00:00
spholz
78a8249593
Merge branch 'yuzu-emu:master' into fix-lan-play 2021-08-12 22:27:17 +02:00
spholz
1e98e73828 configuration: add option to select network interface
This commit renames the "Services" tab to "Network" and adds a combobox that allows the user to select the network interface that yuzu should use. This new setting is now used to get the local IP address in Network::GetHostIPv4Address. This prevents yuzu from selecting the wrong network interface and thus using the wrong IP address. The return type of Network::GetHostIPv4Adress has also been changed.
2021-08-12 21:32:53 +02:00
lat9nq
5be2d6fd28 settings: Fix MSVC issues
According to https://stackoverflow.com/questions/469508, we run into a
MSVC bug (since VS 2005) when using diamond inheritance for
RangedSetting.

This explicitly implements those functions in RangedSetting. GetValue is
implemented as just calling the inherited version. The explicit
converson operator is reimplemented. I opted for this over ignoring the
warning with a pragma since this specifies the inherited behavior, and I
have now less faith in MSVC to pick the right one.

In addition, we mark destructors as virtual to silence what I believe is
a fair MSVC compilation error.
2021-08-11 17:12:14 -04:00
bunnei
e6b80c2cf8
Merge pull request #6776 from lat9nq/ranged-settings
settings: Implement settings ranges
2021-08-10 21:19:01 -07:00
bunnei
63325cafbe
Merge pull request #6827 from Morph1984/uuid-hash
common: uuid: Add hash function for UUID
2021-08-07 17:18:46 -07:00
bunnei
42d8e08f78
Merge pull request #6822 from yzct12345/clion-assert
assert: Avoid empty macros
2021-08-05 22:29:45 -07:00