Commit graph

16187 commits

Author SHA1 Message Date
ReinUsesLisp
2c8d337418 common: Add unique function 2021-07-08 19:03:19 -03:00
ReinUsesLisp
f28dd32275 common/thread_worker: Add wait for requests method 2021-07-08 19:00:39 -03:00
lat9nq
dc06e11a7b settings, arm_dynarmic, yuzu qt: Move CPU debugging option
Decouples the CPU debugging mode from the enumeration to its own
boolean. After this, it moves the CPU Debugging tab over to a sub tab
underneath the Debug tab in the configuration UI.
2021-07-08 16:56:44 -04:00
lat9nq
eebf39b3c0 arm_dynarmic_64: Re-add fastmem_address_space_bits to Auto setting 2021-07-08 15:14:45 -04:00
Lioncash
5c541b0b42 qt/main: Make title string more i18n-friendly
Currently, whether or not the title is 32-bit or 64-bit was being
appended as a suffix to the title, which is fine for left-to-right
languages, but may not always fly so smoothly with some right-to-left
languages.

We also weren't marking that portion of the string as translatable,
which prevents translators from translating part of the title string.
2021-07-08 15:06:16 -04:00
lat9nq
c8b8674ffc settings, yuzu qt: Add migration code for CPU accuracy
Old CPU Accuracy setting won't translate well into since we're adding
one at the beginning of the list. On first boot with the new setting,
just use the default setting.
2021-07-08 14:56:09 -04:00
lat9nq
87b6e14d7c arm_dynarmic{32,64}: Fixes from test build
Now sets optimizations regardless of the Settings. Drops unsafe fastmem
optimization.
2021-07-08 14:56:09 -04:00
lat9nq
7ab5767157 core,common,yuzu qt: Add CPU accuracy option 'Auto'
The current CPU accuracy settings in yuzu are fairly polarized and
require more than common knowledge to know what the optimal settings for
yuzu would be. This adds a curated option called 'Auto' that applies a
few at the moment known-good unsafe optimizations to Dynarmic.
2021-07-08 14:56:09 -04:00
Ameer J
5edc96f4a4
Merge pull request #6539 from lat9nq/default-setting
general: Move most settings' defaults and labels into their definition
2021-07-08 14:46:31 -04:00
lat9nq
a949ee0410 general: Code formatting improvements
Slight improvements to readability.

Dropped suggestions for string_view (settings.h:101), pass by value
(settings.h:82), reverting double to a float (config.cpp:316), and other
smaller ones, some out of scope.

