Commit Graph

213 Commits

Author SHA1 Message Date
Alexandre Bouvier 8768e16b6c cmake: prefer system llvm library 2023-01-23 06:23:00 +01:00
Kelebek1 a665621670 Move demangle impl to cpp 2023-01-14 05:12:41 +00:00
Kelebek1 90f546cba4 Add stacktrace symbol demangling 2023-01-14 04:43:21 +00:00
Fernando Sahmkow 12a76465b9 MacroHLE: Reduce massive calculations on sizing estimation. 2023-01-01 16:43:57 -05:00
ameerj ff76a433ab 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 80c173aba5 common: add make_unique_for_overwrite 2022-12-19 18:07:42 -05:00
Liam 47a89280bf memory: correct semantics of data cache management operations 2022-12-11 12:46:34 -05:00
Alexandre Bouvier 325a016cd2 cmake: prefer system libraries 2022-12-04 17:09:25 +01:00
ameerj fb155dbffc CMake: Consolidate common PCH headers 2022-11-30 18:30:30 -05:00
ameerj bbf3e7f313 CMake: Use precompiled headers 2022-11-29 18:50:49 -05:00
Liam 10751ff536 common: add cache management functions 2022-11-12 11:26:56 -05:00
Morph dc61af8eb1 CMakeLists: Remove redundant warnings
These warnings are already included in /W3.
2022-10-22 15:02:04 -04:00
Morph ea5b59b539 CMakeLists: Treat MSVC warnings as errors 2022-10-22 15:02:04 -04:00
Morph 9fba74d245 general: Enforce C4800 everywhere except in video_core 2022-10-22 15:02:04 -04:00
Morph 4bad20dc5f CMakeLists: Remove all redundant warnings
These are already explicitly or implicitly set in src/CMakeLists.txt
2022-10-22 15:02:04 -04:00
Kyle Kienapfel c16b8f5f59 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
Fernando Sahmkow 19d8ea6bd6 NVDRV: Remake ASGPU 2022-10-06 21:00:52 +02:00
Fernando Sahmkow 68f5643159 Common: implement MultiLevelPageTable. 2022-10-06 21:00:51 +02:00
Alexandre Bouvier 8a1d99e72d cmake: fix git detection 2022-09-18 00:04:35 +02:00
Morph f013dea5aa 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
liushuyu 49e1d6f43c common: do not link to xbyak on non-amd64 architectures 2022-09-13 17:19:37 -06:00
FearlessTobi ce5b9d370d core, network: Add ability to proxy socket packets 2022-08-15 20:25:42 +02:00
lat9nq c6d7699e40 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
Andrea Pappacoda 6a2efdda2f 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 b2eb103829
2022-07-27 12:53:49 +02:00
FearlessTobi 60008b680e yuzu: Add ui files for multiplayer rooms 2022-07-25 21:59:28 +02:00
liamwhite 47ad0e8b21 Merge pull request #8545 from Kelebek1/Audio
Project Andio
2022-07-23 15:20:39 -04:00
lat9nq 325a6e4aa7 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 be1f5f1d9f Project Andio 2022-07-22 01:11:32 +01:00
Liam 8f979d453d common: consolidate ELF structure definitions 2022-06-05 09:42:05 -04:00
liushuyu 479d57987c logging/log.h: move enum class formatter to a separate file ...
... to common/logging/formatter.h
2022-01-09 17:35:33 -07:00
Andrew Udvare 31c8b5013c 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
german77 cb6b6189d7 common: Rewrite and move core/frontend/input.h to common 2021-11-24 20:30:21 -06:00
Morph 7c8824d6e4 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
ameerj f222d1e4ce 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
Morph c0ff1dce0b 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
Morph 88fa692ae6 Revert "logging: Display backtrace on crash" 2021-08-27 04:01:22 -04:00
yzct12345 133e23fe1c 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
bunnei 0a328423e8 Merge pull request #6585 from ameerj/hades
Shader Decompiler Rewrite
2021-07-25 11:39:04 -07:00
lat9nq 0ea70212af common: Publically link to pthreads
Common requires pthreads but does not refer to it when linking to other
modules. Fix this by linking to Threads where necessary.
2021-07-23 09:47:52 -04:00
ReinUsesLisp 2e6acac647 cmake: Remove shader cache version 2021-07-22 21:51:40 -04:00
ReinUsesLisp 65069df8aa shader: Remove old shader management 2021-07-22 21:51:22 -04:00
ReinUsesLisp efd62f7130 common/thread_worker: Add support for stateful threads 2021-07-08 19:03:26 -03:00
ReinUsesLisp 3a0e4487ba common: Add unique function 2021-07-08 19:03:19 -03:00
Wunkolo 722f9c3cb5 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
Morph 5c635f8d09 common: logging: Restructure backend code 2021-06-13 11:05:58 -04:00
ReinUsesLisp 1f0491900b common/host_memory: Add interface and Windows implementation 2021-06-11 17:27:06 +02:00
liushuyu 44a2374808 src/common/CMakeLists.txt: fix variable escaping 2021-06-09 02:20:55 -06:00
Lioncash f49ea1959b common: Extract point into a common struct
This is generic enough that it can be moved into the Common class for
reuse.
2021-05-28 08:12:49 -04:00
Morph e8f1d7145e 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
bunnei 7a76bc30fa common: Move settings to common from core.
- Removes a dependency on core and input_common from common.
2021-04-14 16:24:03 -07:00