Commit Graph

1110 Commits

Author SHA1 Message Date
Lioncash
6f006d051e General: Fix clang build
Allows building on clang to work again
2020-11-05 10:07:16 -05:00
Lioncash
4a4b685a04 common: Enable warnings as errors
Cleans up common so that we can enable warnings as errors.
2020-11-02 15:50:58 -05:00
bunnei
8aa9ae5ba5
Merge pull request #4868 from lioncash/discard-error
General: Make ignoring a discarded return value an error
2020-10-30 00:35:40 -07:00
Lioncash
26547d3e3b General: Make ignoring a discarded return value an error
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.
2020-10-30 00:13:21 -04:00
Lioncash
8049b8beb6 common/stream: Be explicit with copy and move operators 2020-10-29 22:57:35 -04:00
ReinUsesLisp
cdb2480d39 common/fiber: Take shared_ptr<Fiber> by copy in YieldTo
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-28 02:02:44 -03:00
ameerj
eb67a45ca8 video_core: NVDEC Implementation
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-26 23:07:36 -04:00
Lioncash
ea20b5c970 core: Fix clang build pt.3
Should finally resolve building with clang.
2020-10-21 22:14:23 -04:00
bunnei
3d592972dc
Revert "core: Fix clang build" 2020-10-20 19:07:39 -07:00
LC
88d5140cf2
Merge pull request #4796 from lioncash/clang
core: Fix clang build
2020-10-20 19:19:12 -04:00
Lioncash
be1954e04c core: Fix clang build
Recent changes to the build system that made more warnings be flagged as
errors caused building via clang to break.