Addresses review feedback.

Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com>
2021-07-08 14:07:10 -04:00
Feng Chen
c7ad195fd3
Out of bound blit (#6531)
* Fix out of bound blit error

* Fix code read

* Fix ci error

Co-authored-by: Feng Chen <chen.feng@gloritysolutions.com>
2021-07-08 11:06:09 -07:00
Kelebek1
7905eb0254 Replace NaN mix volume samples with silence.
Fixes Xenoblade Chronicles 2 blowing out the audio.
2021-07-08 17:42:15 +01:00
Morph
92a3daf029
Merge pull request #6564 from Kelebek1/Audio
Support more PCM formats
2021-07-08 12:14:58 -04:00
Morph
91a4a924b1
Merge pull request #6569 from Kelebek1/Vol
audio_core: Preserve front channel volume after 6 to 2 downmix
2021-07-08 12:09:21 -04:00
Kelebek1
7636fefb71 audio_core: Preserve front channel volume after 6 to 2 downmix
Many games report 6 channel output while only providing data for 2. We only output 2-channel audio regardless, and in the downmixing, front left/right only provide 36% of their volume. This is done assuming all of the other channels also contain valid data, but in many games they don't. This PR alters the downmixing to preserve front left/right, so volume is not lost.

This improves volume in Link's Awakening, New Super Mario Bros U, Disgaea 6, Super Kirby Clash.
2021-07-08 17:07:23 +01:00
bunnei
8542f2f3fc
Merge pull request #6567 from Kelebek1/Audio2
[audren] Report 2 channels active rather than 1
2021-07-07 14:52:08 -07:00
lat9nq
2f0e1f5d02 util_shaders: Fix BindImageTexture
According to
https://gitlab.freedesktop.org/mesa/mesa/-/issues/3820#note_753371 we
need to set these to true for use with 3D textures.

Fixes BOTW teleporting on RadeonSI and iris.
2021-07-07 14:09:55 -04:00
bunnei
2eb018c80f
Merge pull request #6562 from Morph1984/flush-behavior
common: fs: More misc. changes
2021-07-07 00:40:31 -07:00
bunnei
eb3cb3af35
Merge pull request #6497 from FernandoS27/scotty-doesnt-know
GPU Memory Manager - Correct handling of non continuous backing memory.
2021-07-06 17:26:21 -07:00
Kelebek1
b9f915e07a Report 2 channels active. Fixes Tales of Vesperia's mono channel audio. 2021-07-06 18:52:49 +01:00
Kelebek1
dbcc093d88 Support more PCM formats. Fixes Ys IX audio. 2021-07-06 18:43:23 +01:00
Morph
ebb82b0b83 CMakeLists: Treat -Wsign-compare as an error on GCC/Clang
Treats (un)signed comparison mismatches as errors to be consistent with MSVC
2021-07-06 12:50:09 -04:00
Morph
a59ae5e702 common: logging: backend: Close the file after exceeding the write limit
There's no point in keeping the file open after the write limit is exceeded. This allows the file to be committed to the disk shortly after it is closed and avoids redundantly checking whether or not the write limit is exceeded.
2021-07-06 05:59:47 -04:00
Morph
14ab50defb common: fs: file: Revert Flush to its previous behavior and add Commit
It became apparent that logging can continuously spam errors that trigger file flushing.
Since committing the files to disk is an expensive operation, this causes unnecessarily high disk usage.
As such, we will revert Flush() to the previous behavior and add a Commit() member function in the event that this behavior is needed.
2021-07-06 05:59:47 -04:00
Morph
d299d5531f common: fs: file: Flush the file in GetSize
This ensures that GetSize always retrieves the correct file size after a write operation.
2021-07-06 05:59:47 -04:00
bunnei
bf50345d4c
Merge pull request #6537 from Morph1984/warnings
general: Enforce multiple warnings in MSVC
2021-07-05 17:09:23 -07:00
bunnei
3d03a6ae02
Merge pull request #6556 from Morph1984/default-mii
service: mii: Retrieve the correct default miis.
2021-07-05 13:51:00 -07:00
Ameer J
c770fa9823
Merge pull request #6540 from Kelebek1/nvdec
Slightly refactor NVDEC and codecs for readability and safety
2021-07-05 16:06:09 -04:00
Morph
942c0d6cdd
Merge pull request #6561 from german77/analog_fix
input_common: Add missing modifier callback to analog from button
2021-07-05 12:47:42 -04:00
german77
c19ec2edd9 input_common: Add missing modifier callback to analog from button 2021-07-05 11:39:42 -05:00
german77
b188d7792a profiler: Fix deprecated functions 2021-07-05 10:15:35 -05:00
Mai M
669cef2da3
Merge pull request #6552 from Morph1984/c4189-msvc
CMakeLists: Enforce C4189 on MSVC
2021-07-04 22:16:28 -04:00
Fernando Sahmkow
c6a9e91784 Texture Cache: Fix collision with multiple overlaps of the same sparse texture. 2021-07-04 22:32:36 +02:00
Fernando Sahmkow
a8a0927d42 Texture Cache: Fix GCC & Clang. 2021-07-04 22:32:35 +02:00
Fernando Sahmkow
8f9f142956 Texture Cache: Address feedback. 2021-07-04 22:32:35 +02:00
Fernando Sahmkow
fd98fcf7f0 Texture Cache: Improve accuracy of sparse texture detection. 2021-07-04 22:32:35 +02:00
Fernando Sahmkow
38165fb7e3 Texture Cache: Initial Implementation of Sparse Textures. 2021-07-04 22:32:03 +02:00
Morph
5dfa313d2c service: mii: Retrieve the correct default miis.
We were including the first 2 default miis which are not meant to be shown in games. With this change, we properly retrieve the 6 default miis shown in games, with 3 of each gender.
2021-07-04 05:38:34 -04:00
Fernando Sahmkow
0aab55d26a TextureCacheOGL: Implement Image Copies for 1D and 1D Array. 2021-07-03 14:40:29 +02:00
Fernando Sahmkow
ebaa7e391c TextureCache: Fix 1D to 2D overlapps. 2021-07-03 14:01:54 +02:00
Morph
3a3f4983b6 CMakeLists: Enforce C4189
This supplements C4101 by detecting initialized but unreferenced local variables
2021-07-03 05:51:31 -04:00
bunnei
2fc0a760f0
Merge pull request #6498 from Kelebek1/Audio
[audio_core] Decouple audio update and processing, and process at variable rate
2021-07-03 00:24:33 -07:00
lat9nq
38f658d21e config: Read UISettings as basic settings
I must have been asleep or something. These need to be read with the new
ReadBasicSetting function.
2021-07-02 01:06:30 -04:00
lat9nq
cf1cd3321d settings: Set resolution_factor default to 1
Fixes Disgaea 6 Demo issues.
2021-07-01 12:06:12 -04:00
Kelebek1
208a04dcff Slightly refactor NVDEC and codecs for readability and safety 2021-07-01 06:22:05 +01:00
Kelebek1
b455043e45 Fix XC2/VOEZ crashing, add audio looping and a few misc fixes 2021-07-01 06:01:01 +01:00
Ameer J
bab400daaf
Merge pull request #6459 from lat9nq/ubuntu-fixes
cmake: Improve Linux dependency checking for externals
2021-06-30 21:47:57 -04:00
lat9nq
299c5594e6 yuzu_cmd: config: Pass a reference in
Also adds documentation for the ReadSetting function.

Address review comments.

Co-authored-by: Mai M. <mathew1800@gmail.com>
2021-06-30 20:16:01 -04:00
Morph
39be4c3026
Merge pull request #6471 from lat9nq/dump-as-mod
yuzu qt, core: Support LayeredFS mods from SDMC directory
2021-06-29 00:10:31 -04:00
lat9nq
0e5c74bc9e core, input_common: Miscellaneous fixes
bcat: Fix settings access

telemetry_session: Fix settings accesses

So this is what I get for testing with the web service disabled.

touch_from_button: Fix settings access for clang
2021-06-28 20:56:17 -04:00
lat9nq
7a8de138df yuzu qt: Make most UISettings a BasicSetting
For simple primitive settings, moves their defaults and labels to
definition time.

Also fixes typo and clang-format

yuzu qt: config: Fix rng_seed
2021-06-28 19:13:53 -04:00
lat9nq
b91b76df4f general: Make most settings a BasicSetting
Creates a new BasicSettings class in common/settings, and forces setting
a default and label for each setting that uses it in common/settings.
Moves defaults and labels from both frontends into common settings.
Creates a helper function in each frontend to facillitate reading the
settings now with the new default and label properties.

Settings::Setting is also now a subclass of Settings::BasicSetting. Also
adds documentation for both Setting and BasicSetting.
2021-06-28 17:32:17 -04:00
Morph
ec68cba440
Merge pull request #6502 from ameerj/vendor-title
main: Add GPU Vendor name to running title bar
2021-06-28 14:51:49 -04:00
Morph
248a146ab7 CMakeLists: Disable all warnings for external headers
This lets us avoid needing to wrap external headers with #pragma warning directives for warnings we treat as errors and avoids generating warnings for external code.

Thanks to MerryMage for pointing this out.
2021-06-28 14:24:28 -04:00
Morph
22d7b89c15 video_core: Remove #pragma warning directives for external headers 2021-06-28 14:21:40 -04:00
Morph
954259312e input_common: Remove #pragma warning directives for external headers 2021-06-28 14:20:25 -04:00
Morph
0eae00e263 CMakeLists: Enforce C4018, C4267, C4305, C4389 2021-06-28 14:20:25 -04:00
Morph
e828c5a559 core: Enforce C4242 2021-06-28 14:20:25 -04:00
Morph
58550cfcdc input_common: Enforce C4242 2021-06-28 14:20:25 -04:00
Morph
a47704f4dd video_core: Enforce C4242 2021-06-28 14:20:25 -04:00
Morph
511ee03a21 patch_manager: Do not apply LayeredFS mods when dumping
We should not apply any mods when dumping a game's RomFS.
2021-06-28 10:14:36 -04:00
Morph
6ac978426c filesystem: Open a read-only directory for SDMC mods
This prevents mod files from being locked due to the read-only share flag in Windows.
2021-06-28 10:08:08 -04:00
lat9nq
844e0114b0 core: Simplify SDMC mod loading
If someone else wants to support other mod formats in the SDMC
directory, that can be added later. For now, just allow RomFS modding
here and force people to do other types of mods the old way.

Addresses review comments.

Co-authored-by: LC <mathew1800@gmail.com>
2021-06-28 10:08:08 -04:00
lat9nq
1664c74a6c core: Support LayeredFS mod from SDMC directory
Enables loading a mod directly from `[yuzu data
directory]/sdmc/atmosphere/contents/[title_id]`. For use with some
homebrew mod managers.
2021-06-28 10:08:07 -04:00
lat9nq
bfecd395d4 yuzu qt: Add option to dump to SDMC directory
Enables dumping the RomFS to SDMC directory, specifically '[yuzu data
directory]/sdmc/atmosphere/contents/[title_id]/romfs'.
2021-06-28 10:08:07 -04:00
Morph
d3d6613d33 video_core: Silence signed/unsigned mismatch warnings 2021-06-28 09:21:42 -04:00
ameerj
4cee25281f main: Display the instruction set of the running title in the window name
Displays whether the currently running title uses 64-bit instructions or only 32-bit instructions.
2021-06-28 00:37:24 -04:00
Kelebek1
0857d6a3db Decouple audio processing and run at variable rate
Currently, processing of audio samples is called from AudioRenderer's Update method, using a fixed 4 buffers to process the given samples. Games call Update at variable rates, depending on framerate and/or sample count, which causes inconsistency in audio processing. From what I've seen, 60 FPS games update every ~0.004s, but 30 FPS/160 sample games update somewhere between 0.02 and 0.04, 5-10x slower. Not enough samples get fed to the backend, leading to a lot of audio skipping.

