Commit Graph

404 Commits (bc8699a9fa653e0fa35d3f434979b99054ffe4b7)

Author SHA1 Message Date
Ameer J a086ee6a00
Merge pull request #6565 from lat9nq/bundle-ffmpeg
cmake, ci: Build bundled FFmpeg with yuzu
4 years ago
ReinUsesLisp c67d64365a shader: Remove old shader management 4 years ago
ReinUsesLisp b5d7279d87 spirv: Initial bindings support 4 years ago
ReinUsesLisp 1b0cf2309c shader: Add support for forward declarations 4 years ago
ReinUsesLisp 9170200a11 shader: Initial implementation of an AST 4 years ago
ReinUsesLisp 2930dccecc spirv: Initial SPIR-V support 4 years ago
lat9nq d3748cad73 emu_window_sdl2_vk: Use the generated SDL config
On Linux, due to the way we include SDL2 as a submodule, it makes it
difficult for us to specify which SDL_config.h we intended to include.
Before, CMake would default to the dummy one included with SDL and
ignore the generated one.

This tells CMake to use the generated one. In addition, we define
USING_GENERATED_CONFIG_H to throw an error in case the dummy config is
used by accident. Fixes Vulkan not working on Linux yuzu-cmd.
4 years ago
lat9nq ef70054367 cmake: Specify the compiler on autotools externals
Enables CCache on externals if available.
4 years ago
Ameer J bab400daaf
Merge pull request #6459 from lat9nq/ubuntu-fixes
cmake: Improve Linux dependency checking for externals
4 years ago
MerryMage f54f29198f libusb: Apple is a POSIX system 4 years ago
Lioncash c3fe071723 externals: Update dynarmic to allow fmt compilation to succeed 4 years ago
bunnei 0485b8e84b
Merge pull request #6499 from FernandoS27/we-were-on-a-break
Update dynarmic and add new unsafe CPU option.
4 years ago
Fernando Sahmkow 2298508465 Update dynarmic and add new unsafe CPU option. 4 years ago
Vortex e704da9192 externals: httplib: replace custom httplib header with upstream as submodule.
This also includes a minor change to web_service.cpp - to fix compatibility with upstream changes.
4 years ago
Vortex 8a83e3412a update submodule discord-rpc to latest [now deprecated] 4 years ago
bunnei abb0124b84
Merge pull request #6418 from clementgallet/sdl-audio-backend
Audio: SDL2 audio backend
4 years ago
lat9nq 932c0184a7 cmake: Fix find_program usage for 3.15
yuzu requires CMake 3.15 yet find_program was using REQUIRED, which is
only available on 3.18 and later. Instead, we check for
"<VAR>-NOTFOUND".

In addition, check for additional requirements before building libusb or
FFmpeg with autotools. Otherwise, CMake configuration will pass yet
compilation will fail.
4 years ago
lat9nq 2817ef1a53 externals: Don't set FOUND or VERSION on LIBUSB
Fixes an issue where libusb.h wouldn't be found when building yuzu on
MSVC.