Fixes #4795
2020-10-17 19:50:39 -04:00
Lioncash
046c0c91a3 input_common/CMakeLists: Make some warnings errors
Makes the input_common code warnings consistent with the rest of the
codebase.
2020-10-15 19:37:51 -04:00
Lioncash
39c8d18feb core/CMakeLists: Make some warnings errors
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-13 13:16:49 -04:00
bunnei
3446eb79b5
Merge pull request #4731 from lat9nq/mingw-zstd-fix
common: Use system zstd on Linux
2020-10-07 17:57:14 -07:00
ReinUsesLisp
771a9c21cc common/wall_clock: Add virtual destructors
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-30 02:53:34 -03:00
lat9nq
2cbce77b92 CMakeLists: use system zstd on Linux
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-28 21:11:39 -04:00
lat9nq
9d665cb8db CMakeLists: fix for finding zstd on linux-mingw 2020-09-28 20:28:47 -04:00
bunnei
94a25b75a0
Merge pull request #4611 from lioncash/xbyak2
externals: Update Xbyak to 5.96
2020-09-03 20:24:27 -04:00
bunnei
40c230e0fa
Merge pull request #4578 from lioncash/xor
common_funcs: Add missing XOR operators to DECLARE_ENUM_FLAG_OPERATORS
2020-09-03 17:11:51 -04:00
Morph
45ecd601be input_common/motion_input: Make use of Common::PI constant
Also amend the copyright notice to yuzu's instead of Dolphin's, which was mistakenly copy-pasted from another file.
2020-09-02 11:58:15 -04:00
bunnei
f64917a852
Merge pull request #4570 from german77/motionInput
input_common: Add a basic class for motion devices
2020-09-02 11:09:18 -04:00
bunnei
ad9ce67b52
Merge pull request #4588 from ReinUsesLisp/tsan-event
common/thread: Fix data race in is_set
2020-08-31 21:21:38 -04:00
LC
b5ed2d408c
Merge pull request #4461 from comex/thread-names
Fix thread naming on Linux, which limits names to 15 bytes.
2020-08-31 15:31:48 -04:00
Lioncash
a5dcccfdd2 externals: Update Xbyak to 5.96
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-30 05:09:48 -04:00
german
2d207ec609 Implement a basic class for motion devices 2020-08-27 17:19:21 -05:00
bunnei
3db9a25977
Merge pull request #4530 from Morph1984/mjolnir-p1
Project Mjölnir: Part 1 - Input Rewrite
2020-08-27 14:58:44 -04:00
bunnei
3f7b0e0772
Merge pull request #4577 from lioncash/asserts
common/assert: Make use of C++ attribute syntax
2020-08-27 11:09:02 -04:00
Morph
f0fac0c7fb Project Mjölnir: Part 1
Co-authored-by: James Rowe <jroweboy@gmail.com>
Co-authored-by: Its-Rei <kupfel@gmail.com>
2020-08-26 02:32:32 -04:00
ReinUsesLisp
f119ef798b common/thread: Fix data race in is_set
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-26 02:50:51 +00:00
bunnei
b798813eee
Merge pull request #4548 from lioncash/color
common/color: Migrate code over to the Common namespace
2020-08-25 10:07:13 -04:00
Lioncash
504175e5b6 common_funcs: Add missing XOR operators to DECLARE_ENUM_FLAG_OPERATORS
Ensures that the full set of bitwise operators are available for types
that make use of this macro.
2020-08-24 04:42:43 -04:00
Lioncash
3bfaabdbdd common/assert: Make use of C++ attribute syntax
Normalizes the syntax used for attributes
2020-08-24 04:15:10 -04:00
Lioncash
ca5ed50655 web_service: Move web_result.h into web_service
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-22 19:29:54 -04:00
bunnei
3ea3de4ecd
Merge pull request #4546 from lioncash/telemetry
common/telemetry: Migrate namespace into the Common namespace
2020-08-20 14:29:13 -04:00
bunnei
3b8a8cf825
Merge pull request #4547 from lioncash/header-concept
common/concepts: Move <type_traits> include out of the Common namespace
2020-08-19 23:29:45 -04:00
bunnei
acbae572d3
Revert "common/time_zone: Simplify GetOsTimeZoneOffset()" 2020-08-19 18:27:31 -04:00
bunnei
b1fa647f28
Merge pull request #4539 from lioncash/disc
common: Silence two discarded result warnings
2020-08-18 22:03:09 -04:00
Lioncash
f6bb905182 common/telemetry: Migrate namespace into the Common namespace
Migrates the Telemetry namespace into the Common namespace to make the
code consistent with the rest of our common code.
2020-08-18 15:08:32 -04:00
Lioncash
e864aa25d5 common/color: Migrate code over to the Common namespace
No external code makes use of this header, so we can freely change the
namespace.
2020-08-18 14:27:41 -04:00
Lioncash
999fc2fece common/concepts: Move <type_traits> include out of the Common namespace
This is a compiler/linker error waiting to happen.
2020-08-18 14:24:54 -04:00
bunnei
56c6a5def8
Merge pull request #4535 from lioncash/fileutil
common/fileutil: Convert namespace to Common::FS
2020-08-17 22:35:30 -04:00
Lioncash
c4ed791164 common/fileutil: Convert namespace to Common::FS
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-16 06:52:40 -04:00
Lioncash
d09456fc41 common: Silence two discarded result warnings
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-16 06:17:33 -04:00
Lioncash
fe97d34156 common/time_zone: Simplify GetOsTimeZoneOffset()
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-16 03:58:47 -04:00
Lioncash
1ee060ca0d common/compression: Roll back std::span changes
Seems like all compilers don't support std::span yet.
2020-08-15 17:17:56 -04:00
Lioncash
df72480395 common: Make use of [[nodiscard]] where applicable
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-15 17:17:52 -04:00
bunnei
feb243b08d
Merge pull request #4416 from lioncash/span
lz4_compression/zstd_compression: Make use of std::span in interfaces
2020-08-15 00:53:11 -04:00
LC
ff0b14ee62
Merge pull request #4511 from lioncash/build2
General: Tidy up clang-format warnings part 2
2020-08-13 15:13:21 -04:00
Lioncash
b724a4d90c General: Tidy up clang-format warnings part 2 2020-08-13 14:19:08 -04:00
bunnei
e143adc3cf
Merge pull request #4493 from jbeich/dragonfly
common/virtual_buffer: drop unused includes
2020-08-11 12:52:50 -04:00