Commit graph

149 commits

Author SHA1 Message Date
bunnei
8e1f16e8fa Merge pull request #5131 from bunnei/scheduler-rewrite
Rewrite Kernel scheduler based on Atmosphere
2020-12-20 20:57:54 -08:00
lat9nq
5e59e26876 cmake: Fix generating CMake configs and linking with Boost
Fixes regression by 91c13721de, causing
yuzu to not build on Linux with any version of Boost except a cached
1.73 Conan version from before about a day ago.

Moves the Boost requirement out of the `REQUIRED_LIBS` psuedo-2D-array
for Conan to instead be manually configured, using Conan as a fallback
solution if the system does not meet our requirements.

Requires any update from the linux-fresh container in order to build.

**DO NOT MERGE** until someone with the MSVC toolchain can verify this
works there, too.
2020-12-13 01:28:51 -05:00
bunnei
91c13721de common: Update CMakeList to fix build issue with Boost. 2020-12-12 11:50:07 -08:00
bunnei
4f16c961c9 hle: kernel: Separate KScheduler from GlobalSchedulerContext class. 2020-12-06 00:03:24 -08:00
bunnei
b164f6306b common: Port BitSet from Mesosphere. 2020-12-06 00:03:24 -08:00
ReinUsesLisp
2600f1353d common: Add Common::DivCeil and Common::DivCeilLog2
Add an equivalent to 'Common::AlignUp(n, d) / d' and a log2 alternative.
2020-11-25 23:37:56 -03:00
ReinUsesLisp
778c06d35b common/bit_cast: Add function matching std::bit_cast without constexpr
Add a std::bit_cast-like function archiving the same runtime results as
the standard function, without compile time support.

