summaryrefslogtreecommitdiff
path: root/src/common (follow)
Commit message (Collapse)AuthorAgeFilesLines
* common/fiber: Move all member variables into impl classGravatar Lioncash2020-11-062-89/+86
| | | | | | Hides all of the implementation details for users of the class. This has the benefit of reducing includes and also making the fiber classes movable again.
* General: Fix clang buildGravatar Lioncash2020-11-052-2/+10
| | | | Allows building on clang to work again
* common: Enable warnings as errorsGravatar Lioncash2020-11-029-31/+49
| | | | Cleans up common so that we can enable warnings as errors.
* Merge pull request #4868 from lioncash/discard-errorGravatar bunnei2020-10-302-5/+12
|\ | | | | General: Make ignoring a discarded return value an error
| * General: Make ignoring a discarded return value an errorGravatar Lioncash2020-10-302-5/+12
| | | | | | | | | | | | | | Allows our CI to catch more potential bugs. This also removes the [[nodiscard]] attribute of IOFile's Open member function. There are cases where a file may want to be opened, but have the status of it checked at a later time.
* | common/stream: Be explicit with copy and move operatorsGravatar Lioncash2020-10-291-3/+9
|/
* common/fiber: Take shared_ptr<Fiber> by copy in YieldToGravatar ReinUsesLisp2020-10-282-3/+3
| | | | | YieldTo does not intend to modify the passed shared_ptrs. Pass it by copy to keep a reference count while this function executes.
* video_core: NVDEC ImplementationGravatar ameerj2020-10-263-0/+99
| | | | | | | | | | | | | | This commit aims to implement the NVDEC (Nvidia Decoder) functionality, with video frame decoding being handled by the FFmpeg library. The process begins with Ioctl commands being sent to the NVDEC and VIC (Video Image Composer) emulated devices. These allocate the necessary GPU buffers for the frame data, along with providing information on the incoming video data. A Submit command then signals the GPU to process and decode the frame data. To decode the frame, the respective codec's header must be manually composed from the information provided by NVDEC, then sent with the raw frame data to the ffmpeg library. Currently, H264 and VP9 are supported, with VP9 having some minor artifacting issues related mainly to the reference frame composition in its uncompressed header. Async GPU is not properly implemented at the moment. Co-Authored-By: David <25727384+ogniK5377@users.noreply.github.com>
* core: Fix clang build pt.3Gravatar Lioncash2020-10-211-2/+2
| | | | Should finally resolve building with clang.
* Revert "core: Fix clang build"Gravatar bunnei2020-10-207-22/+13
|
* Merge pull request #4796 from lioncash/clangGravatar LC2020-10-207-13/+22
|\ | | | | core: Fix clang build
| * core: Fix clang buildGravatar Lioncash2020-10-177-13/+22
| | | | | | | | | | | | | | Recent changes to the build system that made more warnings be flagged as errors caused building via clang to break. Fixes #4795
* | input_common/CMakeLists: Make some warnings errorsGravatar Lioncash2020-10-152-11/+68
|/ | | | | Makes the input_common code warnings consistent with the rest of the codebase.
* core/CMakeLists: Make some warnings errorsGravatar Lioncash2020-10-131-5/+5
| | | | | | | | | Makes our error coverage a little more consistent across the board by applying it to Linux side of things as well. This also makes it more consistent with the warning settings in other libraries in the project. This also updates httplib to 0.7.9, as there are several warning cleanups made that allow us to enable several warnings as errors.
* Merge pull request #4731 from lat9nq/mingw-zstd-fixGravatar bunnei2020-10-071-1/+6
|\ | | | | common: Use system zstd on Linux
| * CMakeLists: use system zstd on LinuxGravatar lat9nq2020-09-281-1/+6
| | | | | | | | | | From what I understand, this tells CMake to use the system, not conan, version of zstd. Required to build on the coming MinGW Docker container.
| * CMakeLists: fix for finding zstd on linux-mingwGravatar lat9nq2020-09-281-1/+1
| |
* | common/wall_clock: Add virtual destructorsGravatar ReinUsesLisp2020-09-303-2/+4
|/ | | | | | | | From -fsanitize=address, this code wasn't calling the proper destructor. Adding virtual destructors for each inherited class and the base class fixes this bug. While we are at it, mark the functions as final.
* Merge pull request #4611 from lioncash/xbyak2Gravatar bunnei2020-09-031-16/+16
|\ | | | | externals: Update Xbyak to 5.96
| * externals: Update Xbyak to 5.96Gravatar Lioncash2020-08-301-16/+16
| | | | | | | | | | | | | | | | | | I made a request on the Xbyak issue tracker to allow some constructors to be constexpr in order to avoid static constructors from needing to execute for some of our register constants. This request was implemented, so this updates Xbyak so that we can make use of it.
* | Merge pull request #4578 from lioncash/xorGravatar bunnei2020-09-031-4/+10
|\ \ | | | | | | common_funcs: Add missing XOR operators to DECLARE_ENUM_FLAG_OPERATORS
| * | common_funcs: Add missing XOR operators to DECLARE_ENUM_FLAG_OPERATORSGravatar Lioncash2020-08-241-4/+10
| | | | | | | | | | | | | | | Ensures that the full set of bitwise operators are available for types that make use of this macro.
* | | input_common/motion_input: Make use of Common::PI constantGravatar Morph2020-09-021-1/+1
| | | | | | | | | | | | Also amend the copyright notice to yuzu's instead of Dolphin's, which was mistakenly copy-pasted from another file.
* | | Merge pull request #4570 from german77/motionInputGravatar bunnei2020-09-021-0/+30
|\ \ \ | | | | | | | | input_common: Add a basic class for motion devices
| * | | Implement a basic class for motion devicesGravatar german2020-08-271-0/+30
| | |/ | |/|
* | | Merge pull request #4588 from ReinUsesLisp/tsan-eventGravatar bunnei2020-08-311-4/+5
|\ \ \ | | | | | | | | common/thread: Fix data race in is_set
| * | | common/thread: Fix data race in is_setGravatar ReinUsesLisp2020-08-261-4/+5
| | | | | | | | | | | | | | | | | | | | As report by tsan, Event::Set can write is_set while WaitFor and friends are reading from it. To address this issue, make is_set an atomic.
* | | | Merge pull request #4461 from comex/thread-namesGravatar LC2020-08-311-0/+12
|\ \ \ \ | |_|/ / |/| | | Fix thread naming on Linux, which limits names to 15 bytes.
| * | | Fix thread naming on Linux, which limits names to 15 bytes.Gravatar comex2020-08-051-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - In `SetCurrentThreadName`, when on Linux, truncate to 15 bytes, as (at least on glibc) `pthread_set_name_np` will otherwise return `ERANGE` and do nothing. - Also, add logging in case `pthread_set_name_np` returns an error anyway. This is Linux-specific, as the Apple and BSD versions of `pthread_set_name_np return `void`. - Change the name for CPU threads in multi-core mode from "yuzu:CoreCPUThread_N" (19 bytes) to "yuzu:CPUCore_N" (14 bytes) so it fits into the Linux limit. Some other thread names are also cut off, but I didn't bother addressing them as you can guess them from the truncated versions. For a CPU thread, truncation means you can't see which core it is!
* | | | Merge pull request #4530 from Morph1984/mjolnir-p1Gravatar bunnei2020-08-271-1/+1
|\ \ \ \ | | | | | | | | | | Project Mjölnir: Part 1 - Input Rewrite
| * | | | Project Mjölnir: Part 1Gravatar Morph2020-08-261-1/+1
| | |/ / | |/| | | | | | | | | | | | | | Co-authored-by: James Rowe <jroweboy@gmail.com> Co-authored-by: Its-Rei <kupfel@gmail.com>
* | | | Merge pull request #4577 from lioncash/assertsGravatar bunnei2020-08-271-3/+4
|\ \ \ \ | |/ / / |/| | | common/assert: Make use of C++ attribute syntax
| * | | common/assert: Make use of C++ attribute syntaxGravatar Lioncash2020-08-241-3/+4
| | |/ | |/| | | | | | | Normalizes the syntax used for attributes
* | | Merge pull request #4548 from lioncash/colorGravatar bunnei2020-08-251-2/+2
|\ \ \ | |/ / |/| | common/color: Migrate code over to the Common namespace
| * | common/color: Migrate code over to the Common namespaceGravatar Lioncash2020-08-181-2/+2
| | | | | | | | | | | | | | | No external code makes use of this header, so we can freely change the namespace.
* | | web_service: Move web_result.h into web_serviceGravatar Lioncash2020-08-222-26/+0
| | | | | | | | | | | | | | | | | | | | | This is the only place it's actively used. It's also more appropriate for web-related structures to be within the web service target. Especially given this one doesn't rely on anything in the common library.
* | | Merge pull request #4546 from lioncash/telemetryGravatar bunnei2020-08-202-4/+4
|\ \ \ | | | | | | | | common/telemetry: Migrate namespace into the Common namespace
| * | | common/telemetry: Migrate namespace into the Common namespaceGravatar Lioncash2020-08-182-4/+4
| |/ / | | | | | | | | | | | | Migrates the Telemetry namespace into the Common namespace to make the code consistent with the rest of our common code.
* | | Merge pull request #4547 from lioncash/header-conceptGravatar bunnei2020-08-191-2/+2
|\ \ \ | | | | | | | | common/concepts: Move <type_traits> include out of the Common namespace
| * | | common/concepts: Move <type_traits> include out of the Common namespaceGravatar Lioncash2020-08-181-2/+2
| |/ / | | | | | | | | | This is a compiler/linker error waiting to happen.
* | | Revert "common/time_zone: Simplify GetOsTimeZoneOffset()"Gravatar bunnei2020-08-191-5/+9
| | |
* | | Merge pull request #4539 from lioncash/discGravatar bunnei2020-08-182-3/+3
|\ \ \ | |/ / |/| | common: Silence two discarded result warnings
| * | common: Silence two discarded result warningsGravatar Lioncash2020-08-162-3/+3
| | | | | | | | | | | | | | | | | | | | | These are intentionally discarded internally, since the rest of the public API allows querying success. We want all non-internal uses of these functions to be explicitly checked, so we can signify that we intentionally want to discard the return values here.
* | | Merge pull request #4535 from lioncash/fileutilGravatar bunnei2020-08-173-41/+49
|\ \ \ | | | | | | | | common/fileutil: Convert namespace to Common::FS
| * | | common/fileutil: Convert namespace to Common::FSGravatar Lioncash2020-08-163-41/+49
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Migrates a remaining common file over to the Common namespace, making it consistent with the rest of common files. This also allows for high-traffic FS related code to alias the filesystem function namespace as namespace FS = Common::FS; for more concise typing.
* / / common/time_zone: Simplify GetOsTimeZoneOffset()Gravatar Lioncash2020-08-161-9/+5
|/ / | | | | | | | | | | | | We can simplify this function down into a single line with the use of fmt. A benefit with the fmt approach is that the fmt variant of localtime is thread-safe as well, making GetOsTimeZoneOffset() thread-safe as well.
* | common/compression: Roll back std::span changesGravatar Lioncash2020-08-154-37/+43
| | | | | | | | Seems like all compilers don't support std::span yet.
* | common: Make use of [[nodiscard]] where applicableGravatar Lioncash2020-08-1534-358/+343
| | | | | | | | | | | | Now that clang-format makes [[nodiscard]] attributes format sensibly, we can apply them to several functions within the common library to allow the compiler to complain about any misuses of the functions.
* | Merge pull request #4416 from lioncash/spanGravatar bunnei2020-08-154-28/+23
|\ \ | | | | | | lz4_compression/zstd_compression: Make use of std::span in interfaces
| * | lz4_compression: Make use of std::span in interfacesGravatar Lioncash2020-07-252-17/+14
| | | | | | | | | | | | Allows compressing the data and size parameters into one.