Commit graph

2033 commits

Author SHA1 Message Date
Tokarev Artem
007c3fa7df Fix potentially uninitialized local variable warning 2023-06-09 05:12:22 +05:00
Liam
6c34adb1de nvnflinger: allow locking framerate during video playback 2023-06-08 01:15:51 -04:00
Morph
2e1e725443 core_timing: Fix SingleCore cycle timer 2023-06-07 21:44:42 -04:00
Morph
907507886d (wall, native)_clock: Add GetGPUTick
Allows us to directly calculate the GPU tick without double conversion to and from the host clock tick.
2023-06-07 21:44:42 -04:00
Morph
8e56a84566 core_timing: Use CNTPCT as the guest CPU tick
Previously, we were mixing the raw CPU frequency and CNTFRQ.
The raw CPU frequency (1020 MHz) should've never been used as CNTPCT (whose frequency is CNTFRQ) is the only counter available.
2023-06-07 21:44:42 -04:00
Morph
1492a65454 (wall, native)_clock: Rework NativeClock 2023-06-07 21:44:42 -04:00
Morph
dd12dd4c67 x64: Deduplicate RDTSC usage 2023-06-07 21:44:42 -04:00
german77
107aa52cdb service: nfc: Add backup support 2023-06-06 17:06:21 -06:00
bunnei
cb95d7fe1b
Merge pull request #10508 from yuzu-emu/lime
Project Lime - yuzu Android Port
2023-06-05 21:43:43 -07:00
lat9nq
de1fe66d81 time_zone: Handle offset time zones
time_zone: Remove maybe_unused

time_zone: Use s64 storages

time_zone: Catch by reference
2023-06-05 15:15:23 -04:00
lat9nq
3979c7daa4 common: Move system time zone string detection
Moves it from Settings to Common::TimeZone, since this algorithm doesn't
depend on the setting. It also lets us use it in other libraries.

common: Various fixes

time_zone: Don't double up the std::abs

Too many absolute values were causing mirrored time zones to resolve
as the same.
2023-06-05 15:15:11 -04:00
lat9nq
3e68a284ae settings: Always report a valid time zone
Prevents needing to deduce the non-Switch setting in core. Instead, we
deduce the meaning of this setting where the heresy is committed, in
common.

settings: Remove strftime usage

GetTimeZoneString: Use standard features