This only affects the "traditional" CMake pathway for linking libusb to
yuzu AKA MSVC. For autotools we still want to set these variables before
configuring SDL.
4 years ago
Markus Wick 621f3f5f47 core: Make use of fastmem 4 years ago
lat9nq f738c6b231 externals: Update SDL to 2f248a2a 4 years ago
bunnei c1b8e59ea0
Merge pull request #6407 from lat9nq/fix-libusb-2
cmake: Use autotools for libusb linking generally on GNU, and cleanup
4 years ago
Clément Gallet c7c99905f4 Add SDL2 audio backend 4 years ago
ReinUsesLisp 71a3c60d95 externals: Update dynarmic 4 years ago
lat9nq 7395cd3124 externals: libusb: Call program names not full paths 4 years ago
lat9nq 890acfa2c0 externals: libusb: Link libusb statically on Linux
Turns out that this is possible. Also addresses my own review comment.
4 years ago
lat9nq ddc47e6df8 cmake: General improvements to libusb linking
Delegates libusb external communication to externals/CMakeLists.txt
Ensures an interface library `usb` for every pathway
input_common just links to the `usb` library now
externals/libusb/CMakeLists.txt sets variables to override SDL2's libusb
finding
Other minor cleanup
4 years ago
lat9nq 55dd027115 cmake: Use autotools to build libusb generally for GNU
Building libusb was also broken on GCC (and maybe Clang) on our
CMakeLists after upgrading to 1.0.24, but it was not being checked
because our 18.04 container had libusb installed on it.
This builds on the MinGW work from earlier and extends it to the rest of
the GNU toolchains. In addition we make use of pkg-config when present
to find libusb. pkg-config is preferrable because we can specify a
minimum required version.
4 years ago
lat9nq 185e405bc1 externals: Use defaults for building SDL2 on WIN32
Whatever those settings do breaks controller detection on Windows, at
least with the MinGW container. If-guard it against WIN32 and just let
SDL2 configure using its defaults, aside from static linking.
4 years ago
lat9nq 1914a1d21c externals: libusb: Use autotools for MinGW
After updating to 1.0.24, MinGW fails to build libusb as a result of
numerous errors. So we build libusb their way and let them update the
nontrivial stuff.

This only applies to MinGW: the old path is still in use for Linux
toolchains as well as MSVC.

This will dynamically link libusb, since I hit build errors with the old
way we used to resolve the conflict with SDL2.
4 years ago
bunnei 95f45112e9
Merge pull request #6344 from german77/update-libusb
Update libusb to 1.0.24
4 years ago
Markus Wick d2d7a5060f externals: Update dynarmic.
The new version supports fastmem on a64.
4 years ago
german77 3a6e2922a2 Update libusb to 1.0.24 4 years ago
Morph 9edfd88a8a
Merge pull request #6293 from v1993/master
On Linux, build SDL2 from externals with HIDAPI support
4 years ago
Ameer J 904584e4ba
Merge pull request #6300 from Morph1984/mbedtls
externals: Update mbedtls to 8c88150ca
4 years ago
lat9nq 0ecb6c6647 externals: Checkout 79e8d17024 for FFmpeg
6b6b9e593d does not exist on FFmpeg master, and tag n4.3.1 requires
manually fetching all of FFmpeg's tags. `git` reports that the commit
does not exist initially and can be confusing as a result. Instead,
checkout the immediately previous commit from n4.3.1 on their master
branch.
4 years ago
Morph 02547439b1 externals: Update mbedtls to 8c88150ca 4 years ago
v1993 fa647cc0b9
Only build SDL2 subsystems that we use
While at it, use better way to enable HIDAPI.
4 years ago
v1993 648bef235e
On Linux, build SDL2 from externals with HIDAPI support 4 years ago
lat9nq b021e09fc0 externals: Use SDL2 statically
Building it as a shared library causes issues distributing it to an
AppImage, since linuxdeploy expects the executable to only dynamically
link to system libraries. Additionally, simply dynamically linking to a
library in the binary directory is bound to cause issues.

Solution is to use SDL's CMake switches and build it statically. We also
alias `SDL2` to `SDL2-static` on the external submodule for
compatibility with the rest of the project.
4 years ago
lat9nq 751cc687bb externals: Update SDL to 107db2d8
In light of 72a49c2bbc, the SDL submodule also needs updated. Updates
to the same commit used by the SDL package in ext-windows-bin.
4 years ago
lat9nq de69a5266f cmake: Use SDL 2.0.14 and fix CMake scope issue
Forces using SDL 2.0.14. Upgrades the SDL external to that version. Adds
a message when switching to the external.

Fixes an error where input_common only links to SDL when SDL2_FOUND is
set, but externals/CMakeLists cannot set that variable to the required
scope. Switch to using ENABLE_SDL2, which we can use since we now
include the SDL source.
4 years ago
lat9nq 12e58917c0 externals: Add SDL 2.0.12
Since Bintray is (soon to be) no more, there needs to be a way to
acquire SDL2. Since 20.04's version is older than our minimum required
version (2.0.12), add it as an external.
4 years ago
MerryMage a208c7b059 externals: Update dynarmic to b2a4da5e 4 years ago
Markus Wick 5096ed5e0a externals: Search for shared opus installation.
We had used conan for opus before, but there was a bug in the AVX detection.
However we still had the Findopus.cmake file within the repository, but not used.