This allows us to use bit_cast while we wait for compiler support, it
can be trivially replaced in the future.
2020-11-20 01:52:37 -03:00
Lioncash
38ffaef6eb common: Enable warnings as errors
Cleans up common so that we can enable warnings as errors.
2020-11-02 15:50:58 -05:00
ameerj
9ef5c53e52 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
lat9nq
bcd77d4b7b 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
1589c097d4 CMakeLists: fix for finding zstd on linux-mingw 2020-09-28 20:28:47 -04:00
Lioncash
77d6d3bf4b 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
David
ecaac59acd ipc: Allow all trivially copyable objects to be passed directly into WriteBuffer (#4465)
* ipc: Allow all trivially copyable objects to be passed directly into WriteBuffer

With the support of C++20, we can use concepts to deduce if a type is an STL container or not.

* More agressive concept for stl containers

* Add -fconcepts

* Move to common namespace

* Add Common::IsBaseOf
2020-08-03 07:28:54 -04:00
David Marcec
12c6b9eac1 cmake: Fix libfmt linking errors 2020-07-10 14:04:06 +10:00
John Galt
d01c077810 cmake: fix fmt linking when found
This is a new attempt at #4206 that shouldn't break windows builds.

If someone else could test on windows, it would be much appreciated.
Previously, the build bot passed but the actual builds failed.
2020-07-09 11:35:28 -04:00
bunnei
7186ddb29a Revert "cmake: fix fmt linking" 2020-07-02 22:53:12 -04:00
John Galt
1eacbe69be cmake: fix fmt linking
On gcc/ld, and clang/lld, fmt::v6 symbols are excluded, so linking
fails. This fixes the issue.

Note: This was included in the FindBoost changes I shared with
BlinkHawk, however only they were merged. I'm not sure if it was missed,
or if there was an issue with this part of the change.
2020-06-29 07:10:07 -04:00
Fernando Sahmkow
5eac520ae3 ARM/Memory: Correct Exclusive Monitor and Implement Exclusive Memory Writes. 2020-06-27 11:35:37 -04:00
Fernando Sahmkow
fda14542cb Common: Fix non-conan build 2020-06-26 12:25:19 -04:00
Fernando Sahmkow
ee32067b10 Common: Implement WallClock Interface and implement a native clock for x64 2020-06-18 16:29:17 -04:00
Fernando Sahmkow
353166d648 Common: Implement a basic Fiber class. 2020-06-18 16:29:14 -04:00
Fernando Sahmkow
b1b01a33bd Common: Implement a basic SpinLock class 2020-06-18 16:29:13 -04:00
ReinUsesLisp
805d48c67e gl_arb_decompiler: Implement an assembly shader decompiler
Emit code compatible with NV_gpu_program5.
This should emit code compatible with Fermi, but it wasn't tested on
that architecture. Pascal has some issues not present on Turing GPUs.
2020-06-11 22:12:07 -03:00
David Marcec
4686c15c03 Add xbyak external 2020-05-30 10:55:27 +10:00
Morph
c02daca95c main: Log host system memory parameters
Logs both physical memory and swapfile sizes, this is useful for support.
2020-05-17 14:45:12 -04:00
bunnei
7aadcb796c common: Add module to get the current time zone. 2020-05-11 17:51:26 -04:00
James Rowe
2991e7441a Replace externals with Conan (#3735)
* Remove git submodules that will be loaded through conan

* Move custom Find modules to their own folder

* Use conan for downloading missing external dependencies

* CI: Change the yuzu source folder user to the user that the containers run on

* Attempt to remove dirty mingw build hack

* Install conan on the msvc build

* Only set release build type when using not using multi config generator

* Re-add qt bundled to workaround an issue with conan qt not downloading prebuilt binaries

* Add workaround for submodules that use legacy CMAKE variables

* Re-add USE_BUNDLED_QT on the msvc build bot
2020-05-08 17:09:29 -04:00
bunnei
273f8b5fc7 common: Add VirtualBuffer class, to abstract memory virtualization. 2020-04-17 00:59:31 -04:00
ReinUsesLisp
c56cdc3384 common/dynamic_library: Import and adapt helper from Dolphin 2020-04-07 02:23:23 -03:00
ReinUsesLisp
cb05500d6c shader/transform_feedback: Add host API friendly TFB builder 2020-03-13 18:33:04 -03:00
ReinUsesLisp
99be31c902 video_core: Rename "const buffer locker" to "registry" 2020-03-09 18:40:06 -03:00
ReinUsesLisp
8021ee48a3 gl_shader_cache: Rework shader cache and remove post-specializations
Instead of pre-specializing shaders and then post-specializing them,
drop the later and only "specialize" the shader while decoding it.
2020-03-09 18:40:06 -03:00
James Rowe
47197f6b18 Fix git version in scm_rev.cpp 2020-01-16 00:12:50 -07:00
Zach Hilman
fa69a9922e ci: Populate build repository from Azure environment 2019-11-05 21:37:27 -05:00
Fernando Sahmkow
d4da704ac5 VideoCore: Unify const buffer accessing along engines and provide ConstBufferLocker class to shaders. 2019-10-25 09:01:29 -04:00
Lioncash
b5202d5da2 common: Rename binary_find.h to algorithm.h
Makes the header more general for other potential algorithms in the
future. While we're at it, include a missing <functional> include to
satisfy the use of std::less.
2019-10-15 15:24:50 -04:00
bunnei
376be77d02 Merge pull request #2943 from DarkLordZach/azure-titlebars-v2
ci: Add custom titlebars for mainline and patreon
2019-10-05 19:29:35 -04:00
Zach Hilman
892f001f62 common: Add additional SCM revision fields 2019-10-05 00:09:49 -04:00
Fernando Sahmkow
7b55e1c0b1 Shader_Ir: Refactor Decompilation process and allow multiple decompilation modes. 2019-10-04 18:52:50 -04:00
Fernando Sahmkow
9f61500df1 shader_ir: Corrections to outward movements and misc stuffs 2019-10-04 18:52:48 -04:00
Zach Hilman
b67b5b356b cmake: Add SCM detection for Azure 2019-09-22 17:23:10 -04:00
ReinUsesLisp
67f47b2f6a shader_ir: Implement VOTE
Implement VOTE using Nvidia's intrinsics. Documentation about these can
be found here
https://developer.nvidia.com/reading-between-threads-shader-intrinsics

Instead of using portable ARB instructions I opted to use Nvidia
intrinsics because these are the closest we have to how Tegra X1
hardware renders.

To stub VOTE on non-Nvidia drivers (including nouveau) this commit
simulates a GPU with a warp size of one, returning what is meaningful
for the instruction being emulated:

* anyThreadNV(value) -> value
* allThreadsNV(value) -> value
* allThreadsEqualNV(value) -> true

ballotARB, also known as "uint64_t(activeThreadsNV())", emits

VOTE.ANY Rd, PT, PT;

on nouveau's compiler. This doesn't match exactly to Nvidia's code

VOTE.ALL Rd, PT, PT;

Which is emulated with activeThreadsNV() by this commit. In theory this
shouldn't really matter since .ANY, .ALL and .EQ affect the predicates
(set to PT on those cases) and not the registers.
2019-08-21 14:50:38 -03:00
Fernando Sahmkow
48e75bade4 shader_ir: Implement a new shader scanner 2019-07-09 08:14:36 -04:00
Fernando Sahmkow
c3c7215820 texture_cache: Address Feedback 2019-07-05 09:46:53 -04:00
ReinUsesLisp
224e4e174d shader: Decode SUST and implement backing image functionality 2019-06-20 21:38:33 -03:00
ReinUsesLisp
d7f13b7e6e cmake: Add missing shader hash file entries 2019-06-06 20:11:48 -03:00
Zach Hilman
c02cb054b7 common: Extract UUID to its own class
Since the Mii database uses UUIDs very similar to the Accounts database, it makes no sense to not share code between them.
2019-04-25 08:07:57 -04:00
unknown
2d755221e8 common/zstd_compression: Add Zstandard wrapper 2019-03-29 18:22:08 +01:00
unknown
8583ce229a common: Link libzstd_static 2019-03-29 18:22:07 +01:00
unknown
27aac8d363 Addressed feedback 2019-03-29 18:12:42 +01:00