Commit graph

151 commits

Author SHA1 Message Date
liamwhite d45561ace0
Merge pull request #12499 from Kelebek1/time
Rework time services
2024-01-25 14:19:01 -05:00
Kelebek1 e4915fb7d2 Rework time service to fix time passing offline. 2024-01-24 04:26:55 +00:00
Fernando Sahmkow 23430e6772 Core: Eliminate core/memory dependancies. 2024-01-18 21:12:30 -05:00
Narr the Reg aa9ff2ffc2
Merge pull request #12454 from liamwhite/ct-stuff
core_timing: minor refactors
2024-01-01 13:56:31 -06:00
Liam ddda76f9b0 core: track separate heap allocation for linux 2023-12-25 23:30:56 -05:00
Liam f34d3d7e84 core_timing: remove user data value 2023-12-23 15:36:44 -05:00
liamwhite 65e646eeba
Revert "video_core: use interval map for page count tracking" 2023-12-17 18:59:49 -05:00
Liam 030e6b3980 video_core: use interval map for page count tracking 2023-12-14 21:54:36 -05:00
GPUCode 5938a9582a core: Respect memory permissions in Map 2023-11-25 00:46:15 -05:00
Liam c5bdc0054c general: fix build failure on clang 17 2023-10-17 22:44:21 -04:00
Danila Malyutin 785e480b62 msvc: set warning level to /W4 globally
And fix a bunch of warnings
2023-09-03 18:42:10 +04:00
Fernando Sahmkow 36c302fa32 Buffer cache: always use async buffer downloads and fix regression. 2023-05-07 23:46:12 +02:00
Fernando Sahmkow d6f565e5da BufferCache: Fixes and address feedback 2023-05-01 11:43:26 +02:00
Fernando Sahmkow fff6155bc3 Tests: Add memory tracker tests. 2023-04-29 00:46:31 +02:00
Max Dunbar e446f368d7 Fixes 'Continous' typo 2023-03-29 19:26:12 -07:00
Liam 1476ffd865 tests: mark integer literals as unsigned 2023-03-26 15:39:07 -04:00
Morph f09d192aac tests: Implement tests for verifying HashValue
Values were randomly generated and the verification was done against boost 1.79.
2023-03-25 23:52:26 -04:00
Liam 600f325d87 general: fix spelling mistakes 2023-03-12 11:33:01 -04:00
ameerj eb9f16dce4 buffer_base: Partially revert changes from #9559
This fixes a regression where Yoshi's Crafted World (and potentially other titles) would enter an infinite loop when GPU Accuracy was set to "Normal"
2023-02-08 19:37:23 -05:00
liamwhite f99f618d45
Merge pull request #9555 from abouvier/catch2-update
tests: update catch2 to 3.0.1
2023-01-22 18:22:47 -05:00
Fernando Sahmkow b56ad93bbc BufferBase: Don't ignore GPU pages. 2023-01-05 14:00:10 -05:00
Alexandre Bouvier d0fe27708e tests: update catch2 to 3.0.1 2023-01-05 04:58:31 +01:00
Fernando Sahmkow 18637766ef MacroHLE: Reduce massive calculations on sizing estimation. 2023-01-01 16:43:57 -05:00
Alexandre Bouvier dce2649daf
tests: add missing header
<cstring> is needed for std::memcpy
2022-12-26 04:26:31 +00: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 5b5612c1cc CMake: Consolidate common PCH headers 2022-11-30 18:30:30 -05:00
ameerj 37bc5118ea CMake: Use precompiled headers 2022-11-29 18:50:49 -05:00
Alexandre Bouvier fa9b7db76f
tests: fix for -Wall
Fix #9123
2022-10-25 15:20:23 +00:00
bunnei a4d11f4427 core: Partially persist emulation state across game boots. 2022-10-18 19:13:35 -07: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
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 705f7db84d yuzu: Add ui files for multiplayer rooms 2022-07-25 21:59:28 +02:00
Kelebek1 240650f6a6 Rework CoreTiming 2022-07-10 06:59:40 +01:00
Liam ed0319cfed common/fiber: make fibers easier to use 2022-07-02 12:33:49 -04:00
Fernando Sahmkow 9cafb0d912 Core: Fix tests. 2022-06-28 01:10:55 +02:00
Fernando Sahmkow 846c994cc9 Core: Reimplement Core Timing. 2022-06-28 01:10:50 +02: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
Alexandre Bouvier c8b358dba2 cmake: make tests optional 2022-01-12 00:36:20 +01:00
vperus 04fa990b0c [input_common] Add completion test for CalibrationConfigurationJob 2021-11-29 16:33:12 +02: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
lat9nq 0bb85f6a75 shader_recompiler,video_core: Cleanup some GCC and Clang errors
Mostly fixing unused *, implicit conversion, braced scalar init,
fpermissive, and some others.