This patch reenables the Findopus helper and prefer the system wide installation of opus.
4 years ago
MerryMage 0fbd7752c3 arm_dynarmic: Increase size of code cache 4 years ago
bunnei 94d77d0e39
Merge pull request #6129 from degasus/cmake_libzip
externals/cmake: Fix case spelling of libzip.
4 years ago
Markus Wick d3e87d70ec externals: Fix case spelling of libzip.
CMake is case senstive, so Libzip vs LIBZIP was a bug.
Upstream calls themself libzip, so let's pick this naming.
4 years ago
bunnei 7ff7e65926 externals: dynarmic: Update to latest rev. to increase code size.
- The current limits are being hit in yuzu with some games.
- This should fix the slowdowns in newer updates for Super Smash Bros. Ultimate.
4 years ago
MerryMage a527e5f0cd externals: Update dynarmic to c28f13af
AVX-512 bugfixes
4 years ago
Morph df9899eed6 externals/libusb/CMakeLists: Add /utf-8 compile option for MSVC 4 years ago
Lioncash de21c9e330 external: Update dynarmic 4 years ago
Morph 6faabd6d69 externals: Update mbedtls to 2.16.9
mbedtls 2.16 is the last version which has licensing for GPL 2.0. This updates mbedtls to our own fork of mbedtls 2.16
4 years ago
Kelebek1 d31dbb1bc1 Implement glDepthRangeIndexeddNV 4 years ago
lat9nq 0c24ae300c externals: Update dynarmic to latest
Updates dynarmic to its latest commit. Includes a fix for argument
limits while compiling with Clang 12.
4 years ago
lat9nq 1a2e7c4dbd ffmpeg: Checkout tag n4.3.1
Target a specific release version rather than some random development
commit.
4 years ago
lat9nq 527188391c CMakeLists: Use bundled FFmpeg as a fallback
Sets YUZU_USE_BUNDLED_FFMPEG as a CMake dependent option that is OFF on
Linux and ON for WIN32 targets. If FFmpeg is not found when
YUZU_USE_BUNDLED_FFMPEG is OFF, the bundled module/binaries are used
instead.

Reverts earlier changes to FindFFmpeg a bit, mostly to keep parity with
it's Citra version a bit. Now _FFmpeg_ALL_COMPONENTS lists all
components. We overwrite FFmpeg_LIBRARIES and FFmpeg_INCLUDE_DIR after
using the module.
4 years ago
lat9nq 1d19eac415 CMake: Port citra-emu/citra FindFFmpeg.cmake
Also renames related CMake variables to match both the Find*FFmpeg* and
variables defined within the file. Fixes odd errors produced by the old
FindFFmpeg.

Citra's FindFFmpeg is slightly modified here: adds Citra's copyright at
the beginning, renames FFmpeg_INCLUDES to FFmpeg_INCLUDE_DIR, disables a
few components in _FFmpeg_ALL_COMPONENTS, and adds the missing avutil
component to the comment above.
4 years ago
lat9nq 82dd376ba2 externals: Add submodule ffmpeg 4 years ago
bunnei 15d3376399 externals: Dynarmic: Update to latest to include A32 ISB hook.
- Fixes perf. issues with Megadimension Neptunia VII.
4 years ago
MerryMage 2350b76a91 externals: Update dynarmic to 0f27368f 4 years ago
MerryMage 8a5356357f externals: Update dynarmic to 3806284cb 4 years ago
MerryMage 57c9da1b39 dynarmic: Add Unsafe_InaccurateNaN optimization 4 years ago
ReinUsesLisp 3f048c8646 externals: Update Dynarmic
Keeps yuzu up to date with the latest changes and introduces a change
needed for a lock-free optimization our side.
4 years ago
ReinUsesLisp 1b9e08ab78 cmake: Always enable Vulkan
Removes the unnecesary burden of maintaining separate #ifdef paths and
allows us sharing generic Vulkan code across APIs.
4 years ago
Vitor Kiguchi a1e7360273 Update cubeb and request a persistent stream session 4 years ago
Lioncash fc6db97a09 core: Remove usage of unicorn
Unicorn long-since lost most of its use, due to dynarmic gaining support
for handling most instructions. At this point any further issues
encountered should be used to make dynarmic better.