This PR seeks to address this by de-coupling the audio consumption and the audio update. Update remains the same without calling for buffer queuing, and the consume now schedules itself to run based on the sample rate and count.
2021-06-27 15:58:07 +01:00
Morph
4df04ad48a
Merge pull request #6529 from ReinUsesLisp/reaper-fixups
buffer_cache,texture_cache: Misc fixups from the memory reaper
2021-06-27 09:33:58 -04:00
bunnei
432fab7c4f
Merge pull request #6526 from bunnei/doom-update
services: Misc. minor changes for latest SDK update.
2021-06-26 01:21:55 -07:00
bunnei
36d581ec73 hle: service: hwopus: OpenHardwareOpusDecoderEx: Remove unused buffer size. 2021-06-26 00:38:08 -07:00
lat9nq
35b17fa5e0 configuration: Defer to common/settings for per-game settings defaults
Avoids double-setting defaults, and avoids potential accidents when
inconsistently setting the default on new settings.
2021-06-26 02:45:14 -04:00
lat9nq
20e51402b0 common: Force defaults for Settings::Setting's
Requires a default value when creating each per-game setting.
2021-06-26 02:43:38 -04:00
ReinUsesLisp
9476309d53 buffer_cache: Only flush downloaded size
Fixes a regression unintentionally introduced by the garbage collector.
This makes regular memory downloads only flush the requested sizes.