Some Clang errors likely remain in video_core, and std::ranges is still
a pertinent issue in shader_recompiler

shader_recompiler: cmake: Force bracket depth to 1024 on Clang
Increases the maximum fold expression depth

thread_worker: Include condition_variable

Don't use list initializers in control flow

Co-authored-by: ReinUsesLisp <reinuseslisp@airmail.cc>
2021-07-22 21:51:26 -04:00
Fernando Sahmkow 977904dd84 Buffer Cache: Address Feedback. 2021-07-10 21:34:55 +02:00
Fernando Sahmkow 0e4d4b4beb Buffer Cache: Fix High Downloads and don't predownload on Extreme. 2021-07-09 22:20:36 +02:00
ReinUsesLisp 2c8d337418 common: Add unique function 2021-07-08 19:03:19 -03: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
ReinUsesLisp 740edacc8d tests: Add tests for host memory 2021-06-11 17:27:06 +02:00
Morph 065867e2c2
common: fs: Rework the Common Filesystem interface to make use of std::filesystem (#6270)
* common: fs: fs_types: Create filesystem types

Contains various filesystem types used by the Common::FS library

* common: fs: fs_util: Add std::string to std::u8string conversion utility

* common: fs: path_util: Add utlity functions for paths

Contains various utility functions for getting or manipulating filesystem paths used by the Common::FS library

* common: fs: file: Rewrite the IOFile implementation

* common: fs: Reimplement Common::FS library using std::filesystem

* common: fs: fs_paths: Add fs_paths to replace common_paths

* common: fs: path_util: Add the rest of the path functions

* common: Remove the previous Common::FS implementation

* general: Remove unused fs includes

* string_util: Remove unused function and include

* nvidia_flags: Migrate to the new Common::FS library

* settings: Migrate to the new Common::FS library

* logging: backend: Migrate to the new Common::FS library

* core: Migrate to the new Common::FS library

* perf_stats: Migrate to the new Common::FS library

* reporter: Migrate to the new Common::FS library

* telemetry_session: Migrate to the new Common::FS library

* key_manager: Migrate to the new Common::FS library

* bis_factory: Migrate to the new Common::FS library

* registered_cache: Migrate to the new Common::FS library

* xts_archive: Migrate to the new Common::FS library

* service: acc: Migrate to the new Common::FS library

* applets/profile: Migrate to the new Common::FS library

* applets/web: Migrate to the new Common::FS library

* service: filesystem: Migrate to the new Common::FS library

* loader: Migrate to the new Common::FS library

* gl_shader_disk_cache: Migrate to the new Common::FS library

* nsight_aftermath_tracker: Migrate to the new Common::FS library

* vulkan_library: Migrate to the new Common::FS library

* configure_debug: Migrate to the new Common::FS library

* game_list_worker: Migrate to the new Common::FS library

* config: Migrate to the new Common::FS library

* configure_filesystem: Migrate to the new Common::FS library

* configure_per_game_addons: Migrate to the new Common::FS library

* configure_profile_manager: Migrate to the new Common::FS library

* configure_ui: Migrate to the new Common::FS library

* input_profiles: Migrate to the new Common::FS library

* yuzu_cmd: config: Migrate to the new Common::FS library

* yuzu_cmd: Migrate to the new Common::FS library

* vfs_real: Migrate to the new Common::FS library

* vfs: Migrate to the new Common::FS library

* vfs_libzip: Migrate to the new Common::FS library

* service: bcat: Migrate to the new Common::FS library

* yuzu: main: Migrate to the new Common::FS library

* vfs_real: Delete the contents of an existing file in CreateFile

Current usages of CreateFile expect to delete the contents of an existing file, retain this behavior for now.

* input_profiles: Don't iterate the input profile dir if it does not exist

Silences an error produced in the log if the directory does not exist.

* game_list_worker: Skip parsing file if the returned VfsFile is nullptr

Prevents crashes in GetLoader when the virtual file is nullptr

* common: fs: Validate paths for path length

* service: filesystem: Open the mod load directory as read only
2021-05-25 19:32:56 -04:00