This also allows us to remove our dependency on Python.
4 years ago
Lioncash ee21b5378b microprofile: Silence warning in headers
Silences a truncation warning by making the truncation explicit and
documenting the reason for it.
4 years ago
Lioncash 4a4b685a04 common: Enable warnings as errors
Cleans up common so that we can enable warnings as errors.
4 years ago
liushuyu cf63eacc1a
web_service: follow-up fix to #4842 ...
* The web_service http request is now fixed on Windows (R) platform.
* The issue is due to a complicated race-condition in `httplib`, a detailed
  explanation is available at https://github.com/yhirose/cpp-httplib/pull/701
* A pending Pull Request on `httplib` has been applied to remedy the
  said race-condition.
* The socket availability check is removed due to a behavioral chice of
  `httplib` that a socket will not be created before any actual request
  is sent.
4 years ago
bunnei 663e221f99
Merge pull request #4845 from lioncash/inih
externals: Track upstream inih
4 years ago
Lioncash 9a44c1ea27 externals: Update inih to r52 4 years ago
liushuyu eb84e0f63a
externals: auto detect system OpenSSL 4 years ago
liushuyu 8e673cbb08
web_backend: fix a regression introduced in 39c8d18
* A regression was in 39c8d18 and token verification function was
  broken.
* The reason being `httplib` now requires OpenSSL 1.1+ API while
  LibreSSL 2.x provided OpenSSL 1.0 compatible API.
* The bundled LibreSSL has been updated to 3.2.2 so it now provides
  OpenSSL 1.1 compatible API now.
* Also the path hint has been added so that it will find the correct
  path to the CA certs on *nix systems.
* An option is provided so that *nix system distributions/providers can
  use their own SSL implementations when compiling Yuzu/Citra to
  (hopefully) complies with their maintenance guidelines.
* LURLParse is also removed since `httplib` can handle
  `scheme:host:port` string itself now.
4 years ago
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>
4 years ago
bunnei 3d592972dc
Revert "core: Fix clang build" 4 years ago
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
4 years ago
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.
4 years ago
bunnei 94a25b75a0
Merge pull request #4611 from lioncash/xbyak2
externals: Update Xbyak to 5.96
5 years ago
Lioncash 91cbe52122 externals: Work around libusb duplicate GUID errors
Given we have two libraries that seem to use the same identifier, we can
alter one of them so that the variable is used in place, effectively
changing the used identifier, but without altering the source of
libusb.
5 years ago
bunnei e11a77d2c6
Merge pull request #4584 from lioncash/libusb
externals: Track upstream libusb directly
5 years ago
bunnei 2579a7199b
Merge pull request #4587 from yuzu-emu/tsan-microprofiler
externals/microprofile: Fix data race in g_bUseLock
5 years ago
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.
5 years ago
Lioncash 045255a0a0 externals: Track upstream libusb
We can place the external in an inner folder and manage the custom files
necessary to integrate it with CMake directly. This allows us to
directly change how we use it with our build system, as opposed to
needing to change a fork.
5 years ago
ReinUsesLisp 3dcaaa18be externals/microprofile: Fix data race in g_bUseLock
As reported by tsan, g_bUseLock had a data race. Fix this using an
atomic boolean.
5 years ago
Lioncash 58ee9b4197 externals: Untrack non-upstream variant of libusb
We shouldn't be tracking personal forks of repositories when upstream
can be managed directly.
5 years ago
Lioncash c024e5c69a externals: Update Xbyak to 5.95
5.95 contains a potentially backward-compatibility breaking change, so
we should be updating to this to ensure that our code remains
forward-compatible.
5 years ago
bunnei 4efaecf125
Merge pull request #4572 from lioncash/xbyak
externals: Update xbyak to v5.941
5 years ago
Lioncash 3121acdf4e externals: Update xbyak to v5.941
Keeps the tracked submodule up to date with the latest release.
5 years ago
Lioncash ec8d72a567 microprofile: Don't memset through std::atomic types
Two of the members of the MicroProfileThreadLog contains two std::atomic
instances. Given these aren't trivially-copyable types, we shouldn't be
memsetting the structure, given implementation details can contain other
members within it.