This negatively affected Koei Tecmo games.
2021-06-26 03:29:34 -03:00
ReinUsesLisp
03abe8bf85 video_core: Enforce C4244
Enforce implicit integer casts to a smaller type as errors.
2021-06-26 03:29:34 -03:00
ReinUsesLisp
05bd50a1cf codec,vic: Disable warnings in ffmpeg headers 2021-06-26 03:29:31 -03:00
ReinUsesLisp
3ab5bf6454 vk_buffer_cache: Silence implicit cast warnings 2021-06-26 02:17:36 -03:00
ReinUsesLisp
b4894faeae buffer_cache/texture_cache: Make GC functions private 2021-06-26 02:17:36 -03:00
ReinUsesLisp
e79d02bf38 buffer_cache: Silence implicit cast warning 2021-06-26 02:17:36 -03:00
ReinUsesLisp
99b859db55 vulkan_device: Make device memory match the rest of the file
Match the style in the file.
2021-06-25 02:38:58 -03:00
bunnei
c805c0b395
Merge pull request #6496 from ameerj/astc-fixes
astc: Various robustness enhancements for the gpu decoder
2021-06-24 21:47:05 -07:00
bunnei
b9c2732121
Merge pull request #6519 from Wunkolo/mem-size-literal
common: Replace common_sizes into user-literals
2021-06-24 19:09:12 -07:00
bunnei
982be246ab hle: hle_helpers: Skip data payload offset checks on TIPC requests.
- TIPC does not use this.
2021-06-24 18:39:43 -07:00
bunnei
3565e32f4d hle: service: hwopus: Implement GetWorkBufferSizeEx and OpenHardwareOpusDecoderEx.
- This is used by the latest update of Doom Eternal.
2021-06-24 18:25:37 -07:00
bunnei
d1ba4a2db2 hle: service: aoc: Stub GetAddOnContentListChangedEventWithProcessId.
- This is used by the latest update of Doom Eternal.
2021-06-24 18:22:53 -07:00
bunnei
50d0cc2716 audio_core: common: Bump audio revision to 9.
- This is used in fw 12.x.x games.
2021-06-24 18:22:10 -07:00
Wunkolo
4569f39c7c common: Replace common_sizes into user-literals
Removes common_sizes.h in favor of having `_KiB`, `_MiB`, `_GiB`, etc
user-literals within literals.h.