Also forces GMT on MinGW due to broken strftime.
2023-06-05 15:15:11 -04:00
Narr the Reg
3f35b34515 Use yuzu as category instead of citra 2023-06-03 00:05:44 -07:00
Liam
b19754c73f common: link libandroid on android 2023-06-03 00:05:43 -07:00
bunnei
32cf6beee3 common: dynamic_library: Add ctor for existing handle. 2023-06-03 00:05:31 -07:00
bunnei
ef605f7d8f android: Implement SAF support & migrate to SDK 31. (#4) 2023-06-03 00:05:29 -07:00
bunnei
cdbab60bbb common: error: Fix for Android. 2023-06-03 00:05:27 -07:00
bunnei
f8b87e6fab common: fs: Implement for Android. 2023-06-03 00:05:27 -07:00
bunnei
99296a1510 common: logging: Implement Android logcat backend. 2023-06-03 00:05:26 -07:00
bunnei
afdee9abea common: host_memory: Implement for Android. 2023-06-03 00:05:26 -07:00
kkoniuszy
584e8b5c52 host_memory: merge adjacent placeholder mappings on Linux
Track the private anonymous placeholder mappings created by Unmap() and
wherever possible, replace existing placeholders with larger ones
instead of creating many small ones.

This helps with the buildup of mappings in /proc/YUZU_PID/maps after a
longer gaming session, improving stability without having to increase
vm.max_map_count to a ridiculous value. The amount of placeholder
mappings will no longer outgrow the amount of actual memfd mappings in
cases of high memory fragmentation.
2023-06-01 22:57:27 +02:00
Morph
9950a388d2 externals: Update to fmt 10 and add format_as formatter for BitField
Implicit conversions are now disallowed in fmt 10. Use format_as to convert to the underlying type.
2023-05-28 15:05:55 -04:00
Liam
415c78b87c textures: add BC1 and BC3 compressors and recompression setting 2023-05-23 12:54:40 -04:00
liamwhite
bbb6b58aa4
Merge pull request #10181 from lat9nq/intel-compute-toggle
configure_graphics: Add option to enable compute pipelines for Intel proprietary
2023-05-15 12:05:24 -04:00
liamwhite
182221b9ff
Merge pull request #10132 from Kelebek1/fermi_blit2
Allow Fermi blit accelerate to work without images in cache
2023-05-11 10:45:59 -04:00
Kelebek1
bf08bc3c0f Allow Fermi blit accelerate to add src/dst to the cache if they don't exist already. Use ScratchBuffers in the software blit path. 2023-05-11 06:42:38 +01:00
german77
1968cc7b10 service: nfp: Allow to load with a different amiibo id 2023-05-09 17:51:59 -06:00
Fernando Sahmkow
92da86290c Settings: add option to enable / disable reactive flushing 2023-05-07 23:46:12 +02:00
Kelebek1
6fed48b3a4 Fix address space allocator slow path to avoid OOB 2023-05-07 15:11:16 +01:00
lat9nq
725aacb4bc settings: Add enable compute pipelines
For the Intel proprietary driver's deficiencies.

settings: Restore compute option global state
2023-05-07 01:06:20 -04:00
bunnei
3547248ec2
Merge pull request #10125 from lat9nq/vsync-select
configuration: Expose separate swap present modes
2023-05-06 21:55:39 -07:00
liamwhite
9c9b4616c3
Merge pull request #10167 from german77/motion_preview
yuzu: Add motion preview to controller input
2023-05-06 23:09:55 -04:00
Roni Kirla
a13fd5f7cc Fix read access violation 2023-05-07 00:13:33 +03:00
Narr the Reg
f017335fef input_common: Add property to invert an axis button 2023-05-05 17:18:35 -06:00
Narr the Reg
46e835f2d6 yuzu: Add motion preview to controller input 2023-05-05 13:53:38 -06:00
Liam
ae59ffc56c settings: remove pessimistic flushing 2023-05-03 18:52:42 -04:00
Morph
627022bef9
Merge pull request #10124 from liamwhite/pebkac
settings: rename extended memory layout to unsafe, move from general to system
2023-05-03 10:52:45 -04:00
lat9nq
2528cf7c54 settings: Enable FIFO relaxed
Not entirely sure if we need this, but there's also no reason not to
support it.

settings: Give VSyncMode values
2023-05-02 21:51:30 -04:00
lat9nq
6f0929df82 configuration: Expose separate swap present modes
Previously, yuzu would try and guess which vsync mode to use given
different scenarios, but apparently we didn't always get it right. This
exposes the separate modes in a drop-down the user can select.

If a mode isn't available in Vulkan, it defaults to FIFO.
2023-05-02 21:51:29 -04:00
GPUCode
f403d27941 vk_present_manager: Add toggle for async presentation 2023-05-01 23:13:24 +03:00
Liam
2cd9e1ecb6 settings: rename extended memory layout to unsafe, move from general to system 2023-04-30 14:24:22 -04:00
Liam
2afaa7aed7 common: add intrusive list type 2023-04-29 17:46:26 -04:00
Liam
a9623d5f55 general: fixes for gcc 13 2023-04-02 19:02:04 -04:00
Max Dunbar
e446f368d7 Fixes 'Continous' typo 2023-03-29 19:26:12 -07:00
Morph
cdc846677c telemetry: Add waitpkg instruction 2023-03-27 17:45:22 -04:00
Morph
981bc8aa1c x64: Simplify RDTSC on non-MSVC compilers
Co-Authored-By: liamwhite <liamwhite@users.noreply.github.com>
2023-03-27 17:45:22 -04:00
Morph
27c33ab73f x64: Add MicroSleep
MicroSleep allows the processor to pause for a "short" amount of time (in the microsecond range). This is useful for spin-waiting that does not require nanosecond precision.
This uses the new TPAUSE instruction introduced on Intel's newest processors as part of the waitpkg instructions. For CPUs that do not support waitpkg instructions, this is equivalent to yield().

Co-Authored-By: liamwhite <liamwhite@users.noreply.github.com>
2023-03-27 17:45:22 -04:00
Morph
d2cfe25b07 x64: cpu_detect: Add detection of waitpkg instructions
waitpkg introduces 3 instructions, UMONITOR, UMWAIT and TPAUSE.
2023-03-27 17:45:22 -04:00
Liam
7017f04ee8 container_hash: use climits 2023-03-26 10:24:33 -04:00
Morph
9971cd1d55 common: Port boost's hash_value implementation
Ports a small subset of boost's hash_value implementation (<= 1.80.0).
2023-03-25 23:52:25 -04:00
Morph
abe2ad7aac zstd: Use ZSTD_getFrameContentSize instead of ZSTD_getDecompressedSize 2023-03-23 22:16:20 -04:00
liamwhite
ac3927074b
Merge pull request #9971 from Morph1984/q
bounded_threadsafe_queue: Use simplified impl of bounded queue
2023-03-23 10:00:31 -04:00
liamwhite
c41a4baf06
Merge pull request #9964 from liamwhite/typed-address
kernel: use KTypedAddress for addresses
2023-03-23 10:00:19 -04:00
Liam
fb49ec19c1 kernel: use KTypedAddress for addresses 2023-03-22 09:35:16 -04:00
Morph
197d756560 bounded_threadsafe_queue: Refactor Pop
Introduces PopModes to bring waiting logic into Pop, similar to Push.
2023-03-21 22:33:58 -04:00
Morph
8c56481249 bounded_threadsafe_queue: Add producer cv to avoid busy waiting 2023-03-21 22:33:57 -04:00
Morph
407dc917f1 bounded_threadsafe_queue: Deduplicate and add PushModes
Adds the PushModes Try and Wait to allow producers to specify how they want to push their data to the queue if the queue is full.
If the queue is full:
- Try will fail to push to the queue, returning false. Try only returns true if it successfully pushes to the queue. This may result in items not being pushed into the queue.
- Wait will wait until a slot is available to push to the queue, resulting in potential for deadlock if a consumer is not running.
2023-03-21 19:20:21 -04:00
Morph
15d573194c bounded_threadsafe_queue: Add TryPush 2023-03-21 19:17:38 -04:00
Morph
f28ca5361f logging: Make use of bounded queue 2023-03-21 19:17:38 -04:00
Morph
306840a580 bounded_threadsafe_queue: Use simplified impl of bounded queue
Provides a simplified SPSC, MPSC, and MPMC bounded queue implementation using mutexes.
2023-03-21 19:17:32 -04:00
bunnei
00d401d639 common: string_util: Use std::string_view for UTF16ToUTF8/UTF8ToUTF16W. 2023-03-18 22:42:25 -07:00
bunnei
0eb3fa05e5 common: bounded_threadsafe_queue: Use polyfill_thread. 2023-03-17 23:42:17 -07:00
Liam
600f325d87 general: fix spelling mistakes 2023-03-12 11:33:01 -04:00
liamwhite
021af4fd00
Merge pull request #9917 from Morph1984/the-real-time
native_clock: Re-adjust the RDTSC frequency to its real frequency
2023-03-10 13:55:11 -05:00
bunnei
4562f7af9a
Merge pull request #9906 from german77/metroid2
input_common: Increase mouse sensitivity range
2023-03-08 10:43:38 -08:00
Morph
a3ffea6a64
Merge pull request #9918 from liamwhite/fwrapv
kernel: avoid signed overflow UB on MSVC
2023-03-07 22:42:32 -05:00
Morph
b014fdacdb
Merge pull request #9920 from liamwhite/constexpr-bit-cast
common: make BitCast constexpr
2023-03-07 22:42:19 -05:00
Morph
d718eab351 native_clock: Wait for 10 seconds instead of 30
It was experimentally determined to be sufficient.
2023-03-07 21:17:46 -05:00
Morph
c27a626b5b native_clock: Use RealTimeClock instead of SteadyClock
We want to synchronize RDTSC to real time.
2023-03-07 21:17:46 -05:00
Morph
6f9918552c steady_clock: Introduce a real time clock 2023-03-07 21:17:46 -05:00
Morph
dcd13a7566 native_clock: Re-adjust the RDTSC frequency
The RDTSC frequency reported by CPUID is not accurate to its true frequency.
We will spawn a separate thread to calculate the true RDTSC frequency after a measurement period of 30 seconds has elapsed.
2023-03-07 21:17:46 -05:00
Narr the Reg
757aafa582
input_common: Minor typo issues (#9922) 2023-03-08 03:15:46 +01:00
german77
9a9e5844d3 input_common: Increase mouse sensitivity range 2023-03-07 19:31:52 -06:00
Liam
64dcb40db1 common: make BitCast constexpr 2023-03-07 20:26:56 -05:00
Liam
d45ac00d48 kernel: avoid signed overflow UB on MSVC 2023-03-07 19:46:48 -05:00
liamwhite
a7792e5ff8
Merge pull request #9889 from Morph1984/time-is-ticking
core_timing: Reduce CPU usage on Windows
2023-03-07 10:54:13 -05:00
Ikko Eltociear Ashimine
c161e3f433
fix typo in settings.h
Intial -> Initial
2023-03-06 20:28:47 +09:00
Morph
376a414f5b native_clock: Round RDTSC frequency to the nearest 1000 2023-03-05 02:36:31 -05:00
Morph
026eaddbee timer_resolution: Set current process to High QoS
Ensures that this process is treated as a high performance process by the Windows scheduler.
2023-03-05 02:36:31 -05:00
Morph
bff1453282 core_timing: Use higher precision sleeps on Windows
The precision of sleep_for and wait_for is limited to 1-1.5ms on Windows.
Using SleepForOneTick() allows us to sleep for exactly one interval of the current timer resolution.
This allows us to take advantage of systems that have a timer resolution of 0.5ms to reduce CPU overhead in the event loop.
2023-03-05 02:36:31 -05:00
Morph
7fffdf83b7 wall_clock: Make use of SteadyClock 2023-03-05 02:36:31 -05:00
Morph
1ed49f92dd common: Implement a method to change the Windows timer resolution
This utilizes undocumented NtDll functions to change the current timer resolution from the default of 1ms.
2023-03-05 01:41:28 -05:00
Morph
bd09c82521 common: Implement a high resolution steady clock
This implementation provides a consistent, high performance, and high resolution clock where/when std::chrono::steady_clock does not provide sufficient precision.
2023-03-05 01:41:19 -05:00
Liam
809148e1a5 nvnflinger: fix name 2023-03-01 10:39:49 -05:00
Alexandre Bouvier
57fd8b1f45 cmake: use correct boost imported targets 2023-02-28 17:56:01 +01:00
Narr the Reg
ff11fdb07e
Revert "yuzu: config: Remove player 8 and 9 from config file" 2023-02-26 14:39:13 -06:00
liamwhite
26c1edf2f0
Merge pull request #9849 from ameerj/async-astc
texture_cache: Add asynchronous ASTC texture decoding
2023-02-26 09:20:12 -05:00
Narr the Reg
60688bf0d5 yuzu: config: Remove player 8 and 9 from config file 2023-02-25 22:20:32 -06:00
ameerj
b5bcd8c71b configuration: Add async ASTC decode setting 2023-02-22 18:21:09 -05:00
ameerj
090bc588e5 texture_cache: Add async texture decoding 2023-02-22 00:26:07 -05:00
Narr the Reg
db2785082b settings: Add more input settings to the log 2023-02-21 19:48:38 -06:00
m-HD
9df92bad2a
Update settings.cpp
added missing graphical settings to RestoreGlobalState()
2023-02-12 02:58:39 +01:00
Narr the Reg
acba9a6b76 input_common: Reintroduce custom pro controller support 2023-02-09 20:08:54 -06:00
ameerj
2d2522693e Revert "Merge pull request #9718 from yuzu-emu/revert-9508-hle-ipc-buffer-span"
This reverts commit 25fc5c0e11, reversing
changes made to af20e25081.
2023-02-03 00:08:45 -05:00
liamwhite
b01698775b
Revert "hle_ipc: Use std::span to avoid heap allocations/copies when calling ReadBuffer" 2023-02-02 15:53:28 -05:00
bunnei
92c5ab33b7
Merge pull request #9696 from german77/please_forgive_me_for_this_sin
input_common: Implement turbo buttons
2023-02-01 12:08:34 -08:00
german77
75e81885b0 input_common: Implement turbo buttons 2023-02-01 12:42:05 -06:00
bunnei
ed4a88bd93
Merge pull request #9508 from ameerj/hle-ipc-buffer-span
hle_ipc: Use std::span to avoid heap allocations/copies when calling ReadBuffer
2023-01-30 12:17:09 -08:00
Levi Behunin
d5fc56db4b Move to Clang Format 15
Depends on https://github.com/yuzu-emu/build-environments/pull/69

clang-15 primary run
2023-01-29 17:49:42 -07:00
Liam
619c0e70f0 polyfill_thread: satisfy execution ordering requirements of stop_callback 2023-01-27 21:34:49 -05:00
Morph
9b0563fa87 polyfill_thread: Implement StoppableTimedWait
StoppableTimedWait allows for a timed wait to be stopped immediately after a stop is requested.
This is useful in cases where long duration thread sleeps are needed and allows for immediate joining of waiting threads after a stop is requested.

Co-Authored-By: liamwhite <liamwhite@users.noreply.github.com>
2023-01-25 16:43:04 -05:00
bunnei
44b981fd3e
Merge pull request #9662 from abouvier/cmake-llvm
cmake: prefer system llvm library
2023-01-24 11:03:14 -08:00
liamwhite
a68af583ea
Merge pull request #9492 from german77/joycon_release
Input_common: Implement custom joycon driver v2
2023-01-24 09:29:37 -05:00
Alexandre Bouvier
34b1ea9c19 cmake: prefer system llvm library 2023-01-23 06:23:00 +01:00
liamwhite
9705094a57
Merge pull request #9613 from Kelebek1/demangle
Add stacktrace symbol demangling
2023-01-22 13:13:58 -05:00
german77
527dad7097 input_common: Use DriverResult on all engines 2023-01-19 18:05:22 -06:00
Narr the Reg
2d802893e7 input_common: Disable SDL driver with switch controllers 2023-01-19 18:05:20 -06:00
Narr the Reg
d80e6c399b input_common: Initial skeleton for custom joycon driver 2023-01-19 18:05:20 -06:00
Kelebek1
42b16bb33a Be careful of mangled out of bounds read 2023-01-14 19:53:55 +00:00
Kelebek1
ce0b8d618d Move demangle impl to cpp 2023-01-14 05:12:41 +00:00
Kelebek1
80a55c1663 Add stacktrace symbol demangling 2023-01-14 04:43:21 +00:00
Matías Locatti
d7dbd8e774
Update settings.h 2023-01-13 04:56:25 -03:00
Matías Locatti
4294429a07
CPP 2023-01-13 04:55:26 -03:00
Matías Locatti
3ba53f2511 1.5X resolution scaler option 2023-01-13 02:34:24 -03:00
Liam
0df43e4e07 renderer_vulkan: disable turbo by default 2023-01-08 11:38:30 -05:00
bunnei
66e4a48b75
Merge pull request #9563 from german77/crash_not_allowed
input_common: Create an update engine
2023-01-07 13:41:27 -08:00
liamwhite
020dbcdbc7
Merge pull request #9552 from liamwhite/turbo
vulkan: implement 'turbo mode' clock booster
2023-01-06 09:59:59 -05:00
Narr the Reg
8042ce7e19 input_common: Create an update engine 2023-01-05 19:24:29 -06:00
Wollnashorn
8945fafcc0 config: Set the Vulkan driver pipeline cache option to be global 2023-01-05 21:03:01 +01:00
Wollnashorn
f4626512ff config: Better wording for VK pipeline cache option and enable by default 2023-01-05 21:03:01 +01:00
Wollnashorn
16809c1fa7 video_core/vulkan: Added VkPipelineCache to store Vulkan pipelines
As an optional feature which can be enabled in the advanced graphics configuration, all pipelines that get built at the initial shader loading are stored in a VkPipelineCache object and are dumped to the disk.

These vendor specific pipeline cache files are located at `/shader/GAME_ID/vulkan_pipelines.bin`. This feature was mainly added because of an issue with the AMD driver (see yuzu-emu#8507) causing invalidation of the cache files the driver builds automatically.
2023-01-05 21:02:44 +01:00
Liam
a4269c285a common: add setting for renderer clock workaround 2023-01-04 22:22:01 -05:00
Fernando Sahmkow
3ecc03ec1b yuzu-ui: Add setting for disabling macro HLE 2023-01-04 14:56:52 -05:00
Fernando Sahmkow
a0c697124c Video_core: Address feedback 2023-01-04 14:39:42 -05:00
Fernando Sahmkow
d09aa0182f MacroHLE: Final cleanup and fixes. 2023-01-01 16:43:58 -05:00
Fernando Sahmkow
18637766ef MacroHLE: Reduce massive calculations on sizing estimation. 2023-01-01 16:43:57 -05:00
Merry
fd1831b65b host_memory: Use transparent huge pages where available 2023-01-01 11:40:35 +00:00
Merry
4d7be85e73 host_memory: Allocate virtual_base with MAP_NORESERVE
Specify that we do not require swap to be reserved for this address range;
allow overcommitting.
2023-01-01 11:40:35 +00:00
ameerj
fbc375f0de fsp_srv: Use ReadBufferSpan 2022-12-25 13:21:15 -05:00
ameerj
c6590ad07b scratch_buffer: Explicitly defing resize and resize_destructive functions
resize keeps previous data intact when the buffer grows
resize_destructive destroys the previous data when the buffer grows
2022-12-19 22:40:50 -05:00
ameerj
64869807e2 tests: Add ScratchBuffer tests 2022-12-19 18:08:04 -05:00
ameerj
cfc34dd41d common: Add ScratchBuffer class
This class creates a default initialized heap allocated buffer for cases where value initializing members during allocation or resize
is redundant.
2022-12-19 18:07:51 -05:00
ameerj
88ba5a7f22 common: add make_unique_for_overwrite 2022-12-19 18:07:42 -05:00
Matías Locatti
fd1ea0fd84
Enable compiler optimizations and enforce x86-64-v2 on GCC/Clang (#9442)
* Testing LTO (#4)

* Testing LTO

* clang

* linux

* Added the rest of Blinkhawk's optimizations

* Unlikely asserts

* Removing LTO from Linux builds - GCC

* Removing LTO from Linux builds - Clang
2022-12-17 17:16:52 -08:00
Chloe Marcec
c5f519e1e4 Set: Allow setting device nickname 2022-12-13 19:54:17 -05:00
bunnei
339a37f8cb
Merge pull request #9398 from liamwhite/fail
general: improve handling of system startup failure
2022-12-12 14:37:42 -08:00
Mai
d5684dbe7d
Merge pull request #9415 from liamwhite/dc
memory: correct semantics of data cache management operations
2022-12-11 21:09:31 +00:00
Liam
ed37192441 memory: correct semantics of data cache management operations 2022-12-11 12:46:34 -05:00
Liam
5b837157bd video_core: Integrate SMAA
Co-authored-by: goldenx86 <goldenx86@users.noreply.github.com>
Co-authored-by: BreadFish64 <breadfish64@users.noreply.github.com>
2022-12-08 17:17:45 -05:00
Liam
9704acb982 general: improve handling of system startup failure 2022-12-06 16:13:42 -05:00
merry
e1f5f4bdea
Merge pull request #9370 from liamwhite/break-unmapped
core: add option to break on unmapped access
2022-12-06 20:20:20 +00:00
liamwhite
3b19f741bd
Merge pull request #6833 from abouvier/unbundle
cmake: prefer system libraries
2022-12-05 12:26:09 -05:00
liamwhite
522e7c5663
Merge pull request #9273 from ameerj/per-game-profile
Configuration: Add per-game input profiles
2022-12-04 13:38:01 -05:00
Alexandre Bouvier
8e17b5469f cmake: prefer system libraries 2022-12-04 17:09:25 +01:00
bunnei
f77cc6c412
Merge pull request #9344 from liamwhite/null
video_core: add null backend
2022-12-03 11:23:25 -08:00
liamwhite
75e16547f8
Merge pull request #9300 from ameerj/pch
CMake: Use precompiled headers to improve compile times
2022-12-03 14:10:06 -05:00
liamwhite
22aff09b33
Merge pull request #9289 from liamwhite/fruit-company
general: fix compile for Apple Clang
2022-12-03 12:09:21 -05:00
Liam
6072b22a0b core: add option to break on unmapped access 2022-12-02 08:25:45 -05:00
ameerj
5b5612c1cc CMake: Consolidate common PCH headers 2022-11-30 18:30:30 -05:00
ameerj
3c39c0ac3e string_util: Fix Mingw compile error
Co-Authored-By: liamwhite <9658600+liamwhite@users.noreply.github.com>
2022-11-30 18:26:26 -05:00
ameerj
37bc5118ea CMake: Use precompiled headers 2022-11-29 18:50:49 -05:00
Liam
89dd7dc180 video_core: add null backend 2022-11-28 19:49:09 -05:00
Morph
bbb963a31a
Merge pull request #9339 from lioncash/cacheheader
common/cache_management: Amend header includes
2022-11-28 13:12:20 -05:00
Lioncash
c2c9b44749 common/cache_management: Amend header includes
Narrows the include in the header to <cstddef>, since that's what houses
size_t's definition, meanwhile the <cstdint> include can be moved into
the cpp file.
2022-11-28 10:19:53 -05:00
Lioncash
2ec7d0b5fd common/input: Add helpers functions for creating input and output devices
Avoids the redundancy of needing to explictly specify the common
namespace and the type.
2022-11-28 10:00:37 -05:00
Lioncash
7f42432f42 common/input: Pass ParamPackage by const reference in CreateDevice
This was previously being passed by value, which was unnecessary and
created more allocations than necessary.
2022-11-28 09:11:58 -05:00
bunnei
3ab8d9ac7c
Merge pull request #9276 from goldenx86/fsrSlider
FSR Sharpening Slider
2022-11-27 00:13:15 -08:00
Matías Locatti
701ca96827
Oops 2022-11-26 17:39:43 -03:00
Matías Locatti
26211ac339
Replace GLSL as the default OpenGL shader backend
GLASM is not very compatible with the latest games, and too many people have the special superpower to break their Vulkan support.
2022-11-26 17:27:04 -03:00
lat9nq
b670c350e4 settings: Reset FSR sharpening global state with the others 2022-11-25 22:42:24 -05:00
Matías Locatti
f209e976f4 FSR Sharpening Slider part 1 - only a global slider 2022-11-24 04:22:13 -05:00
Liam
9737615948 general: fix compile for Apple Clang 2022-11-22 22:22:28 -05:00
ameerj
9efdad6a27 Configuration: Add per-game input profiles 2022-11-20 14:06:31 -05:00
bunnei
1fb33bd1e1
Merge pull request #9234 from liamwhite/data-cash-money
kernel: implement data cache management operations
2022-11-18 13:18:36 -08:00
Morph
e5a446a0df
Merge pull request #9229 from Docteh/achy_breaky_heart
Add break for default cases
2022-11-17 19:20:18 -05:00
Kyle Kienapfel
6fa3faec65 Add break for default cases
Visual Studio has an option to search all files in a solution, so I
did a search in there for "default:" looking for any missing break
statements.

I've left out default statements that return something, and that throw
something, even if via ThrowInvalidType. UNREACHABLE leads towards throw

R_THROW macro leads towards a return
2022-11-13 16:30:55 -08:00
Liam
70ea1c2000 common: add cache management functions 2022-11-12 11:26:56 -05:00
Matías Locatti
69768ec71e Add CPU core count to log files 2022-11-11 23:50:48 -03:00
bunnei
d05b183f21
Merge pull request #9198 from liamwhite/arm64
Initial ARM64 support
2022-11-10 17:11:27 -08:00
Liam
cbaf642ffe Initial ARM64 support 2022-11-09 16:58:49 -05:00
Enrico Mancuso
d581a4a367
Add break statement in default cases
According to the contributing page (https://github.com/yuzu-emu/yuzu/wiki/Contributing) the default cases should have a break statement

default:
        // Yes, even break for the last case
        break;
2022-11-09 15:34:26 +01:00
Morph
8b4d5aeb4f concepts: Use the std::contiguous_iterator concept
This also covers std::span, which does not have a const iterator.

Also renames IsSTLContainer to IsContiguousContainer to explicitly convey its semantics.
2022-10-26 00:41:54 -04:00
liamwhite
77803d96be
Merge pull request #9107 from german77/gidoly_rules
input_common: cache vibration tests
2022-10-25 12:13:18 -04:00
Morph
3822e31323 CMakeLists: Disable C4100 and C4324
Disabling C4100 is similar to -Wno-unused-parameter
2022-10-22 15:02:04 -04:00
Morph
cae108404a CMakeLists: Remove redundant warnings
These warnings are already included in /W3.
2022-10-22 15:02:04 -04:00
Morph
f3c40f4a20 CMakeLists: Treat MSVC warnings as errors 2022-10-22 15:02:04 -04:00
Morph
e6ab1f673b general: Enforce C4800 everywhere except in video_core 2022-10-22 15:02:04 -04:00
Morph
93297d14d8 CMakeLists: Remove all redundant warnings
These are already explicitly or implicitly set in src/CMakeLists.txt
2022-10-22 15:02:04 -04:00
german77
7f66050f0c input_common: cache vibration tests 2022-10-21 00:24:08 -05:00
Lioncash
6e1c6297a3 fixed_point: Mark default constructor as constexpr
Ensures that a fixed-point value is always initialized

This likely also fixes several cases of uninitialized values being
operated on, since we have multiple areas in the codebase where the
default constructor is being used like:

Common::FixedPoint<50, 14> current_sample{};

and is then followed up with an arithmetic operation like += or
something else, which operates directly on FixedPoint's internal data
member, which would previously be uninitialized.
2022-10-18 16:06:50 -04:00
Lioncash
b6119a55f9 fixed_point: Mark copy/move assignment operators and constructors as constexpr
Given these are just moving a raw value around, these can sensibly be
made constexpr to make the interface more useful.
2022-10-18 16:06:50 -04:00
Lioncash
0cfd90004b fixed_point: Mark std::swap and move constructor as noexcept
These shouldn't throw and can influence how some standard algorithms
will work.
2022-10-18 16:06:50 -04:00
Lioncash
2cc9d94060 fixed_point: Mark relevant member function [[nodiscard]]
Marks member functions as discard, where ignoring the return value would
be indicative of a bug or dead code.
2022-10-18 16:06:50 -04:00
Lioncash
0101ef9fb1 fixed_point: Make to_uint() non-const
This calls round_up(), which is a non-const member function, so if a
fixed-point instantiation ever calls to_uint(), it'll result in a
compiler error.

This allows the member function to work.

While we're at it, we can actually mark to_long_floor() as const, since
it's not modifying any member state.
2022-10-18 16:06:50 -04:00
Lioncash
9393f90ccf fixed_point: Use defaulted comparisons
Collapses all of the comparison functions down to a single line.
2022-10-18 16:06:50 -04:00
Lioncash
5000d814af fixed_point: Use variable templates and concepts where applicable
Makes a few things a little less noisy and removes the need for SFINAE
in quite a few functions.
2022-10-18 16:06:46 -04:00
bunnei
8649c46c74
Merge pull request #9054 from Docteh/just_lz4
CMake: Try add_library "lz4" if "lz4::lz4" is unavailable
2022-10-17 22:51:26 -07:00
Morph
88ccdaf10a fixed_point: Replace CONSTEXPR14 with constexpr
As we require the latest C++ standards to compile yuzu, checking for C++14 constexpr is not needed.
2022-10-17 03:16:54 -04:00
Morph
bffbaddb79 general: Add missing pragma once 2022-10-17 03:14:31 -04:00
Kyle Kienapfel
40af1111c2 CMake: Try add library "LZ4::lz4_shared" if "lz4::lz4" is unavailable
Right now this looks like a distro specific problem, but we'll have to see.

Over on Gentoo: with lz4 1.9.3 there is a lz4::lz4 library target, with 1.9.4 it's no longer
mentioned in the cmake files provided by the  package. (/usr/lib64/cmake/lz4)

arch and openSUSE have lz4 1.9.4 available so I checked there,
they only have .pc files for pkg-config, so asking for "lz4::lz4" works as usual

MSVC does require "lz4::lz4" to be asked for
2022-10-13 17:23:47 -07:00
Morph
e2164f3417 settings: Update aspect_ratio range
Since 16:10 was added, the maximum value is now 4.
2022-10-13 12:24:04 -04:00
german77
224a19758e input_common: have an unique vector in callback status 2022-10-09 12:49:18 -05:00
Fernando Sahmkow
ca3db0d7c9 General: address feedback 2022-10-06 21:00:54 +02:00
Liam
c80ed6d81f general: rework usages of UNREACHABLE macro 2022-10-06 21:00:54 +02:00
Morph
11e1cbbdbd address_space: Rename va_start to virt_start
Avoids conflicting with the va_start macro
2022-10-06 21:00:54 +02:00
Morph
fa342cae22 address_space: Address feedback 2022-10-06 21:00:54 +02:00
Morph
fedd983f96 general: Format licenses as per SPDX guidelines 2022-10-06 21:00:54 +02:00
Fernando Sahmkow
fe24c65153 General: Fix clang format. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow
1a9b71b1c6 Common: Fix variable shadowing. 2022-10-06 21:00:53 +02:00
Liam White
afab6c143c General: Fix compilation for GCC 2022-10-06 21:00:53 +02:00
bunnei
f5fd6b5c86 DMA & InlineToMemory Engines Rework. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow
4d60410dd9 MemoryManager: initial multi paging system implementation. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow
e462191482 Refactor VideoCore to use AS sepparate from Channel. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow
feb49c822d NVDRV: Remake ASGPU 2022-10-06 21:00:52 +02:00
Fernando Sahmkow
cbaf3fb433 VideoCore: Update MemoryManager 2022-10-06 21:00:51 +02:00
Fernando Sahmkow
b617874724 Common: implement MultiLevelPageTable. 2022-10-06 21:00:51 +02:00
Fernando Sahmkow
3cbe352c18 NVDRV: Refactor and add new NvMap. 2022-10-06 21:00:51 +02:00
Liam
35d3e7db2a common: remove "yuzu:" prefix from thread names 2022-10-03 18:43:56 -04:00
german77
3ce0ef04dd service: nfp: address comments 2022-10-02 12:32:26 -05:00
german77
e8d71712e7 input_common: Create virtual amiibo driver 2022-10-02 12:32:26 -05:00
bunnei
465c46387d
Merge pull request #8920 from abouvier/cmake-git
cmake: fix git detection
2022-09-24 23:11:45 -07:00
lat9nq
89af4bfba8 yuzu qt: Add option to disable startup Vulkan check
The startup check apparently confuses other programs when yuzu launches
2 processes and then quickly closes one of them. Though this isn't
really our issues it's also not a big deal for me to add an option to
work around that issue.
2022-09-19 14:46:12 -04:00
Alexandre Bouvier
7239470dad cmake: fix git detection 2022-09-18 00:04:35 +02:00
bunnei
9c32f29af1
Merge pull request #8650 from Kelebek1/vsync
[Coretiming/NVNFlinger] Improve multi-core vsync timing, and core timing accuracy
2022-09-17 11:10:54 -07:00
Morph
8dafe15600
Merge pull request #8649 from lat9nq/common-position-independent
common: Use PROJECT_SOURCE_DIR to find CMakeModules
2022-09-16 12:48:53 -04:00
Morph
44ccec7846
Merge pull request #8682 from lat9nq/dumpy
yuzu qt: Add option to create Windows crash dumps
2022-09-16 12:47:51 -04:00
liushuyu
7fda6de5cb
common: do not link to xbyak on non-amd64 architectures 2022-09-13 17:19:37 -06:00
bunnei
a967c41fa0
Merge pull request #8864 from german77/toggle_analog
input_common: Add support for analog toggle
2022-09-09 20:54:01 -07:00
lat9nq
0cef3b47f3
Merge pull request #8819 from liamwhite/cash-money
video_core: add option for pessimistic flushing
2022-09-08 22:46:58 -04:00
Narr the Reg
2898be69f4 input_common: Add support for analog toggle 2022-09-06 11:21:28 -05:00
lat9nq
f958cbc737 yuzu: Use a debugger to generate minidumps
yuzu: Move mini_dump out of core

startup_checks: Better exception handling
2022-09-04 21:36:04 -04:00
bunnei
5addff8d59
Merge pull request #8822 from FearlessTobi/multiplayer-fixes
network: Fixes and improvements to the room feature
2022-09-02 10:24:32 -07:00
Kelebek1
f294b886db Silence std::aligned_storage warnings as it's deprecated in C++23,
replace it with alignas() and a C array
2022-09-01 16:50:41 +01:00
FearlessTobi
839e1faf49 yuzu: Display current game version in multiplayer room
Makes it easier for users to recognize connection errors caused by different game versions.
2022-08-27 03:31:17 +02:00
Liam
db3eb168cd video_core: add option for pessimistic flushing 2022-08-25 12:32:14 -04:00
liamwhite
064f836d1c
Merge pull request #8784 from Docteh/nosnek
code: dodge PAGE_SIZE #define
2022-08-21 12:59:01 -04:00
Kyle Kienapfel
14e9de6678 code: dodge PAGE_SIZE #define
Some header files, specifically for OSX and Musl libc define PAGE_SIZE to be a number
This is great except in yuzu we're using PAGE_SIZE as a variable

Specific example
`static constexpr u64 PAGE_SIZE = u64(1) << PAGE_BITS;`

PAGE_SIZE PAGE_BITS PAGE_MASK are all similar variables.
Simply deleted the underscores, and then added YUZU_ prefix

Might be worth noting that there are multiple uses in different classes/namespaces
This list may not be exhaustive

Core::Memory   12 bits (4096)
QueryCacheBase 12 bits
ShaderCache    14 bits (16384)
TextureCache   20 bits (1048576, or 1MB)

Fixes #8779
2022-08-19 16:08:40 -07:00
liushuyu
b00df08145
common: remove unneeded x86-specific header 2022-08-16 15:19:57 -06:00
FearlessTobi
bb84f53539 Make copyright headers SPDX-compliant 2022-08-15 20:25:42 +02:00
FearlessTobi
f80c7c4cd5 core, network: Add ability to proxy socket packets 2022-08-15 20:25:42 +02:00
Kelebek1
b25090d960 Allow audio volume up to 200% 2022-08-12 16:57:29 +01:00
Kelebek1
83a24ad638 Make coretiming waiting more accurate 2022-08-02 01:01:54 -04:00
lat9nq
260430c849 common: Use PROJECT_SOURCE_DIR to find CMakeModules
Fixes CMake configuration when yuzu is a submodule of another project.
2022-08-01 23:18:56 -04:00
Liam
ec64a94954 common: move forwarded value into SPSCQueue 2022-07-29 15:41:57 -04:00
Maide
2e46110379
Revert Coretiming PRs 8531 and 7454 (#8591) 2022-07-27 19:47:06 -04:00
Andrea Pappacoda
cdb240f3d4
chore: make yuzu REUSE compliant
[REUSE] is a specification that aims at making file copyright
information consistent, so that it can be both human and machine
readable. It basically requires that all files have a header containing
copyright and licensing information. When this isn't possible, like
when dealing with binary assets, generated files or embedded third-party
dependencies, it is permitted to insert copyright information in the
`.reuse/dep5` file.

Oh, and it also requires that all the licenses used in the project are
present in the `LICENSES` folder, that's why the diff is so huge.
This can be done automatically with `reuse download --all`.

The `reuse` tool also contains a handy subcommand that analyzes the
project and tells whether or not the project is (still) compliant,
`reuse lint`.

Following REUSE has a few advantages over the current approach:

- Copyright information is easy to access for users / downstream
- Files like `dist/license.md` do not need to exist anymore, as
  `.reuse/dep5` is used instead
- `reuse lint` makes it easy to ensure that copyright information of
  files like binary assets / images is always accurate and up to date

To add copyright information of files that didn't have it I looked up
who committed what and when, for each file. As yuzu contributors do not
have to sign a CLA or similar I couldn't assume that copyright ownership
was of the "yuzu Emulator Project", so I used the name and/or email of
the commit author instead.

[REUSE]: https://reuse.software

Follow-up to 01cf05bc75
2022-07-27 12:53:49 +02:00
FearlessTobi
61ce57b524 network, yuzu: Make copyright headers SPDX-compliant 2022-07-25 21:59:31 +02:00
FearlessTobi
6a2dcc8b3d network, yuzu: Improve variable naming and style consistency 2022-07-25 21:59:31 +02:00
german77
899c8bb330 common: multiplayer: Use GameInfo type 2022-07-25 21:59:31 +02:00
FearlessTobi
4b404191cf Address second part of review comments 2022-07-25 21:59:30 +02:00
FearlessTobi
7c3d241f0d common, core: fix -Wmissing-field-initializers 2022-07-25 21:59:30 +02:00
FearlessTobi
705f7db84d yuzu: Add ui files for multiplayer rooms 2022-07-25 21:59:28 +02:00
Narr the Reg
403bdc4daf yuzu: Add webcam support and rebase to latest master 2022-07-23 19:40:25 -05:00
german77
f19e7be6e8 input_common: Add camera driver 2022-07-23 19:38:42 -05:00
liamwhite
97729fd8e9
Merge pull request #8545 from Kelebek1/Audio
Project Andio
2022-07-23 15:20:39 -04:00
lat9nq
4b93ea59db ci,CMake: Drop Conan support for vcpkg
Between packages breaking, Conan always being a moving target for
minimum required CMake support, and now their moves to Conan 2.0 causing
existing packages to break, I suppose this was a long time coming. vcpkg
isn't without its drawbacks, but at the moment it seems easier on the
project to use for external packages.

Mostly removes the logic for Conan from the root CMakeLists file,
leaving basic find_package()'s in its place. Sets only the
find_package()'s that require CONFIG mode as necessary. clang and linux
CI now use the vcpkg toolchain file configured in the Docker container
when possible.

mingw CI turns off YUZU_TESTS because there's no way on the container to
run Windows executables on a Linux host anyway, and it's not easy to get
Catch2 there.
2022-07-22 20:54:00 -04:00
Kelebek1
458da8a948 Project Andio 2022-07-22 01:11:32 +01:00
bunnei
ba8ea95624
Merge pull request #8508 from yuzu-emu/mc-speed-limit
hle: service: nvflinger: Factor speed limit into frame time calculation.
2022-07-17 13:59:52 -07:00
bunnei
8ca8281f4f
Merge pull request #8543 from BreadFish64/use_tsc_from_caps
common/x64: Use TSC clock rate from CPUID when available
2022-07-16 23:14:38 -07:00
bunnei
02282477e7 yuzu: settings: Remove framerate cap and merge unlocked framerate setting.
- These were all somewhat redundant.
2022-07-16 23:11:39 -07:00