To avoid potential undefined behavior on platforms, we can use aggregate
initialization to zero out the members while still having well-defined
behavior.

While we're at it we can also silence some sign conversion warnings.
5 years ago
MerryMage 836ec9176a dynarmic: Add unsafe optimizations 5 years ago
MerryMage 0193202964 configuration: Add settings to enable/disable specific CPU optimizations 5 years ago
bunnei 5311b562aa
Merge pull request #4266 from jbeich/freebsd
gcadapter: unbreak build on FreeBSD
5 years ago
bunnei 35f7740b6c
Merge pull request #4150 from ReinUsesLisp/dynamic-state-impl
vulkan: Use VK_EXT_extended_dynamic_state when available
5 years ago
Jan Beich 2af7e40ce6 cmake: unbreak system libusb support
Reference libusb doesn't support DragonFly and FreeBSD because those
ship a different libusb implementation (supports 0.1, 1.0, 2.0 API).

ld: error: undefined symbol: usbi_backend
>>> referenced by core.c
>>>               core.c.o:(usbi_alloc_device) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_backend
>>> referenced by core.c
>>>               core.c.o:(usbi_alloc_device) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_backend
>>> referenced by core.c
>>>               core.c.o:(libusb_has_capability) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_backend
>>> referenced by core.c
>>>               core.c.o:(libusb_has_capability) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_backend
>>> referenced by core.c
>>>               core.c.o:(libusb_has_capability) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_backend
>>> referenced by core.c
>>>               core.c.o:(usbi_connect_device) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_backend
>>> referenced by core.c
>>>               core.c.o:(usbi_disconnect_device) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_backend
>>> referenced by core.c
>>>               core.c.o:(libusb_get_device_list) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_backend
>>> referenced by core.c
>>>               core.c.o:(libusb_get_device_list) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_backend
>>> referenced by core.c
>>>               core.c.o:(libusb_unref_device) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_backend
>>> referenced by core.c
>>>               core.c.o:(libusb_unref_device) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_write
>>> referenced by core.c
>>>               core.c.o:(usbi_signal_event) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_read
>>> referenced by core.c
>>>               core.c.o:(usbi_clear_event) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_backend
>>> referenced by core.c
>>>               core.c.o:(libusb_wrap_sys_device) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_backend
>>> referenced by core.c
>>>               core.c.o:(libusb_wrap_sys_device) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_backend
>>> referenced by core.c
>>>               core.c.o:(libusb_wrap_sys_device) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_backend
>>> referenced by core.c
>>>               core.c.o:(libusb_open) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_backend
>>> referenced by core.c
>>>               core.c.o:(libusb_open) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_read
>>> referenced by core.c
>>>               core.c.o:(libusb_close) in archive externals/libusb/libusb.a

ld: error: undefined symbol: usbi_write
>>> referenced by core.c
>>>               core.c.o:(libusb_close) in archive externals/libusb/libusb.a

ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
c++: error: linker command failed with exit code 1 (use -v to see invocation)
5 years ago
Ameer f829932ed1 Fix merge conflicts? 5 years ago
David Marcec d5dfe34c49 externals: Track opus as submodule instead of using conan
Supersedes #4068 see for details.
5 years ago
Fernando Sahmkow 4105f38022 SVC: Implement 32-bits wrappers and update Dynarmic. 5 years ago
Fernando Sahmkow b8df61c642 ARM: Update Dynarmic and Setup A32 according to latest interface. 5 years ago
Fernando Sahmkow 39ddce1ab5 Externals: Update Dynarmic. 5 years ago
Fernando Sahmkow 3714f2e471 ARMInterface/Externals: Update dynarmic and fit to latest version. 5 years ago