To keep the global namespace clean, users will have to use:

```
using namespace Common::Literals;
```

to access these literals.
2021-06-24 09:27:40 -07:00
bunnei
4dc2f5a341
Merge pull request #6522 from Morph1984/pragma
general: Add missing #pragma once directives
2021-06-24 08:53:27 -07:00
Morph
eed0d1f33b general: Add missing #pragma once directives 2021-06-24 07:20:57 -04:00
Chloe
f216a9432b
Add missing includes (#6521)
* Add missing includes

* Add array
2021-06-24 03:24:17 -04:00
bunnei
1b09d6628b
Merge pull request #6517 from lioncash/fmtlib
externals: Update fmt to 8.0.0
2021-06-23 15:31:04 -07:00
bunnei
809e5fd523
Merge pull request #6504 from Kelebek1/samples-played
[audout] Implement GetAudioOutPlayedSampleCount
2021-06-23 11:31:12 -07:00
Lioncash
d0b1f2bd05 General: Resolve fmt specifiers to adhere to 8.0.0 API where applicable
Also removes some deprecated API usages.
2021-06-23 13:48:21 -04:00
bunnei
d8d9bb0dfb
Merge pull request #6518 from lioncash/func
maxwell3d: Add missing return in default SizeInBytes() case
2021-06-23 09:43:00 -07:00
Lioncash
be6844c1ed maxwell3d: Add missing return in default SizeInBytes() case
We were returning '1' in ComponentCount()'s default case but were
neglecting to do the same with SizeInBytes().
2021-06-23 11:50:40 -04:00
Mai M
17fff10e06
Merge pull request #6465 from FernandoS27/sex-on-the-beach
GPU: Implement a garbage collector for GPU Caches (project Reaper+)
2021-06-23 08:03:01 -04:00
Mai M
20f474b09a
Merge pull request #6508 from ReinUsesLisp/bootmanager-stop-token
bootmanager: Use std::stop_source for stopping emulation
2021-06-23 02:35:42 -04:00
Morph
c1a9fa9db7
Merge pull request #6514 from OZtistic/master
Simple resizing of Per-Game configuration window and removal of useless Help question mark button in the title bar
2021-06-22 23:19:13 -04:00
Mai M
d6b51e5e21
Merge pull request #6512 from ReinUsesLisp/wait-detached-stasks
common/detached_tasks: Wait for tasks before shutting down
2021-06-22 22:20:14 -04:00
Mai M
95b4c78b07
Merge pull request #6509 from ReinUsesLisp/mouse-datarace
input_common/mouse_input: Fix data race
2021-06-22 22:19:34 -04:00