summaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)Author
2020-10-28common/fiber: Take shared_ptr<Fiber> by copy in YieldToReinUsesLisp
YieldTo does not intend to modify the passed shared_ptrs. Pass it by copy to keep a reference count while this function executes.
2020-10-26video_core: NVDEC Implementationameerj
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>
2020-10-21core: Fix clang build pt.3Lioncash
Should finally resolve building with clang.
2020-10-20Revert "core: Fix clang build"bunnei
2020-10-20Merge pull request #4796 from lioncash/clangLC
core: Fix clang build
2020-10-17core: Fix clang buildLioncash
Recent changes to the build system that made more warnings be flagged as errors caused building via clang to break. Fixes #4795
2020-10-15input_common/CMakeLists: Make some warnings errorsLioncash
Makes the input_common code warnings consistent with the rest of the codebase.
2020-10-13core/CMakeLists: Make some warnings errorsLioncash
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.
2020-10-07Merge pull request #4731 from lat9nq/mingw-zstd-fixbunnei
common: Use system zstd on Linux
2020-09-30common/wall_clock: Add virtual destructorsReinUsesLisp
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.
2020-09-28CMakeLists: use system zstd on Linuxlat9nq
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.
2020-09-28CMakeLists: fix for finding zstd on linux-mingwlat9nq
2020-09-03Merge pull request #4611 from lioncash/xbyak2bunnei
externals: Update Xbyak to 5.96
2020-09-03Merge pull request #4578 from lioncash/xorbunnei
common_funcs: Add missing XOR operators to DECLARE_ENUM_FLAG_OPERATORS
2020-09-02input_common/motion_input: Make use of Common::PI constantMorph
Also amend the copyright notice to yuzu's instead of Dolphin's, which was mistakenly copy-pasted from another file.
2020-09-02Merge pull request #4570 from german77/motionInputbunnei
input_common: Add a basic class for motion devices
2020-08-31Merge pull request #4588 from ReinUsesLisp/tsan-eventbunnei
common/thread: Fix data race in is_set
2020-08-31Merge pull request #4461 from comex/thread-namesLC
Fix thread naming on Linux, which limits names to 15 bytes.
2020-08-30externals: Update Xbyak to 5.96Lioncash
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.
2020-08-27Implement a basic class for motion devicesgerman
2020-08-27Merge pull request #4530 from Morph1984/mjolnir-p1bunnei
Project Mjölnir: Part 1 - Input Rewrite
2020-08-27Merge pull request #4577 from lioncash/assertsbunnei
common/assert: Make use of C++ attribute syntax
2020-08-26Project Mjölnir: Part 1Morph
Co-authored-by: James Rowe <jroweboy@gmail.com> Co-authored-by: Its-Rei <kupfel@gmail.com>
2020-08-26common/thread: Fix data race in is_setReinUsesLisp
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.
2020-08-25Merge pull request #4548 from lioncash/colorbunnei
common/color: Migrate code over to the Common namespace
2020-08-24common_funcs: Add missing XOR operators to DECLARE_ENUM_FLAG_OPERATORSLioncash
Ensures that the full set of bitwise operators are available for types that make use of this macro.
2020-08-24common/assert: Make use of C++ attribute syntaxLioncash
Normalizes the syntax used for attributes
2020-08-22web_service: Move web_result.h into web_serviceLioncash
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.
2020-08-20Merge pull request #4546 from lioncash/telemetrybunnei
common/telemetry: Migrate namespace into the Common namespace
2020-08-19Merge pull request #4547 from lioncash/header-conceptbunnei
common/concepts: Move <type_traits> include out of the Common namespace
2020-08-19Revert "common/time_zone: Simplify GetOsTimeZoneOffset()"bunnei
2020-08-18Merge pull request #4539 from lioncash/discbunnei
common: Silence two discarded result warnings
2020-08-18common/telemetry: Migrate namespace into the Common namespaceLioncash
Migrates the Telemetry namespace into the Common namespace to make the code consistent with the rest of our common code.
2020-08-18common/color: Migrate code over to the Common namespaceLioncash
No external code makes use of this header, so we can freely change the namespace.
2020-08-18common/concepts: Move <type_traits> include out of the Common namespaceLioncash
This is a compiler/linker error waiting to happen.
2020-08-17Merge pull request #4535 from lioncash/fileutilbunnei
common/fileutil: Convert namespace to Common::FS
2020-08-16common/fileutil: Convert namespace to Common::FSLioncash
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.
2020-08-16common: Silence two discarded result warningsLioncash
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.
2020-08-16common/time_zone: Simplify GetOsTimeZoneOffset()Lioncash
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.
2020-08-15common/compression: Roll back std::span changesLioncash
Seems like all compilers don't support std::span yet.
2020-08-15common: Make use of [[nodiscard]] where applicableLioncash
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.
2020-08-15Merge pull request #4416 from lioncash/spanbunnei
lz4_compression/zstd_compression: Make use of std::span in interfaces
2020-08-13Merge pull request #4511 from lioncash/build2LC
General: Tidy up clang-format warnings part 2
2020-08-13General: Tidy up clang-format warnings part 2Lioncash
2020-08-11Merge pull request #4493 from jbeich/dragonflybunnei
common/virtual_buffer: drop unused includes
2020-08-08General: Tidy up clang-format warningsLioncash
2020-08-07common/concepts: Rename IsBaseOf to DerivedFromLioncash
This makes it more inline with its currently unavailable standardized analogue std::derived_from. While we're at it, we can also make the template match the requirements of the standardized variant as well.
2020-08-06Merge pull request #4483 from lioncash/constexpr-hexbunnei
partition_data_manager: Make data arrays constexpr
2020-08-06partition_data_manager: Make data arrays constexprLioncash
Previously the constructor for all of these would run at program startup, consuming time before the application can enter main(). This is also particularly dangerous, given the logging system wouldn't have been initialized properly yet, yet the program would use the logs to signify an error. To rectify this, we can replace the literals with constexpr functions that perform the conversion at compile-time, completely eliminating the runtime cost of initializing these arrays.
2020-08-05Fix thread naming on Linux, which limits names to 15 bytes.comex
- 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!