| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| | |
qt: implement automatic crash dump support
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Enable to use controller to close a game
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
jit: add support for relr-type relocations
|
| |/ / |
|
|/ / |
|
|\ \
| | |
| | | |
common: add arm64 native clock
|
| | | |
|
|\ \ \
| | | |
| | | | |
yuzu: Add desktop shortcut support for Windows (continuation of #11344)
|
| | |/
| |/|
| | |
| | |
| | |
| | | |
Allows creating desktop shortcuts with icons for yuzu games.
Co-Authored-By: Jeroen van Schijndel <13182141+roenyroeny@users.noreply.github.com>
|
|\ \ \
| |_|/
|/| | |
yuzu-qt: Track play time
|
| | | |
|
| |/
|/| |
|
|\ \
| | |
| | | |
Vulkan: Implement Depth Bias Control
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
This was mysteriously missing, likely from when I ported Citra fixes
semi-recently.
|
| | | |
|
|/ / |
|
|\ \
| | |
| | | |
add std::error_code for std::filesystem exceptions
|
| | |
| | |
| | |
| | |
| | |
| | | |
Resolves a case on Windows where an unmounted bitlocker protected volume containing an assigned game directory would crash Yuzu at start.
May also resolve cases where a disconnected SMB volume causes similar crashes (needs testing)
|
|\ \ \
| | | |
| | | | |
general: Remove uncaught usages of C++ string number conversions
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
This has yet to be PR'd on Citra, but regressions on yuzu that have
been fixed in Citra needed to appear here.
|
| |/ /
|/| | |
|
|\ \ \
| | | |
| | | | |
ngc: implement service
|
| |/ / |
|
|\ \ \
| |/ /
|/| | |
polyfill_thread: ensure mutex was locked before signaling stop
|
| | | |
|
|\ \ \
| | | |
| | | | |
common: add a compile time option to allow disabling portable mode
|
| |/ / |
|
|/ /
| |
| |
| | |
And fix a bunch of warnings
|
|/
|
|
| |
Completely removes code related to parsing the settings file on the java side. Now all settings are accessed via NativeConfig.kt and config.cpp has been modified to be closer to the core counterpart. Since the core currently uses QSettings, we can't remove reliance from Wini yet. This also includes simplifications to each settings interface to get closer to native code and prepare for per-game settings.
|
|\
| |
| | |
general,config-qt: Present Console Mode as an enum with separate options in game properties
|
| | |
|
| |
| |
| |
| | |
Allows some special interactions with it in the Qt frontend.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note: For GCC there are still a huge number of `-Warray-bounds` warnings
coming from `externals/dynarmic`. I could have added a workaround in
`externals/CMakeLists.txt` similar to what this PR does for other
externals, but given Dynarmic's close affiliation with Yuzu, it would be
better to fix it upstream.
Besides that, on my machine, this makes the build warning-free except
for some warnings from glslangValidator and AutoMoc.
Details:
- Disable some warnings in externals.
- Disable `-Wnullability-completeness`, which is a Clang warning triggered
by the Vulkan SDK where if any pointers in the header are marked
_Nullable, it wants all pointers to be marked _Nullable or _Nonnull.
Most of them are, but some aren't. Who knows why.
- `src/web_service/verify_user_jwt.cpp`: Disable another warning when
including `jwt.hpp`.
- `src/input_common/input_poller.cpp`: Add missing `override` specifiers.
- src/common/swap.h: Remove redundant `operator&`. In general, this
file declares three overloads of each operator. Using `+` as an
example, the overloads are:
- a member function for `swapped_t + integer`
- a member function for `swapped_t + swapped_t`
- a free function for `integer + swapped_t`
But for `operator&`, there was an additional free function for
`swapped_t + integer`, which was redundant with the member function.
This caused a GCC warning saying "ISO C++ says that these are
ambiguous".
|
|\
| |
| | |
yuzu-qt: Add configuration for screenshot resolution
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
|\
| |
| | |
general: Reimplement per-game configurations
|
| | |
|
| |
| |
| |
| |
| |
| | |
Causes a crash on MSVC from a race condition on application quit.
Intended to address yuzu-emu/yuzu/issues/11137
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Improve storage requirements.
|
| |
| |
| |
| | |
Unecessary, and would run every time the settings are logged.
|
| | |
|
| | |
|
| |
| |
| |
| | |
Fixes essentially a shadowing issue.
|
| |
| |
| |
| |
| |
| | |
Addresses review feedback
Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com>
|
| |
| |
| |
| | |
Allows for 6GB and 8GB layouts to be selected.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Not sure how I missed this earlier, but these vectors can be constructed
using the type of the enum.
|
| | |
|
| | |
|
| |
| |
| |
| | |
settings_common: Remove unused optional
|
| |
| |
| |
| | |
Suggests to a frontend how to represent each setting.
|
| |
| |
| |
| | |
Renames enum values to conform to naming convention.
|
| |
| |
| |
| |
| |
| | |
The new enum macros don't support setting values directly.
For LastAA and LastFilter, this means we need a simpler approach to loop
around the toggle in the frontend...
|
| |
| |
| |
| |
| | |
This lets us define an enum and all the textual representations
of its values in one swing. All for the price of some ugly macros.
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Clang versions < 15 have compile issues with explicit instantiation.
Disable it for these versions.
|
| | |
|
| |
| |
| |
| | |
Fixes -Wshadow, -Wdeprecated, and catch by copy rather than by ref.
|
| |
| |
| |
| | |
Almost a 2 year old migration setting now
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Reduces the need for the compiler to duplicate this code, by about
100KB executable size.
|
| |
| |
| |
| |
| | |
ToString didn't have a constexpr if statement where needed.
Canonicalize missed an else, causing unreachable code error on MSVC.
|
| |
| |
| |
| | |
Reduces compile times a tad on clang.
|
| | |
|
| |
| |
| |
| | |
Using typeid without including typeinfo first produces an ill-formed program.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
Groups graphics audio and system settings together in a way that
reflects the frontend. This also just conceptually groups them more
nicely than they were.
|
| |
| |
| |
| |
| |
| | |
Also adds a couple characters that denotes the state of the setting.
M for modified, or not default.
C for custom, in context of per-game settings.
|
| |
| |
| |
| | |
Gives every option of the enums a string literal via a macro.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Needs a considerable amount of management specific to some of
the comoboboxes due to the audio engine configuration.
general: Partial audio config implmentation
configure_audio: Implement ui generation
Needs a considerable amount of management specific to some of
the comoboboxes due to the audio engine configuration.
general: Partial audio config implmentation
settings: Make audio settings as enums
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
These don't need to be whole new types.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Will help with generating config UI later.
|
| |
| |
| |
| |
| |
| |
| | |
We can iterate through the AdvancedGraphics settings and generate the UI
during runtime. This doesn't help runtime efficiency, but it helps a ton
in reducing the amount of work a developer needs in order to add a new
setting.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
LoadString: Sanitize input
settings: Handle empty string, remove redundant category
settings: Rename Input to Controls, FS to DataStorage
settings: Fix Controls groups information
settings: Move use_docked_mode to System (again)
settings: Document
settings: Add type identification function
settings: Move registry into values
settings: Move global_reset_registry into values
settings: Separate AdvGraphics from Renderer
settings: More document
squash
settings: Use linkage object
uisettings: Move registry into settings
Probably wont build without
uisettings: Use settings linkage object
config: Load settings with a map
Uses the new all_settings vector to load settings.
qt-config: Rename settings category
qt config: Rename to read category
config: Read/write contols category with for_each
This is extremely limited due to the complexity of the Controls group,
but this handles the the settings that use the interface.
qt-config: Use new settings registry
qt-config: Read/write advgrphics
qt-config: Use settings linkage object
yuzu_cmd: Load setting off of vector
cmd-config: Finish settings rename
config: Read controls settings group with for_each
cmd/config: Move registry into values
cmd: Read adv graphics
cmd-config: Use settings linkage object
|
| |
| |
| |
| | |
core: Fix MSVC errors
|
| | |
|
| |
| |
| |
| | |
Just puts them all neatly into one place.
|
| |
| |
| |
| | |
We are providing a conversion to nanoseconds in NativeClock, which is more precise than the GPU tick.
|
|\ \
| | |
| | | |
Fixes and workarounds to make UBSan happier on macOS
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There are still some other issues not addressed here, but it's a start.
Workarounds for false-positive reports:
- `RasterizerAccelerated`: Put a gigantic array behind a `unique_ptr`,
because UBSan has a [hardcoded limit](https://stackoverflow.com/questions/64531383/c-runtime-error-using-fsanitize-undefined-object-has-a-possibly-invalid-vp)
of how big it thinks objects can be, specifically when dealing with
offset-to-top values used with multiple inheritance. Hopefully this
doesn't have a performance impact.
- `QueryCacheBase::QueryCacheBase`: Avoid an operation that UBSan thinks
is UB even though it at least arguably isn't. See the link in the
comment for more information.
Fixes for correct reports:
- `PageTable`, `Memory`: Use `uintptr_t` values instead of pointers to
avoid UB from pointer overflow (when pointer arithmetic wraps around
the address space).
- `KScheduler::Reload`: `thread->GetOwnerProcess()` can be `nullptr`;
avoid calling methods on it in this case. (The existing code returns
a garbage reference to a field, which is then passed into
`LoadWatchpointArray`, and apparently it's never used, so it's
harmless in practice but still triggers UBSan.)
- `KAutoObject::Close`: This function calls `this->Destroy()`, which
overwrites the beginning of the object with junk (specifically a free
list pointer). Then it calls `this->UnregisterWithKernel()`. UBSan
complains about a type mismatch because the vtable has been
overwritten, and I believe this is indeed UB. `UnregisterWithKernel`
also loads `m_kernel` from the 'freed' object, which seems to be
technically safe (the overwriting doesn't extend as far as that
field), but seems dubious. Switch to a `static` method and load
`m_kernel` in advance.
|
|\ \ \
| |_|/
|/| | |
common: Use arithmetic instead of string ops to get time zone
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Protects against invalid hour offsets during transitions to years
following leap years.
|
| | |
| | |
| | |
| | |
| | | |
This path always results in Etc/UTC on MinGW, which often is not
close to the local time zone.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
MinGW's strftime implementation does not work and cannot be used to
determine the time zone. Besides that, the string operations are
actually unnecessary since we can get the offset from
std::localtime.
Compare localtime to gmtime to find the zone offset on all platforms.
|
| | |
| | |
| | |
| | | |
These occur in the latest commits in LLVM Clang.
|
| | | |
|
|\ \ \
| |_|/
|/| | |
Implement SSL service
|
| |\ \ |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This implements some missing network APIs including a large chunk of the SSL
service, enough for Mario Maker (with an appropriate mod applied) to connect to
the fan server [Open Course World](https://opencourse.world/).
Connecting to first-party servers is out of scope of this PR and is a
minefield I'd rather not step into.
## TLS
TLS is implemented with multiple backends depending on the system's 'native'
TLS library. Currently there are two backends: Schannel for Windows, and
OpenSSL for Linux. (In reality Linux is a bit of a free-for-all where there's
no one 'native' library, but OpenSSL is the closest it gets.) On macOS the
'native' library is SecureTransport but that isn't implemented in this PR.
(Instead, all non-Windows OSes will use OpenSSL unless disabled with
`-DENABLE_OPENSSL=OFF`.)
Why have multiple backends instead of just using a single library, especially
given that Yuzu already embeds mbedtls for cryptographic algorithms? Well, I
tried implementing this on mbedtls first, but the problem is TLS policies -
mainly trusted certificate policies, and to a lesser extent trusted algorithms,
SSL versions, etc.
...In practice, the chance that someone is going to conduct a man-in-the-middle
attack on a third-party game server is pretty low, but I'm a security nerd so I
like to do the right security things.
My base assumption is that we want to use the host system's TLS policies. An
alternative would be to more closely emulate the Switch's TLS implementation
(which is based on NSS). But for one thing, I don't feel like reverse
engineering it. And I'd argue that for third-party servers such as Open Course
World, it's theoretically preferable to use the system's policies rather than
the Switch's, for two reasons
1. Someday the Switch will stop being updated, and the trusted cert list,
algorithms, etc. will start to go stale, but users will still want to
connect to third-party servers, and there's no reason they shouldn't have
up-to-date security when doing so. At that point, homebrew users on actual
hardware may patch the TLS implementation, but for emulators it's simpler to
just use the host's stack.
2. Also, it's good to respect any custom certificate policies the user may have
added systemwide. For example, they may have added custom trusted CAs in
order to use TLS debugging tools or pass through corporate MitM middleboxes.
Or they may have removed some CAs that are normally trusted out of paranoia.
Note that this policy wouldn't work as-is for connecting to first-party
servers, because some of them serve certificates based on Nintendo's own CA
rather than a publicly trusted one. However, this could probably be solved
easily by using appropriate APIs to adding Nintendo's CA as an alternate
trusted cert for Yuzu's connections. That is not implemented in this PR
because, again, first-party servers are out of scope.
(If anything I'd rather have an option to _block_ connections to Nintendo
servers, but that's not implemented here.)
To use the host's TLS policies, there are three theoretical options:
a) Import the host's trusted certificate list into a cross-platform TLS
library (presumably mbedtls).
b) Use the native TLS library to verify certificates but use a cross-platform
TLS library for everything else.
c) Use the native TLS library for everything.
Two problems with option a). First, importing the trusted certificate list at
minimum requires a bunch of platform-specific code, which mbedtls does not have
built in. Interestingly, OpenSSL recently gained the ability to import the
Windows certificate trust store... but that leads to the second problem, which
is that a list of trusted certificates is [not expressive
enough](https://bugs.archlinux.org/task/41909) to express a modern certificate
trust policy. For example, Windows has the concept of [explicitly distrusted
certificates](https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/dn265983(v=ws.11)),
and macOS requires Certificate Transparency validation for some certificates
with complex rules for when it's required.
Option b) (using native library just to verify certs) is probably feasible, but
it would miss aspects of TLS policy other than trusted certs (like allowed
algorithms), and in any case it might well require writing more code, not less,
compared to using the native library for everything.
So I ended up at option c), using the native library for everything.
What I'd *really* prefer would be to use a third-party library that does option
c) for me. Rust has a good library for this,
[native-tls](https://docs.rs/native-tls/latest/native_tls/). I did search, but
I couldn't find a good option in the C or C++ ecosystem, at least not any that
wasn't part of some much larger framework. I was surprised - isn't this a
pretty common use case? Well, many applications only need TLS for HTTPS, and they can
use libcurl, which has a TLS abstraction layer internally but doesn't expose
it. Other applications only support a single TLS library, or use one of the
aforementioned larger frameworks, or are platform-specific to begin with, or of
course are written in a non-C/C++ language, most of which have some canonical
choice for TLS. But there are also many applications that have a set of TLS
backends just like this; it's just that nobody has gone ahead and abstracted
the pattern into a library, at least not a widespread one.
Amusingly, there is one TLS abstraction layer that Yuzu already bundles: the
one in ffmpeg. But it is missing some features that would be needed to use it
here (like reusing an existing socket rather than managing the socket itself).
Though, that does mean that the wiki's build instructions for Linux (and macOS
for some reason?) already recommend installing OpenSSL, so no need to update
those.
## Other APIs implemented
- Sockets:
- GetSockOpt(`SO_ERROR`)
- SetSockOpt(`SO_NOSIGPIPE`) (stub, I have no idea what this does on Switch)
- `DuplicateSocket` (because the SSL sysmodule calls it internally)
- More `PollEvents` values
- NSD:
- `Resolve` and `ResolveEx` (stub, good enough for Open Course World and
probably most third-party servers, but not first-party)
- SFDNSRES:
- `GetHostByNameRequest` and `GetHostByNameRequestWithOptions`
- `ResolverSetOptionRequest` (stub)
## Fixes
- Parts of the socket code were previously allocating a `sockaddr` object on
the stack when calling functions that take a `sockaddr*` (e.g. `accept`).
This might seem like the right thing to do to avoid illegal aliasing, but in
fact `sockaddr` is not guaranteed to be large enough to hold any particular
type of address, only the header. This worked in practice because in
practice `sockaddr` is the same size as `sockaddr_in`, but it's not how the
API is meant to be used. I changed this to allocate an `sockaddr_in` on the
stack and `reinterpret_cast` it. I could try to do something cleverer with
`aligned_storage`, but casting is the idiomatic way to use these particular
APIs, so it's really the system's responsibility to avoid any aliasing
issues.
- I rewrote most of the `GetAddrInfoRequest[WithOptions]` implementation. The
old implementation invoked the host's getaddrinfo directly from sfdnsres.cpp,
and directly passed through the host's socket type, protocol, etc. values
rather than looking up the corresponding constants on the Switch. To be
fair, these constants don't tend to actually vary across systems, but
still... I added a wrapper for `getaddrinfo` in
`internal_network/network.cpp` similar to the ones for other socket APIs, and
changed the `GetAddrInfoRequest` implementation to use it. While I was at
it, I rewrote the serialization to use the same approach I used to implement
`GetHostByNameRequest`, because it reduces the number of size calculations.
While doing so I removed `AF_INET6` support because the Switch doesn't
support IPv6; it might be nice to support IPv6 anyway, but that would have to
apply to all of the socket APIs.
I also corrected the IPC wrappers for `GetAddrInfoRequest` and
`GetAddrInfoRequestWithOptions` based on reverse engineering and hardware
testing. Every call to `GetAddrInfoRequestWithOptions` returns *four*
different error codes (IPC status, getaddrinfo error code, netdb error code,
and errno), and `GetAddrInfoRequest` returns three of those but in a
different order, and it doesn't really matter but the existing implementation
was a bit off, as I discovered while testing `GetHostByNameRequest`.
- The new serialization code is based on two simple helper functions:
```cpp
template <typename T> static void Append(std::vector<u8>& vec, T t);
void AppendNulTerminated(std::vector<u8>& vec, std::string_view str);
```
I was thinking there must be existing functions somewhere that assist with
serialization/deserialization of binary data, but all I could find was the
helper methods in `IOFile` and `HLERequestContext`, not anything that could
be used with a generic byte buffer. If I'm not missing something, then
maybe I should move the above functions to a new header in `common`...
right now they're just sitting in `sfdnsres.cpp` where they're used.
- Not a fix, but `SocketBase::Recv`/`Send` is changed to use `std::span<u8>`
rather than `std::vector<u8>&` to avoid needing to copy the data to/from a
vector when those methods are called from the TLS implementation.
|
|\ \ \ \
| |_|_|/
|/| | | |
Use spans over guest memory where possible instead of copying data
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This function throws a runtime error we can catch on old Windows 10
installs, so we can catch it here rather than disable this path for
everybody.
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Even though it compiles and runs fine on the latest Windows versions,
older LTSC builds will crash due to lacking support somewhere in the OS.
For now just disable it for MSVC until either Microsoft fixes this or we
no longer support 1809 LTSC.
|
|\ \ \
| | | |
| | | | |
general: Misc changes that did not deserve their own PRs
|
| | | | |
|
| | |/
| |/|
| | |
| | | |
Allows for implicit conversion to std::span<T>.
|
|\ \ \
| |/ /
|/| | |
input_common: Tune mouse controls
|
| | | |
|
|\ \ \
| | | |
| | | | |
x64: Make use of monitorx instructions for power efficient sleeps (AMD)
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
MWAITX is equivalent to UMWAIT on Intel's Alder Lake CPUs.
We can emulate TPAUSE by using MONITORX in conjunction with MWAITX to wait for 100K cycles.
|
| |/ /
| | |
| | |
| | | |
monitorx introduces 2 instructions: MONITORX and MWAITX.
|
|/ / |
|
| |
| |
| |
| |
| |
| | |
Adds <version> since we are looking at C++ implementation version
details. Also moves exception header includes into the if preprocessor
command since we only use it there.
|
| |
| |
| |
| |
| |
| | |
Windows will let you select time zones that will fail in their
own C++ implementation library. Evidently from the stack trace, we get a
runtime error to work with, so catch it and use the fallback.
|
|\ \
| | |
| | | |
input_common: Redesign mouse panning
|
| | | |
|
| | |
| | |
| | |
| | | |
Fix for checking file size for android content uris
|
|\ \ \
| | | |
| | | | |
general: remove atomic signal and wait
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
input_common: Implement native mifare/skylander support for joycons/pro controller
|
| | |_|/
| |/| | |
|
|\ \ \ \
| | | | |
| | | | | |
Remove memory allocations in some hot paths
|
| | |/ /
| |/| | |
|
|\ \ \ \
| |/ / /
|/| | | |
vfs_real: misc optimizations
|
| |/ / |
|
|\ \ \
| | | |
| | | | |
core_timing: Use CNTPCT as the guest CPU tick
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
Allows us to directly calculate the GPU tick without double conversion to and from the host clock tick.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Previously, we were mixing the raw CPU frequency and CNTFRQ.
The raw CPU frequency (1020 MHz) should've never been used as CNTPCT (whose frequency is CNTFRQ) is the only counter available.
|
| | | | |
|
| | | | |
|
|\ \ \ \
| |_|/ /
|/| | | |
video_core: optionally skip barriers on feedback loops
|
| | | | |
|
|/ / / |
|
|\ \ \
| |_|/
|/| | |
core,common: Implement missing time zone data/computations
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
time_zone: Remove maybe_unused
time_zone: Use s64 storages
time_zone: Catch by reference
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Moves it from Settings to Common::TimeZone, since this algorithm doesn't
depend on the setting. It also lets us use it in other libraries.
common: Various fixes
time_zone: Don't double up the std::abs
Too many absolute values were causing mirrored time zones to resolve
as the same.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Prevents needing to deduce the non-Switch setting in core. Instead, we
deduce the meaning of this setting where the heresy is committed, in
common.
settings: Remove strftime usage
GetTimeZoneString: Use standard features
Also forces GMT on MinGW due to broken strftime.
|
|\ \ \
| | | |
| | | | |
service: nfc: Add backup support
|
| | |/
| |/| |
|
|\ \ \
| | | |
| | | | |
nvnflinger: allow locking framerate during video playback
|
| |/ / |
|
|/ / |
|
|\ \
| |/
|/| |
Project Lime - yuzu Android Port
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
| |
Track the private anonymous placeholder mappings created by Unmap() and
wherever possible, replace existing placeholders with larger ones
instead of creating many small ones.
This helps with the buildup of mappings in /proc/YUZU_PID/maps after a
longer gaming session, improving stability without having to increase
vm.max_map_count to a ridiculous value. The amount of placeholder
mappings will no longer outgrow the amount of actual memfd mappings in
cases of high memory fragmentation.
|
|
|
|
| |
Implicit conversions are now disallowed in fmt 10. Use format_as to convert to the underlying type.
|
| |
|
|\
| |
| | |
configure_graphics: Add option to enable compute pipelines for Intel proprietary
|
| |
| |
| |
| |
| |
| | |
For the Intel proprietary driver's deficiencies.
settings: Restore compute option global state
|
|\ \
| | |
| | | |
Allow Fermi blit accelerate to work without images in cache
|
| | | |
|
|/ / |
|
| | |
|
|/ |
|
|\
| |
| | |
configuration: Expose separate swap present modes
|
| |
| |
| |
| |
| |
| |
| | |
Not entirely sure if we need this, but there's also no reason not to
support it.
settings: Give VSyncMode values
|
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, yuzu would try and guess which vsync mode to use given
different scenarios, but apparently we didn't always get it right. This
exposes the separate modes in a drop-down the user can select.
If a mode isn't available in Vulkan, it defaults to FIFO.
|
|\ \
| | |
| | | |
yuzu: Add motion preview to controller input
|
| | | |
|
| | | |
|
|/ / |
|
| | |
|
|\ \
| |/
|/| |
settings: rename extended memory layout to unsafe, move from general to system
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
|
|
|
| |
Co-Authored-By: liamwhite <liamwhite@users.noreply.github.com>
|
|
|
|
|
|
|
| |
MicroSleep allows the processor to pause for a "short" amount of time (in the microsecond range). This is useful for spin-waiting that does not require nanosecond precision.
This uses the new TPAUSE instruction introduced on Intel's newest processors as part of the waitpkg instructions. For CPUs that do not support waitpkg instructions, this is equivalent to yield().
Co-Authored-By: liamwhite <liamwhite@users.noreply.github.com>
|
|
|
|
| |
waitpkg introduces 3 instructions, UMONITOR, UMWAIT and TPAUSE.
|
| |
|
|
|
|
| |
Ports a small subset of boost's hash_value implementation (<= 1.80.0).
|
| |
|
|\
| |
| | |
bounded_threadsafe_queue: Use simplified impl of bounded queue
|
| |
| |
| |
| | |
Introduces PopModes to bring waiting logic into Pop, similar to Push.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Adds the PushModes Try and Wait to allow producers to specify how they want to push their data to the queue if the queue is full.
If the queue is full:
- Try will fail to push to the queue, returning false. Try only returns true if it successfully pushes to the queue. This may result in items not being pushed into the queue.
- Wait will wait until a slot is available to push to the queue, resulting in potential for deadlock if a consumer is not running.
|
| | |
|
| | |
|
| |
| |
| |
| | |
Provides a simplified SPSC, MPSC, and MPMC bounded queue implementation using mutexes.
|
|\ \
| |/
|/| |
kernel: use KTypedAddress for addresses
|
| | |
|
| | |
|
|/ |
|
| |
|
|\
| |
| | |
native_clock: Re-adjust the RDTSC frequency to its real frequency
|
| |
| |
| |
| | |
It was experimentally determined to be sufficient.
|
| |
| |
| |
| | |
We want to synchronize RDTSC to real time.
|
| | |
|
| |
| |
| |
| |
| | |
The RDTSC frequency reported by CPUID is not accurate to its true frequency.
We will spawn a separate thread to calculate the true RDTSC frequency after a measurement period of 30 seconds has elapsed.
|
|\ \
| | |
| | | |
input_common: Increase mouse sensitivity range
|
| | | |
|
|\ \ \
| | | |
| | | | |
kernel: avoid signed overflow UB on MSVC
|
| | |/
| |/| |
|
|\ \ \
| | | |
| | | | |
common: make BitCast constexpr
|
| |/ / |
|
|/ / |
|
|\ \
| | |
| | | |
core_timing: Reduce CPU usage on Windows
|
| | | |
|
| | |
| | |
| | |
| | | |
Ensures that this process is treated as a high performance process by the Windows scheduler.
|
| | |
| | |
| | |
| | |
| | |
| | | |
The precision of sleep_for and wait_for is limited to 1-1.5ms on Windows.
Using SleepForOneTick() allows us to sleep for exactly one interval of the current timer resolution.
This allows us to take advantage of systems that have a timer resolution of 0.5ms to reduce CPU overhead in the event loop.
|
| | | |
|
| | |
| | |
| | |
| | | |
This utilizes undocumented NtDll functions to change the current timer resolution from the default of 1ms.
|
| |/
| |
| |
| | |
This implementation provides a consistent, high performance, and high resolution clock where/when std::chrono::steady_clock does not provide sufficient precision.
|
|/
|
| |
Intial -> Initial
|
| |
|
| |
|
| |
|
|\
| |
| | |
texture_cache: Add asynchronous ASTC texture decoding
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
| |
added missing graphical settings to RestoreGlobalState()
|
| |
|
|
|
|
|
| |
This reverts commit 25fc5c0e1158cb8e81cbc769b24ad84032a1fbfd, reversing
changes made to af20e25081f97d55b451606c87922e2b49f0d363.
|
| |
|
|\
| |
| | |
input_common: Implement turbo buttons
|
| | |
|
|\ \
| |/
|/| |
hle_ipc: Use std::span to avoid heap allocations/copies when calling ReadBuffer
|
| | |
|
| |
| |
| |
| |
| |
| | |
Depends on https://github.com/yuzu-emu/build-environments/pull/69
clang-15 primary run
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
StoppableTimedWait allows for a timed wait to be stopped immediately after a stop is requested.
This is useful in cases where long duration thread sleeps are needed and allows for immediate joining of waiting threads after a stop is requested.
Co-Authored-By: liamwhite <liamwhite@users.noreply.github.com>
|
|\ \
| | |
| | | |
cmake: prefer system llvm library
|
| | | |
|
|\ \ \
| |/ /
|/| | |
Input_common: Implement custom joycon driver v2
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| |/ /
|/| | |
Add stacktrace symbol demangling
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
|/ / |
|
| | |
|
|\ \
| | |
| | | |
input_common: Create an update engine
|
| | | |
|
|\ \ \
| | | |
| | | | |
vulkan: implement 'turbo mode' clock booster
|
| | | | |
|
| | | | |
|
| | | | |
|
|/ / /
| | |
| | |
| | |
| | |
| | | |
As an optional feature which can be enabled in the advanced graphics configuration, all pipelines that get built at the initial shader loading are stored in a VkPipelineCache object and are dumped to the disk.
These vendor specific pipeline cache files are located at `/shader/GAME_ID/vulkan_pipelines.bin`. This feature was mainly added because of an issue with the AMD driver (see yuzu-emu#8507) causing invalidation of the cache files the driver builds automatically.
|
| | | |
|
| | | |
|
| | | |
|
|/ / |
|
| | |
|
|/
|
|
|
| |
Specify that we do not require swap to be reserved for this address range;
allow overcommitting.
|
|
|
|
|
| |
resize keeps previous data intact when the buffer grows
resize_destructive destroys the previous data when the buffer grows
|
| |
|
|
|
|
|
| |
This class creates a default initialized heap allocated buffer for cases where value initializing members during allocation or resize
is redundant.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Testing LTO (#4)
* Testing LTO
* clang
* linux
* Added the rest of Blinkhawk's optimizations
* Unlikely asserts
* Removing LTO from Linux builds - GCC
* Removing LTO from Linux builds - Clang
|
| |
|
|\
| |
| | |
general: improve handling of system startup failure
|
| | |
|
|\ \
| | |
| | | |
memory: correct semantics of data cache management operations
|
| | | |
|
|/ /
| |
| |
| |
| | |
Co-authored-by: goldenx86 <goldenx86@users.noreply.github.com>
Co-authored-by: BreadFish64 <breadfish64@users.noreply.github.com>
|
|\ \
| |/
|/| |
core: add option to break on unmapped access
|
| | |
|
|\ \
| | |
| | | |
cmake: prefer system libraries
|
| | | |
|
|\ \ \
| |/ /
|/| | |
Configuration: Add per-game input profiles
|
| | | |
|
|\ \ \
| | | |
| | | | |
video_core: add null backend
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
CMake: Use precompiled headers to improve compile times
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Co-Authored-By: liamwhite <9658600+liamwhite@users.noreply.github.com>
|
| | |_|/
| |/| | |
|
|\ \ \ \
| |/ / /
|/| | | |
general: fix compile for Apple Clang
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
common/cache_management: Amend header includes
|
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | | |
Narrows the include in the header to <cstddef>, since that's what houses
size_t's definition, meanwhile the <cstdint> include can be moved into
the cpp file.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Avoids the redundancy of needing to explictly specify the common
namespace and the type.
|
|/ / /
| | |
| | |
| | |
| | | |
This was previously being passed by value, which was unnecessary and
created more allocations than necessary.
|
|\ \ \
| | | |
| | | | |
FSR Sharpening Slider
|
| | | | |
|
| |/ / |
|
| | | |
|
|/ /
| |
| | |
GLASM is not very compatible with the latest games, and too many people have the special superpower to break their Vulkan support.
|
|\ \
| | |
| | | |
kernel: implement data cache management operations
|
| | | |
|
|\ \ \
| |_|/
|/| | |
Add break for default cases
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Visual Studio has an option to search all files in a solution, so I
did a search in there for "default:" looking for any missing break
statements.
I've left out default statements that return something, and that throw
something, even if via ThrowInvalidType. UNREACHABLE leads towards throw
R_THROW macro leads towards a return
|
|/ |
|
|\
| |
| | |
Initial ARM64 support
|
| | |
|
|/
|
|
|
|
|
| |
According to the contributing page (https://github.com/yuzu-emu/yuzu/wiki/Contributing) the default cases should have a break statement
default:
// Yes, even break for the last case
break;
|
|
|
|
|
|
| |
This also covers std::span, which does not have a const iterator.
Also renames IsSTLContainer to IsContiguousContainer to explicitly convey its semantics.
|
|\
| |
| | |
input_common: cache vibration tests
|
| | |
|
| |
| |
| |
| | |
Disabling C4100 is similar to -Wno-unused-parameter
|
| |
| |
| |
| | |
These warnings are already included in /W3.
|
| | |
|
| | |
|
|/
|
|
| |
These are already explicitly or implicitly set in src/CMakeLists.txt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ensures that a fixed-point value is always initialized
This likely also fixes several cases of uninitialized values being
operated on, since we have multiple areas in the codebase where the
default constructor is being used like:
Common::FixedPoint<50, 14> current_sample{};
and is then followed up with an arithmetic operation like += or
something else, which operates directly on FixedPoint's internal data
member, which would previously be uninitialized.
|
|
|
|
|
| |
Given these are just moving a raw value around, these can sensibly be
made constexpr to make the interface more useful.
|
|
|
|
|
| |
These shouldn't throw and can influence how some standard algorithms
will work.
|
|
|
|
|
| |
Marks member functions as discard, where ignoring the return value would
be indicative of a bug or dead code.
|
|
|
|
|
|
|
|
|
|
|
| |
This calls round_up(), which is a non-const member function, so if a
fixed-point instantiation ever calls to_uint(), it'll result in a
compiler error.
This allows the member function to work.
While we're at it, we can actually mark to_long_floor() as const, since
it's not modifying any member state.
|
|
|
|
| |
Collapses all of the comparison functions down to a single line.
|
|
|
|
|
| |
Makes a few things a little less noisy and removes the need for SFINAE
in quite a few functions.
|
|\
| |
| | |
CMake: Try add_library "lz4" if "lz4::lz4" is unavailable
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Right now this looks like a distro specific problem, but we'll have to see.
Over on Gentoo: with lz4 1.9.3 there is a lz4::lz4 library target, with 1.9.4 it's no longer
mentioned in the cmake files provided by the package. (/usr/lib64/cmake/lz4)
arch and openSUSE have lz4 1.9.4 available so I checked there,
they only have .pc files for pkg-config, so asking for "lz4::lz4" works as usual
MSVC does require "lz4::lz4" to be asked for
|
| |
| |
| |
| | |
As we require the latest C++ standards to compile yuzu, checking for C++14 constexpr is not needed.
|
|/ |
|
|
|
|
| |
Since 16:10 was added, the maximum value is now 4.
|
| |
|
| |
|
| |
|
|
|
|
| |
Avoids conflicting with the va_start macro
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
cmake: fix git detection
|
| | |
|
|/
|
|
|
|
|
| |
The startup check apparently confuses other programs when yuzu launches
2 processes and then quickly closes one of them. Though this isn't
really our issues it's also not a big deal for me to add an option to
work around that issue.
|
|\
| |
| | |
[Coretiming/NVNFlinger] Improve multi-core vsync timing, and core timing accuracy
|
| | |
|
|\ \
| | |
| | | |
common: Use PROJECT_SOURCE_DIR to find CMakeModules
|
| | |
| | |
| | |
| | | |
Fixes CMake configuration when yuzu is a submodule of another project.
|
|\ \ \
| | | |
| | | | |
yuzu qt: Add option to create Windows crash dumps
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
yuzu: Move mini_dump out of core
startup_checks: Better exception handling
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
input_common: Add support for analog toggle
|
| | | | | |
|
|\ \ \ \ \
| |_|/ / /
|/| | | | |
video_core: add option for pessimistic flushing
|
| | | | | |
|
|\ \ \ \ \
| |_|/ / /
|/| | | | |
network: Fixes and improvements to the room feature
|
| |/ / /
| | | |
| | | |
| | | | |
Makes it easier for users to recognize connection errors caused by different game versions.
|
|/ / /
| | |
| | |
| | | |
replace it with alignas() and a C array
|
|\ \ \
| | | |
| | | | |
code: dodge PAGE_SIZE #define
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Some header files, specifically for OSX and Musl libc define PAGE_SIZE to be a number
This is great except in yuzu we're using PAGE_SIZE as a variable
Specific example
`static constexpr u64 PAGE_SIZE = u64(1) << PAGE_BITS;`
PAGE_SIZE PAGE_BITS PAGE_MASK are all similar variables.
Simply deleted the underscores, and then added YUZU_ prefix
Might be worth noting that there are multiple uses in different classes/namespaces
This list may not be exhaustive
Core::Memory 12 bits (4096)
QueryCacheBase 12 bits
ShaderCache 14 bits (16384)
TextureCache 20 bits (1048576, or 1MB)
Fixes #8779
|
|/ / / |
|
| | | |
|
| | | |
|
| |/
|/| |
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[REUSE] is a specification that aims at making file copyright
information consistent, so that it can be both human and machine
readable. It basically requires that all files have a header containing
copyright and licensing information. When this isn't possible, like
when dealing with binary assets, generated files or embedded third-party
dependencies, it is permitted to insert copyright information in the
`.reuse/dep5` file.
Oh, and it also requires that all the licenses used in the project are
present in the `LICENSES` folder, that's why the diff is so huge.
This can be done automatically with `reuse download --all`.
The `reuse` tool also contains a handy subcommand that analyzes the
project and tells whether or not the project is (still) compliant,
`reuse lint`.
Following REUSE has a few advantages over the current approach:
- Copyright information is easy to access for users / downstream
- Files like `dist/license.md` do not need to exist anymore, as
`.reuse/dep5` is used instead
- `reuse lint` makes it easy to ensure that copyright information of
files like binary assets / images is always accurate and up to date
To add copyright information of files that didn't have it I looked up
who committed what and when, for each file. As yuzu contributors do not
have to sign a CLA or similar I couldn't assume that copyright ownership
was of the "yuzu Emulator Project", so I used the name and/or email of
the commit author instead.
[REUSE]: https://reuse.software
Follow-up to 01cf05bc75b1e47beb08937439f3ed9339e7b254
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
Project Andio
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Between packages breaking, Conan always being a moving target for
minimum required CMake support, and now their moves to Conan 2.0 causing
existing packages to break, I suppose this was a long time coming. vcpkg
isn't without its drawbacks, but at the moment it seems easier on the
project to use for external packages.
Mostly removes the logic for Conan from the root CMakeLists file,
leaving basic find_package()'s in its place. Sets only the
find_package()'s that require CONFIG mode as necessary. clang and linux
CI now use the vcpkg toolchain file configured in the Docker container
when possible.
mingw CI turns off YUZU_TESTS because there's no way on the container to
run Windows executables on a Linux host anyway, and it's not easy to get
Catch2 there.
|
|\
| |
| | |
hle: service: nvflinger: Factor speed limit into frame time calculation.
|
| |
| |
| |
| | |
- These were all somewhat redundant.
|
|\ \
| |/
|/| |
common/x64: Use TSC clock rate from CPUID when available
|
| | |
|
| |
| |
| |
| | |
The current method used to estimate the TSC is fairly accurate - within a few kHz - but the exact value can be extracted from CPUID if available.
|
|\ \
| | |
| | | |
common/setting: Make ranged a property of the type
|
| | |
| | |
| | |
| | |
| | | |
- Avoids new GCC 12 warnings when Type is of form std::optional<T>
- Makes more sense this way, because ranged is not a property which would change over time
|
|\ \ \
| | | |
| | | | |
service: ptm: Add TS, nifm: Stub GetInternetConnectionStatus
|
| | | | |
|
|\ \ \ \
| |_|/ /
|/| | | |
common: fix bitfield aliasing on GCC/Clang
|
| | | | |
|
|/ / / |
|
|\ \ \
| |_|/
|/| | |
settings: Consolidate RangedSetting's with regular ones
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The latest git version of GCC has issues with my diamond inheritance
shenanigans. Since that's now two compilers that don't like it I thought
it'd be best to just axe all of it and just have the two templates like
before.
This rolls the features of BasicRangedSetting into BasicSetting, and
likewise RangedSetting into Setting. It also renames them from
BasicSetting and Setting to Setting and SwitchableSetting respectively.
Now longer name corresponds to more complex thing.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|\
| |
| | |
core/debugger: memory breakpoint support
|
| | |
|
|\ \
| |/
|/| |
common: param_package: Demote DEBUG to TRACE for getters
|
| | |
|
|\ \
| | |
| | | |
bounded_threadsafe_queue: Use constexpr capacity and mask
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
While this is the primary change, we also:
- Remove the mpsc namespace and rename Queue to MPSCQueue
- Make Slot a private struct within MPSCQueue
- Remove the AlignedAllocator template argument, as we use std::allocator
- Replace instances of mask + 1 with capacity, and mask + 2 with capacity + 1
|
|\ \ \
| |_|/
|/| | |
yuzu: Make variable shadowing a compile-time error
|
| |/
| |
| |
| | |
GCC/Clang treats variables within lambdas as potentially shadowing those outside the lambda, despite them not being captured inside the lambda's capture list.
|
| | |
|
| | |
|
| | |
|
|/ |
|
|\
| |
| | |
gpu_thread: Move to bounded queue
|
| | |
|
|\ \
| | |
| | | |
general: Set renderer_backend's default to Vulkan
|
| | | |
|
| |/
|/| |
|
|/ |
|
|\
| |
| | |
input_common: Make vibration request async
|
| | |
|
|/
|
|
|
|
|
|
|
| |
Clang (rightfully) warns that we are checking for the existence of
pointer to something just allocated on the stack, which is always true.
Instead, check whether GetModuleFileNameW failed.
Co-authored-by: Mai M <mathew1800@gmail.com>
|
|
|
|
|
|
| |
Qt's QString::toStdU16String doesn't work when compiling against the
latest libstdc++, at least when using Clang. This function effectively
does the same thing as the aforementioned one.
|
|
|
|
| |
Co-Authored-By: liamwhite <liamwhite@users.noreply.github.com>
|
|\
| |
| | |
chore: add missing SPDX tags
|
| |
| |
| |
| | |
Follow-up to 99ceb03a1cfcf35968cab589ea188a8c406cda52
|
|/ |
|
|
|
|
|
| |
This formats all copyright comments according to SPDX formatting guidelines.
Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
|
| |
|
| |
|
| |
|
|\
| |
| | |
native_clock: Use lfence with rdtsc
|
| |
| |
| |
| | |
__forceinline required on MSVC for function to be inlined
|
| | |
|
| | |
|
|\ \
| |/
|/| |
configuration: Add Paranoid CPU accuracy level
|
| |
| |
| |
| | |
Disables most optimizations for the paranoid.
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Adds detection of additional CPU flags to cpu_detect and additions to telemetry output.
This is not exhaustive but guided by features that [dynarmic utilizes](https://github.com/merryhime/dynarmic/blob/bcfe377aaa5138af740e90af5be7a7dff7b62a52/src/dynarmic/backend/x64/host_feature.h#L12-L33) as well as features that are currently utilized but not reported to telemetry(invariant_tsc). This is intended to guide future optimizations.
AVX512 in particular is broken up into its individual subsets and some other processor features such as [sha](https://en.wikipedia.org/wiki/Intel_SHA_extensions) and [gfni](https://en.wikipedia.org/wiki/AVX-512#GFNI) are added to have some forward-facing data-points.
What used to be a single `CPU_Extension_x64_AVX512` telemetry field
is also broken up into individual `CPU_Extension_x64_AVX512{F,VL,CD,...}` fields.
|
|
|
|
|
| |
Non-owning `string_view` is flexable and
avoids some of the many redundant copies made over `std::string`
|
|
|
|
| |
Ensures that stop_token signals that stop has been requested before destruction of conditional_variable
|
|
|
|
| |
Restores compatibility with MSVC's `__cpuid` intrinsic.
|
| |
|
|
|
|
|
|
|
| |
Set the zero-enum value to Unknown
Move the Manufacterer enum into the CPUCaps structure namespace
Add "ParseManufacturer" utility-function
Fix cpu/brand string buffer sizes(!)
|
|
|
|
| |
Update some uses of `int` into some more explicitly sized types as well
|
| |
|
|
|
|
|
| |
As this structure gets more explicit, bools can be bitfields and
small enums can use smaller types for their span of values.
|
|
|
|
| |
Extracts a singular bit, as a bool, from the specified compile-time index.
|
|\
| |
| | |
host_memory: Fix fastmem crashes in debug builds
|
| |
| |
| |
| |
| |
| | |
It is possible for virtual_offset to not be 0 when the iterator is at the beginning, and thus, std::prev(it) may be evaluated, leading to a crash in debug mode.
Co-Authored-By: Fernando S. <1731197+FernandoS27@users.noreply.github.com>
|
|\ \
| |/
|/| |
logging: Convert `backend_thread` into an `std::jthread`
|
| |
| |
| |
| |
| |
| | |
Was getting an unhandled `invalid_argument` [exception](https://en.cppreference.com/w/cpp/thread/thread/join) during
shutdown on my linux machine. This removes the need for a `StopBackendThread` function entirely since `jthread`
[automatically handles both checking if the thread is joinable and stopping the token before attempting to join](https://en.cppreference.com/w/cpp/thread/jthread/~jthread) in the case that `StartBackendThread` was never called.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Inlines implementation of exclusive instructions into JITted code,
improving performance of applications relying heavily on these
instructions.
We also fastmem these instructions for additional speed, with
support for appropriate recompilation on fastmem failure.
An unsafe optimization to disable the intercore global_monitor is also
provided, should one wish to rely solely on cmpxchg semantics for
safety.
See also: merryhime/dynarmic#664
|
|
|
|
| |
- This will be used to enable emulation of a larger memory arrangement.
|
| |
|
|
|
|
| |
- Improves the implementations of MapPhysicalMemory and UnmapPhysicalMemory to more closely reflect latest HOS.
|
|
|
|
|
|
|
|
| |
Addresses https://github.com/yuzu-emu/yuzu/issues/7881 to fix linux
builds.
`YUZU_NON_COPYABLE` deletes the `T(const T&)` constructor which will
cause the implicitly defined default ctor/dtor to no-longer generate.
|
|\
| |
| | |
service/mnpp: Stub mnpp_app
|
| |
| |
| |
| | |
Used in Super Nintendo Entertainment System™ - Nintendo Switch Online
|
| |
| |
| |
| | |
These functions allow to construct a string view from an input buffer, avoiding the copy done by the non string view counterparts. However, callers must be cognizant of the viewed buffer's lifetime to avoid a use-after-free.
|
| | |
|
| |
| |
| |
| |
| | |
The string constructor of UUID states:
Should the input string not meet the above requirements, an assert will be triggered and an invalid UUID is set instead.
|
| |
| |
| |
| | |
This completes the removal of the old UUID implementation.
|
| |
| |
| |
| | |
This copies the internal bytes of the UUID into a u128 for backwards compatibility. This should not be used.
|
| | |
|
|/
|
|
|
| |
This is a fixed and revised implementation of UUID that uses an array of bytes as its internal representation of a UUID instead of a u128 (which was an array of 2 u64s).
In addition to this, the generation of RFC 4122 Version 4 compliant UUIDs is also implemented.
|
|
|
|
|
| |
Now that we're moved over to the YUZU_ defines, we can get rid of this
struct.
|
| |
|
|\
| |
| | |
input_common: Add home and hard touch press buttons to UDP controllers
|
| | |
|
|\ \
| | |
| | | |
common: wall_clock: Utilize constants for ms, us, and ns ratios
|
| | |
| | |
| | |
| | | |
In addition to requiring nanosecond precision, using the native clock requires that the hardware TSC has a precision greater than the emulated CPU and its clock counter.
|
| |/ |
|
|/
|
|
|
| |
Since this has a void return value, there's nothing that can actually be
used.
|
|\
| |
| | |
wall_clock: Use standard wall clock if rtsc frequency is too low
|
| | |
|
| |
| |
| |
| |
| | |
This allows us to eliminate any static constructors that would have been
emitted due to the function not being constexpr.
|
|/ |
|
|\
| |
| | |
common: bit_util: Add IsPow2 helper function
|
| |
| |
| |
| | |
Makes use of std::has_single_bit() to check whether the value is a power of 2.
|
|\ \
| | |
| | | |
input_common: Reintroduce motion from mouse and use button names
|
| |/ |
|
|/
|
|
| |
- When the emulator crashes to desktop below, we don't even get this captured in a log, making such issues harder to debug.
|
|
|
|
| |
... to common/logging/formatter.h
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
If the build is from a non-repository, these functions will return empty. This
patch allows using defines to CMake to set version info such as
-DGIT_BRANCH=master.
|
|\
| |
| | |
common/cpu_detect: Remove CPU family and model
|
| |
| |
| |
| | |
We currently do not make use of these fields, remove them for now.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
CallbackStatus instances aren't the cheapest things to copy around
(relative to everything else), given that they're currently 520 bytes in
size and are currently copied numerous times when callbacks are invoked.
Instead, we can pass the status by const reference to avoid all the
copying.
|
| |
| |
| |
| | |
Given these return void, these can be omitted.
|
| |
| |
| |
| | |
Avoids copies where reasonably applicable
|
|/
|
|
| |
Avoids creating copies of the struct where not necessary.
|
|\
| |
| | |
service/notif: Add notif:a and stub ListAlarmSettings, Initialize
|
| |
| |
| |
| | |
Used by ring fit adventure 1.2.0
|
|/ |
|
|
|
|
|
| |
In my testing, waiting for 200ms provided the same level of precision as the previous implementation when estimating the RDTSC frequency.
This significantly improves the yuzu executable launch times since we reduced the wait time from 3 seconds to 200 milliseconds.
|
|
|
|
| |
On some OSes, high_resolution_clock is an alias to system_clock and is not monotonic in nature. Replace this with steady_clock.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
start lion review
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
Logging: Impl refactor
|
| |
| |
| |
| |
| |
| |
| | |
Loop on stop_token and remove final_entry in Entry.
Move Backend thread out of Impl Constructor to its own function.
Add Start function for backend thread.
Use stop token in PopWait and check if entry filename is nullptr before logging.
|
|/
|
|
|
| |
This implementation is based on and is a subset of the proposed implementation of std::expected
https://github.com/TartanLlama/expected/blob/master/include/tl/expected.hpp
|
|
|
|
| |
VS2022 seems to introduce an optimization when moving vectors to check for equality of the element values. AlignmentAllocator needed to overload the equality operator to fix compilation of its usage in vector moving.
|
|
|
|
| |
Alleviates the dependency on chrono for all files that include settings.h
|
|
|
|
| |
Makes use of std::string_view in StringFromFixedZeroTerminatedBuffer and add bounds checking
|
| |
|
|
|
| |
This moves all GenerateYuzuPath calls outside of the platofrm-specific #ifdefs, replacing them with assignments to paths.
|
|\
| |
| | |
common/logging: Reduce dependent header include overhead
|
| | |
|
| |
| |
| |
| | |
This reduces the load of requiring to include std::chrono in all files which include log.h
|
|\ \
| |/
|/| |
Remove Boxcat BCAT backend
|
| | |
|
|/ |
|
| |
|
|
|
|
|
| |
Given we have a function to invalidate, we should also have ones to
query the validity. Also makes the code more straightforward to read.
|
|\
| |
| | |
videocore: Use std::jthread for worker threads
|
| |
| |
| |
| | |
Useful for jthreads which make use of the threadsafe queues.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
To keep the TAS inputs synced to the game speed even through lag spikes and loading zones, deeper access is required.
First, the `TAS::UpdateThread` has to be executed exactly once per frame. This is done by connecting it to the service method the game calls to pass parameters to the GPU: `Service::VI::QueueBuffer`.
Second, the loading time of new subareas and/or kingdoms (SMO) can vary. To counteract that, the `CPU_BOOST_MODE` can be detected: In the `APM`-interface, the call to enabling/disabling the boost mode can be caught and forwarded to the TASing system, which can pause the script execution if neccessary and enabled in the settings.
|
| |
| |
| |
| |
| |
| | |
First of all, TASing requires a script to play back. The user can select the parent directory at `System -> Filesystem`, next to an option to pause TAS during loads: This requires a "hacky" setup deeper in the code and will be added in the last commit.
Also, Hotkeys are being introduced: CTRL+F5 for playback start/stop, CTRL+F6 for re-reading the script and CTRL+F7 for recording a new script.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The base playback system supports up to 8 controllers (specified by `PLAYER_NUMBER` in `tas_input.h`), which all change their inputs simulataneously when `TAS::UpdateThread` is called.
The recording system uses the controller debugger to read the state of the first controller and forwards that data to the TASing system for recording. Currently, this process sadly is not frame-perfect and pixel-accurate.
Co-authored-by: Naii-the-Baf <sfabian200@gmail.com>
Co-authored-by: Narr-the-Reg <juangerman-13@hotmail.com>
|
|\ \
| | |
| | | |
Remove audio stretching
|
| | | |
|
| |/ |
|
|\ \
| |/
|/| |
input_common: Add advanced setting for 8 player support
|
| | |
|
| |
| |
| |
| | |
This adds bitwise shift operator overloads (<<, >>, <<=, >>=) in the macro DECLARE_ENUM_FLAG_OPERATORS(type)
|
| | |
|
| |
| |
| |
| | |
This allows us to avoid implicitly including <string> every time common_funcs.h is included.
|
|\ \
| |/
|/| |
nvdec: Add GPU video decoding for all capable drivers and platforms
|
| |
| |
| |
| |
| |
| | |
Some system configurations may see visual regressions or lower performance using GPU decoding compared to CPU decoding. This setting provides the option for users to specify their decoding preference.
Co-Authored-By: yzct12345 <87620833+yzct12345@users.noreply.github.com>
|
| | |
|
|\ \
| | |
| | | |
Project <tentative title>: Rework Garbage Collection.
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| |/ /
|/| | |
ngct: Stub NGCT:U service
|
| | | |
|
|/ / |
|
|\ \
| | |
| | | |
logging: Display backtrace on crash
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This implements backtraces so we don't have to tell users how to use gdb anymore.
This prints a backtrace after abort or segfault is detected. It also fixes the log getting cut off with the last line containing only a bracket. This change lets us know what caused a crash not just what happened the few seconds before it.
I only know how to add support for Linux with GCC. Also this doesn't work outside of C/C++ such as in dynarmic or certain parts of graphics drivers. The good thing is that it'll try and just crash again but the stack frames are still there so the core dump will work just like before.
|
| | |
| | |
| | |
| | |
| | |
| | | |
The log filter was being ignored on initialization due to the logging instance being initialized before the config instance, so the log filter was set to its default value.
This fixes that oversight, along with using descriptive exceptions instead of abort() calls.
|
|\| |
| | |
| | | |
logging: Simplify and make thread-safe
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
This simplifies the logging system.
This also fixes some lost messages on startup.
The simplification is simple. I removed unused functions and moved most things in the .h to the .cpp. I replaced the unnecessary linked list with its contents laid out as three member variables. Anything that went through the linked list now directly accesses the backends. Generic functions are replaced with those for each specific use case and there aren't many. This change increases coupling but we gain back more KISS and encapsulation.
With those changes it was easy to make it thread-safe. I just removed the mutex and turned a boolean atomic. I was planning to use this thread-safety in my next PR about stacktraces. It was actually async-signal-safety at first but I ended up using a different approach. Anyway getting rid of the linked list is important for that because have the list of backends constantly changing complicates things.
|
| |
| |
| |
| | |
The maximum is now 17 with the addition of Brazilian Portuguese
|
|\ \
| | |
| | | |
dynarmic: Update and enable DYNARMIC_IGNORE_ASSERTS
|
| | | |
|
|\ \ \
| |/ /
|/| | |
Fix LAN Play
|
| |\| |
|
| | |
| | |
| | |
| | | |
This commit renames the "Services" tab to "Network" and adds a combobox that allows the user to select the network interface that yuzu should use. This new setting is now used to get the local IP address in Network::GetHostIPv4Address. This prevents yuzu from selecting the wrong network interface and thus using the wrong IP address. The return type of Network::GetHostIPv4Adress has also been changed.
|
| |/
|/|
| |
| |
| | |
This fixes a lost wakeup in SPSCQueue. If the reader is in just the right position, the writer's notification will be lost and this will be a problem if the writer then does something to wait on the reader.
This was discovered to affect my upcoming stacktrace PR. I don't think any performance decrease will be noticeable because an uncontended mutex is smart enough to skip the syscall. This PR might also resolve some rare deadlocks but I don't know of any examples.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
According to https://stackoverflow.com/questions/469508, we run into a
MSVC bug (since VS 2005) when using diamond inheritance for
RangedSetting.
This explicitly implements those functions in RangedSetting. GetValue is
implemented as just calling the inherited version. The explicit
converson operator is reimplemented. I opted for this over ignoring the
warning with a pragma since this specifies the inherited behavior, and I
have now less faith in MSVC to pick the right one.
In addition, we mark destructors as virtual to silence what I believe is
a fair MSVC compilation error.
|
|\ \
| | |
| | | |
settings: Implement settings ranges
|
| | |
| | |
| | |
| | |
| | |
| | | |
Addresses PR review
Co-authored-by: PixelyIon <pixelyion@protonmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Addresses review feedback.
Co-authored-by: Mai M. <mathew1800@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fixes a theoretical scenario where a Setting is using the BasicSetting's
GetValue function. In practice this probably only happens on yuzu-cmd,
where there is no need for a Setting's additional features. Need to fix
regardless.
|
| | |
| | |
| | |
| | |
| | | |
Clamps the setting's values against the specified minimum and maximum
values.
|
|\ \ \
| |_|/
|/| | |
common: uuid: Add hash function for UUID
|
| | |
| | |
| | |
| | | |
Used when UUID is a key in an unordered_map. The hash is produced by XORing the high and low 64-bits of the UUID together.
|
|\ \ \
| |/ /
|/| | |
assert: Avoid empty macros
|
| | | |
|
| | | |
|
|\ \ \
| |/ /
|/| | |
common: uuid: Add hex string to UUID constructor
|
| | |
| | |
| | |
| | | |
This allows for easily converting a hex string into a Common::UUID, which is backed by a 128 bit unsigned integer.
|
|/ /
| |
| |
| | |
Although this isn't used, this is a potential bug as HexStringToArray will perform an out-of-bounds read.
|
|\ \
| |/
|/| |
renderer_vulkan: Add setting to log pipeline statistics
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use VK_KHR_pipeline_executable_properties when enabled and available to
log statistics about the pipeline cache in a game.
For example, this is on Turing GPUs when generating a pipeline cache
from Super Smash Bros. Ultimate:
Average pipeline statistics
==========================================
Code size: 6433.167
Register count: 32.939
More advanced results could be presented, at the moment it's just an
average of all 3D and compute pipelines.
|
|\ \
| | |
| | | |
common: uuid: Return a lower-case hex string in Format
|
| | | |
|
|\ \ \
| | | |
| | | | |
host_memory: enable fastmem on FreeBSD
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
src/common/host_memory.cpp:360:14: error: use of undeclared identifier
'memfd_create'
fd = memfd_create("HostMemory", 0);
^
|
| | |/
| |/|
| | |
| | | |
HW.Memory <Critical> common/host_memory.cpp:HostMemory:492: Fastmem unavailable, falling back to VirtualBuffer for memory allocation
|
|\ \ \
| | | |
| | | | |
general: Implement FullscreenMode enumeration
|
| |\ \ \
| | | |/
| | |/| |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Prevents us from using an unclear 0 or 1 to describe the fullscreen
mode.
|
| |_|/
|/| |
| | |
| | | |
Allows for direct conversion to std::string without having to convert std::u8string to std::string
|
|\ \ \
| | | |
| | | | |
general: Rename "Frame Limit" references to "Speed Limit"
|
| |/ /
| | |
| | |
| | |
| | | |
This setting is best referred to as a speed limit, as it involves the limits of all timing based aspects of the emulator, not only framerate.
This allows us to differentiate it from the fps unlocker setting.
|
|\ \ \
| |_|/
|/| | |
config, nvflinger: Add FPS cap setting
|
| |/
| |
| |
| | |
Allows finer tuning of the FPS limit.
|
|\ \
| | |
| | | |
Shader Decompiler Rewrite
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
GLASM is getting good enough that we can move it out of advanced
graphics settings. This removes the setting `use_assembly_shaders`,
opting for a enum class `shader_backend`. This comes with the benefits
that it is extensible for additional shader backends besides GLSL and
GLASM, and this will work better with a QComboBox.
Qt removes the related assembly shader setting from the Advanced
Graphics section and places it as a new QComboBox in the API Settings
group. This will replace the Vulkan device selector when OpenGL is
selected.
Additionally, mark all of the custom anisotropic filtering settings as
"WILL BREAK THINGS", as that is the case with a select few games.
|
| | | |
|
| | |
| | |
| | |
| | | |
Also add a setting for enable Nsight Aftermath.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Mostly fixing unused *, implicit conversion, braced scalar init,
fpermissive, and some others.
Some Clang errors likely remain in video_core, and std::ranges is still
a pertinent issue in shader_recompiler
shader_recompiler: cmake: Force bracket depth to 1024 on Clang
Increases the maximum fold expression depth
thread_worker: Include condition_variable
Don't use list initializers in control flow
Co-authored-by: ReinUsesLisp <reinuseslisp@airmail.cc>
|
| | | |
|
| |/
| |
| |
| | |
state is unused in the branch where with_state is false
|
|/
|
|
|
| |
Common requires pthreads but does not refer to it when linking to other
modules. Fix this by linking to Threads where necessary.
|
|
|
|
| |
We can now update this for C++20
|
| |
|
|\
| |
| | |
settings: Eliminate usage of float-point setting values
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
settings: Disable FPS unlimit setting between title launches
|
| |/
| |
| |
| |
| |
| | |
Some titles crash if the FPS limit is disabled when launching. This change ensures that titles launch with the limit in-place to avoid issues.
In order to simplify the change, the UI toggle was removed as it will always be overridden at launch to be disabled.
The setting can still be toggled during gameplay with the hotkey, and indicated by the fps label in the status bar.
|
|\ \
| | |
| | | |
core,common,yuzu qt: Add CPU accuracy option 'Auto'
|
| | |
| | |
| | |
| | |
| | |
| | | |
Decouples the CPU debugging mode from the enumeration to its own
boolean. After this, it moves the CPU Debugging tab over to a sub tab
underneath the Debug tab in the configuration UI.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Old CPU Accuracy setting won't translate well into since we're adding
one at the beginning of the list. On first boot with the new setting,
just use the default setting.
|
| |/
| |
| |
| |
| |
| |
| | |
The current CPU accuracy settings in yuzu are fairly polarized and
require more than common knowledge to know what the optimal settings for
yuzu would be. This adds a curated option called 'Auto' that applies a
few at the moment known-good unsafe optimizations to Dynarmic.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|\
| |
| | |
general: Move most settings' defaults and labels into their definition
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Slight improvements to readability.
Dropped suggestions for string_view (settings.h:101), pass by value
(settings.h:82), reverting double to a float (config.cpp:316), and other
smaller ones, some out of scope.
Addresses review feedback.
Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com>
|
| |
| |
| |
| | |
Fixes Disgaea 6 Demo issues.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Creates a new BasicSettings class in common/settings, and forces setting
a default and label for each setting that uses it in common/settings.
Moves defaults and labels from both frontends into common settings.
Creates a helper function in each frontend to facillitate reading the
settings now with the new default and label properties.
Settings::Setting is also now a subclass of Settings::BasicSetting. Also
adds documentation for both Setting and BasicSetting.
|
| |
| |
| |
| | |
Requires a default value when creating each per-game setting.
|
| |
| |
| |
| | |
There's no point in keeping the file open after the write limit is exceeded. This allows the file to be committed to the disk shortly after it is closed and avoids redundantly checking whether or not the write limit is exceeded.
|
| |
| |
| |
| |
| |
| | |
It became apparent that logging can continuously spam errors that trigger file flushing.
Since committing the files to disk is an expensive operation, this causes unnecessarily high disk usage.
As such, we will revert Flush() to the previous behavior and add a Commit() member function in the event that this behavior is needed.
|
|/
|
|
| |
This ensures that GetSize always retrieves the correct file size after a write operation.
|
|\
| |
| | |
common: Replace common_sizes into user-literals
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Removes common_sizes.h in favor of having `_KiB`, `_MiB`, `_GiB`, etc
user-literals within literals.h.
To keep the global namespace clean, users will have to use:
```
using namespace Common::Literals;
```
to access these literals.
|
| | |
|
|\ \
| |/
|/| |
externals: Update fmt to 8.0.0
|
| |
| |
| |
| | |
Also removes some deprecated API usages.
|
|\ \
| |/
|/| |
GPU: Implement a garbage collector for GPU Caches (project Reaper+)
|
| | |
|
| | |
|
|\ \
| | |
| | | |
common/detached_tasks: Wait for tasks before shutting down
|
| | |
| | |
| | |
| | |
| | |
| | | |
If this is not waited on, the synchronization primitives are destroyed
whe main exits and the detached task ends up signalling garbage and not
properly finishing.
|
| | |
| | |
| | |
| | | |
This provides a more concrete example of what a regular file is and isn't.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This check was preventing files with the Write or Append file access modes from being created, as per the documented behavior in FileAccessMode.
This amends the check to test for the existence of a filesystem object prior to checking whether it is a regular file.
Thanks to liushuyu for pointing out that removing the check altogether would not guard against attempting to open non-regular files such as directories, symlinks, FIFO (pipes), sockets, block devices, or character devices.
The documentation has also been updated for these functions to clarify that a file refers to a regular file.
|
| | |
| | |
| | |
| | | |
Similarly, Flush() is typically called to attempt to flush a file into the disk. In the one case where this is used, we do not care whether the flush has succeeded or not, making [[nodiscard]] unnecessary.
|
|/ /
| |
| |
| |
| |
| | |
There are a lot of scenarios where we don't particularly care whether or not the removal operation and just simply attempt a removal.
As such, removing the [[nodiscard]] attribute is best for these functions.
|
|\ \
| | |
| | | |
Update dynarmic and add new unsafe CPU option.
|
| | | |
|
|\ \ \
| |/ /
|/| | |
nvflinger: Add experimental toggle to disable buffer swap interval limits
|
| |/
| |
| |
| |
| | |
Enabling this setting will allow some titles to present more frames to
the screen as they become available in the nvflinger buffer queue.
|
|/
|
|
|
| |
Microsoft defines `MEM_RESERVE_PLACEHOLDER` as `0x00040000`, but our
manually imported version of it drops the last zero.
|
|\
| |
| | |
textures: Add a toggle for GPU Accelerated ASTC decoder
|
| | |
|
|\ \
| | |
| | | |
fsp_srv: Fix filesystem access logging
|
| | |
| | |
| | |
| | | |
The Append open mode will create a new file if said file does not exist at a given path, making this call redundant.
|
| |/
| |
| |
| |
| |
| |
| |
| | |
This introduces a new setting Enable FS Access Log which saves the filesystem access log to sdmc:/FsAccessLog.txt
If this setting is not enabled, this will indicate to FS to not call OutputAccessLogToSdCard.
Fixes softlocks during loading in Xenoblade Chronicles 2 when certain DLC is enabled.
|
|\ \
| |/
|/| |
common: fs: file: Flush the file to the disk when Flush() is called
|
| |
| |
| |
| |
| |
| | |
std::fflush does not guarantee that file buffers are flushed to the disk.
Use _commit on Windows and fsync on all other OSes to ensure that the file is flushed to the disk.
|
|\ \
| | |
| | | |
common: fs: Use the normal directory iterator in *Recursively functions
|
| |/
| |
| |
| |
| |
| | |
MSVC's implementation of recursive_directory_iterator throws an exception on an error despite a std::error_code being passed into its constructor. This is most likely a bug in MSVC's implementation since directory_iterator does not throw an exception on an error.
We can replace the usage of recursive_directory_iterator for now until MSVC fixes their implementation of it.
|
| | |
|
|/
|
|
| |
Allows us to forward declare Common::FS::IOFile.
|
|
|
|
|
|
| |
This falls back to the old approach of using a virtual buffer.
Windows is untested, but this build should fix support for Windows < 10 v1803. However without fastmem support at all.
|
|
|
|
| |
Workaround old headers and libraries shipped on MinGW.
|
| |
|
| |
|
|
|
|
|
| |
In theory, if we have 2 MB continously mapped, this should save one layer of TLB.
Let's make it at least more likely by aligning the memory.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
We can't make use of the return value here, since we don't a return
value to work with.
|
|\
| |
| | |
common_funcs: Move R_ macros to result.h
|
| |
| |
| |
| |
| |
| | |
These macros all interact with the result code type, so they should
ideally be within this file as well, so all the common_funcs machinery
doesn't need to be pulled in just to use them.
|
| | |
|
|/ |
|
|\
| |
| | |
core/memory: Check our memory fallbacks for out-of-bound behavior.
|
| |
| |
| |
| |
| |
| | |
This makes it by far harder to crash yuzu.
Also implement the 48bit masking of AARCH64 while touching this code.
|
|/
|
|
|
| |
This is generic enough that it can be moved into the Common class for
reuse.
|
|
|
|
|
| |
Relocates them to the same place the move equivalents are at for
consistent viewing.
|
|
|
|
| |
IOFile is a final class, so there's no need for a virtual destructor.
|
|
|
|
| |
Prevents a potential uninitialized read vector in the move constructor.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* common: fs: fs_types: Create filesystem types
Contains various filesystem types used by the Common::FS library
* common: fs: fs_util: Add std::string to std::u8string conversion utility
* common: fs: path_util: Add utlity functions for paths
Contains various utility functions for getting or manipulating filesystem paths used by the Common::FS library
* common: fs: file: Rewrite the IOFile implementation
* common: fs: Reimplement Common::FS library using std::filesystem
* common: fs: fs_paths: Add fs_paths to replace common_paths
* common: fs: path_util: Add the rest of the path functions
* common: Remove the previous Common::FS implementation
* general: Remove unused fs includes
* string_util: Remove unused function and include
* nvidia_flags: Migrate to the new Common::FS library
* settings: Migrate to the new Common::FS library
* logging: backend: Migrate to the new Common::FS library
* core: Migrate to the new Common::FS library
* perf_stats: Migrate to the new Common::FS library
* reporter: Migrate to the new Common::FS library
* telemetry_session: Migrate to the new Common::FS library
* key_manager: Migrate to the new Common::FS library
* bis_factory: Migrate to the new Common::FS library
* registered_cache: Migrate to the new Common::FS library
* xts_archive: Migrate to the new Common::FS library
* service: acc: Migrate to the new Common::FS library
* applets/profile: Migrate to the new Common::FS library
* applets/web: Migrate to the new Common::FS library
* service: filesystem: Migrate to the new Common::FS library
* loader: Migrate to the new Common::FS library
* gl_shader_disk_cache: Migrate to the new Common::FS library
* nsight_aftermath_tracker: Migrate to the new Common::FS library
* vulkan_library: Migrate to the new Common::FS library
* configure_debug: Migrate to the new Common::FS library
* game_list_worker: Migrate to the new Common::FS library
* config: Migrate to the new Common::FS library
* configure_filesystem: Migrate to the new Common::FS library
* configure_per_game_addons: Migrate to the new Common::FS library
* configure_profile_manager: Migrate to the new Common::FS library
* configure_ui: Migrate to the new Common::FS library
* input_profiles: Migrate to the new Common::FS library
* yuzu_cmd: config: Migrate to the new Common::FS library
* yuzu_cmd: Migrate to the new Common::FS library
* vfs_real: Migrate to the new Common::FS library
* vfs: Migrate to the new Common::FS library
* vfs_libzip: Migrate to the new Common::FS library
* service: bcat: Migrate to the new Common::FS library
* yuzu: main: Migrate to the new Common::FS library
* vfs_real: Delete the contents of an existing file in CreateFile
Current usages of CreateFile expect to delete the contents of an existing file, retain this behavior for now.
* input_profiles: Don't iterate the input profile dir if it does not exist
Silences an error produced in the log if the directory does not exist.
* game_list_worker: Skip parsing file if the returned VfsFile is nullptr
Prevents crashes in GetLoader when the virtual file is nullptr
* common: fs: Validate paths for path length
* service: filesystem: Open the mod load directory as read only
|
|\
| |
| | |
common/compression: Make use of std::span
|
| |
| |
| |
| | |
Allows for the incoming data stream to be non-allocating.
|
| |
| |
| |
| | |
Allows making the incoming data stream non-allocating.
|
|/ |
|
|\
| |
| | |
configuration: Add CPU tab to game properties and slight per-game settings rework
|
| | |
|
| |
| |
| |
| |
| |
| | |
Allows setting CPU accuracy to Accurate or Unsafe per-game, as well as
the accuracy options for Unsafe. Debug is not allowed here as a per-game
CPU accuracy.
|
| |
| |
| |
| |
| | |
Required to make CPU accuracy and unsafe settings available to use as a
per-game setting.
|
|\ \
| | |
| | | |
parent_of_member: Make sign conversion explicit in OffsetOfImpl()
|
| |/
| |
| |
| |
| | |
Previously these conversions were implicit and causing quite a few
warnings on clang.
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
- Useful for scenarios where we do not want to inherit from NonCopyable.
|
|
|
|
| |
We can also avoid redundant constructions of the same string repeatedly.
|
|
|
|
| |
Same behavior, but less verbose.
|
|\
| |
| | |
common/log: Move Log namespace into the Common namespace
|
| |
| |
| |
| |
| | |
Follows our predominant coding style. Also explicitly specifies the move
constructor/assignment operator as well.
|
| |
| |
| |
| |
| | |
Forgot to move this over when I moved the rest of the source files with
lacking namespaces over.
|
| |
| |
| |
| | |
- Removes a dependency on core and input_common from common.
|
| |
| |
| |
| |
| |
| | |
- This is a developer-only setting and no longer needs to be enabled by default.
- Also adds "use_auto_stub" setting to SDL frontend while we are here.
- Supersedes #1340.
|
|/
|
|
| |
Prevents potential inclusion compilation errors.
|
|\
| |
| | |
Kernel Rework: Derive memory regions from board layout.
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
video_core: Avoid spin loops.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It shall block until there is something to consume in the queue.
And use it for the GPU emulation instead of the spin loop.
This is only in booting the emulator, however in BOTW this is the case for about 1 second.
|
|/ / |
|
|/
|
|
|
|
|
|
|
|
| |
Advantage: Altering the handler does not need a full recompilation.
Disadvantage: noreturn is droped, so the caller is a bit slower.
We quite often run yuzu with a YOLO assertion handler. In fact, only very few
games run at all with asserts. This patch allows developers to patch the handler
without recompiling everything. The overhead of the missing "noreturn" attribute
shoul be negletable.
|
|
|
|
| |
Stack overflow occurs with some guest applications
|
|
|
|
| |
- Fixes another small leak.
|
|
|
|
|
| |
- Avoids a memory leak, as taking a strong reference of the fiber here causes a circular reference.
- Supersedes #6006 with a more narrow fix.
|
| |
|
|\
| |
| | |
core: Switch to unique_ptr for usage of Common::Fiber.
|
| |
| |
| |
| |
| | |
- With using unique_ptr instead of shared_ptr, we have more explicit ownership of the context.
- Fixes a memory leak due to circular reference of the shared pointer.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
`network.cpp` has several error paths which either:
- report "Unhandled host socket error=n" and return `SUCCESS`, or
- switch on a few possible errors, log them, and translate them to
Errno; the same switch statement is copied and pasted in multiple
places in the code
Convert these paths to use a helper function `GetAndLogLastError`, which
is roughly the equivalent of one of the switch statements, but:
- handling more cases (both ones that were already in `Errno`, and a few
more I added), and
- using OS functions to convert the error to a string when logging, so
it'll describe the error even if it's not one of the ones in the
switch statement.
- To handle this, refactor the logic in `GetLastErrorMsg` to expose a
new function `NativeErrorToString` which takes the error number
explicitly as an argument. And improve the Windows version a bit.
Also, add a test which exercises two random error paths.
|
|\ \
| |/
|/| |
common,video-core: unbreak GCC 11 build on FreeBSD 13
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In file included from src/video_core/dma_pusher.cpp:5:
src/./common/cityhash.h:69:47: error: 'size_t' has not been declared
69 | [[nodiscard]] u64 CityHash64(const char* buf, size_t len);
| ^~~~~~
src/./common/cityhash.h:73:55: error: 'size_t' has not been declared
73 | [[nodiscard]] u64 CityHash64WithSeed(const char* buf, size_t len, u64 seed);
| ^~~~~~
src/./common/cityhash.h:77:56: error: 'size_t' has not been declared
77 | [[nodiscard]] u64 CityHash64WithSeeds(const char* buf, size_t len, u64 seed0, u64 seed1);
| ^~~~~~
src/./common/cityhash.h:80:47: error: 'size_t' has not been declared
80 | [[nodiscard]] u128 CityHash128(const char* s, size_t len);
| ^~~~~~
src/./common/cityhash.h:84:55: error: 'size_t' has not been declared
84 | [[nodiscard]] u128 CityHash128WithSeed(const char* s, size_t len, u128 seed);
| ^~~~~~
|
|\ \
| |/
|/| |
Kernel Rework: Memory updates and refactoring (Part 1)
|
| | |
|
| | |
|
|/
|
|
|
| |
- Previous optimized impl. resulted in an integer overflow, so revert.
- This is our slow/fallback path that should never be really be used, so the optimization in unimportant.
|
|
|
|
|
|
|
|
| |
Allow sharing return types with the rest of the code base. For example,
we use 'u128 = std::array<u64, 2>', meanwhile Google's code uses
'uint128 = std::pair<u64, u64>'.
While we are at it, use size_t instead of std::size_t.
|
| |
|
| |
|
|
|
|
| |
Prevents an operator delete error when compiling with Clang 11.
|
|
|
|
| |
This has been fixed as of Visual Studio 2019 Version 16.2
|
|\
| |
| | |
ring_buffer: Remove granularity template argument
|
| |
| |
| |
| |
| |
| | |
Non-obvious bug in RingBuffer::Push(std::vector<T>&) when granularity != 1
Just remove it altogether because we do not have a use for granularity != 1
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
renderer_opengl: Avoid precompiled cache and force NV GL cache directory
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Setting __GL_SHADER_DISK_CACHE_PATH we can force the cache directory to
be in yuzu's user directory to stop commonly distributed malware from
deleting our driver shader cache. And by setting
__GL_SHADER_DISK_CACHE_SKIP_CLEANUP we can have an unbounded shader
cache size.
This has only been implemented on Windows, mostly because previous tests
didn't seem to work on Linux.
Disable the precompiled cache on Nvidia's driver. There's no need to
hide information the driver already has in its own cache.
|
| | |
|
|/
|
|
|
|
| |
We can use the standardized CLZ facilities to perform this. This also
allows us to make utilizing functions constexpr and eliminate the
inclusion of an intrinsics header.
|
|\
| |
| | |
core: Silence Wclass-memaccess warnings and enforce it
|
| |
| |
| |
| |
| | |
This requires making several types trivial and properly initialize
them whenever they are called.
|
|\ \
| | |
| | | |
X86/NativeClock: Improve performance of clock calculations on hot path.
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
common/tree: Convert defines over to templates
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Reworks the tree header to operate off of templates as opposed to a
series of defines.
This allows all tree facilities to obey namespacing rules, and also
allows this code to be used within modules once compiler support is in
place.
This also gets rid to use a macro to define functions and structs for
necessary data types. With templates, these will be generated when
they're actually used, eliminating the need for the separate
declaration.
|
| | | |
| | | |
| | | |
| | | | |
Makes for less code to take care of.
|
|\ \ \ \
| | |_|/
| |/| | |
common/common_funcs: Rename INSERT_UNION_PADDING_{BYTES,WORDS} to _NOINIT
|
| | | |
| | | |
| | | |
| | | | |
INSERT_PADDING_BYTES_NOINIT is more descriptive of the underlying behavior.
|
|\ \ \ \
| | | | |
| | | | | |
common/timer: Remove
|
| |/ / /
| | | |
| | | |
| | | |
| | | | |
This is a leftover from citra and dolphin that isn't used at all,
particularly given the <chrono> header exists.
|
|\ \ \ \
| | | | |
| | | | | |
common/alignment: Rename AlignBits to AlignUpLog2 and use constraints
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
AlignUpLog2 describes what the function does better than AlignBits.
|
| |/ / /
|/| | |
| | | |
| | | | |
Makes for less code that we need to maintain.
|
|/ / /
| | |
| | |
| | | |
This is a leftover from Citra we no longer use.
|
|\ \ \
| |/ /
|/| | |
Port citra-emu/citra#5666: "Rotate previous log file to "citra_log.txt.old""
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Provides the same construct, but makes it obey namespacing.
|
| | | |
|
| | | |
|
|/ /
| |
| |
| |
| | |
Fixes instances where DivCeil(u32, u64) would surprisingly return u64,
instead of the more natural u32.
|
|/ |
|
| |
|
|\
| |
| | |
core/memory: Read and write page table atomically
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Squash attributes into the pointer's integer, making them an uintptr_t
pair containing 2 bits at the bottom and then the pointer. These bits
are currently unused thanks to alignment requirements.
Configure Dynarmic to mask out these bits on pointer reads.
While we are at it, remove some unused attributes carried over from
Citra.
Read/Write and other hot functions use a two step unpacking process that
is less readable to stop MSVC from emitting an extra AND instruction in
the hot path:
mov rdi,rcx
shr rdx,0Ch
mov r8,qword ptr [rax+8]
mov rax,qword ptr [r8+rdx*8]
mov rdx,rax
-and al,3
and rdx,0FFFFFFFFFFFFFFFCh
je Core::Memory::Memory::Impl::Read<unsigned char>
mov rax,qword ptr [vaddr]
movzx eax,byte ptr [rdx+rax]
|
|\ \
| | |
| | | |
Service threads
|
| |/ |
|
|/
|
|
|
|
|
|
|
|
|
|
| |
- For `std::same_as`, add missing include of `<concepts>`.
- For `std::convertible_to`, create a replacement in `common/concepts.h`
and use that instead.
This would also be found in `<concepts>`, but unlike `std::same_as`,
`std::convertible_to` is not yet implemented in libc++, LLVM's STL
implementation - not even in master. (In fact, `std::same_as` is the
*only* concept currently implemented. For some reason.)
|
|\
| |
| | |
Rewrite Kernel scheduler based on Atmosphere
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes regression by 761206cf81b271f7f4dd6a167a120325b760dbf3, 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.
|
| | |
|
| |
| |
| |
| |
| | |
This reverts commit ce5fcb6bb2c358b0251a2ce87945bda52789a76d, reversing
changes made to 6f41763061082d5fa2ab039c554427152243cb46.
|
| |
| |
| |
| |
| | |
This reverts commit 5fe55b16a11d9ec607fb8a3fdddc77a4393cd96a, reversing
changes made to e94dd7e2c4fc3f7ca2c15c01bdc301be2b8a4c1b.
|
| |
| |
| |
| |
| | |
This reverts commit 4e94d0d53af2cdb7b03ef9de23cc29f3565df97a, reversing
changes made to 6d6115475b4edccdf1bb4e96ecc3d3b1be319e76.
|
| |
| |
| |
| |
| | |
This reverts commit cdb36aef9ec9d30bdef1953f9ed46776ae2f12af, reversing
changes made to 5e9b77129f2cf8c039a8d98033cae4ac0f93f515.
|
| | |
|
| |
| |
| |
| | |
Fix invalid encoding paths when iterating over a directory on Windows.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Fix CreateFullPath to have its intended previous behavior (whatever
that was), and deprecate it in favor of the new CreateDirs function.
Unlike CreateDir, CreateDirs is marked as [[nodiscard]] to avoid new
code ignoring its result value.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Converts creation and deletion functions over to std::filesystem,
simplifying our file-handling code.
Notably with this, CopyDir will now function on Windows.
|
| |
| |
| |
| | |
Greatly simplifies our file-handling code for these functions.
|
|\ \
| | |
| | | |
video_core: Resolve more variable shadowing scenarios pt.3
|
| |/
| |
| |
| |
| | |
Cleans out the rest of the occurrences of variable shadowing and makes
any further occurrences of shadowing compiler errors.
|
| |
| |
| |
| | |
Makes for less reading.
|
|/ |
|
|\
| |
| | |
Kernel: Refactor to use 4-instances of Dynarmic & various cleanups and improvements
|
| |
| |
| |
| | |
- This will be aligned by default, and helps memory usage.
|
| | |
|
|\ \
| | |
| | | |
audio_core: Make shadowing and unused parameters errors
|
| |/
| |
| |
| | |
Moves the audio code closer to enabling warnings as errors in general.
|
|/
|
|
| |
Add an equivalent to 'Common::AlignUp(n, d) / d' and a log2 alternative.
|
|\
| |
| | |
logging/settings: Increase maximum log size to 100 MB and add extended logging option
|
| |
| |
| |
| |
| | |
The extended logging option is automatically disabled on boot but can be enabled afterwards, allowing the log file to go up to 1 GB during that session.
This commit also fixes a few errors that are present in the general debug menu.
|
|\ \
| | |
| | | |
hle: service: Stub OLSC Initialize and SetSaveDataBackupSettingEnabled functions.
|
| | |
| | |
| | |
| | | |
- Used by Animal Cross: New Horizons v1.6.0 update, minimal stub gets this update working.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|/ /
| |
| |
| |
| | |
Prevents us from churning memory by freeing and reallocating a memory
block that would have already been adequate as is.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
VirtualBuffer makes use of VirtualAlloc (on Windows) and mmap() (on
other platforms). Neither of these ensure that non-trivial objects are
properly constructed in the allocated memory.
To prevent potential undefined behavior occurring due to that, we can
add a static assert to loudly complain about cases where that is done.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Makes page tables and virtual buffers able to be moved, but not copied,
making the interface more flexible.
Previously, with the destructor specified, but no move assignment or
constructor specified, they wouldn't be implicitly generated.
|
| |
| |
| |
| | |
Resolves two -Wdocumentation warnings.
|
| |
| |
| |
| | |
Prevents indirect inclusions for these headers.
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
Allows building on clang to work again
|
| |
| |
| |
| | |
Cleans up common so that we can enable warnings as errors.
|
|\ \
| | |
| | | |
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.
|
|/ / |
|
| |
| |
| |
| |
| | |
YieldTo does not intend to modify the passed shared_ptrs.
Pass it by copy to keep a reference count while this function executes.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| | |
Should finally resolve building with clang.
|
| | |
|
|\ \
| | |
| | | |
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
|
|/ /
| |
| |
| |
| | |
Makes the input_common code warnings consistent with the rest of the
codebase.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| | |
| | | |
common: 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.
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| | |
| | | |
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.
|
|\ \ \
| | | |
| | | | |
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.
|
| | |
| | |
| | |
| | | |
Also amend the copyright notice to yuzu's instead of Dolphin's, which was mistakenly copy-pasted from another file.
|
|\ \ \
| | | |
| | | | |
input_common: Add a basic class for motion devices
|
| | |/
| |/| |
|
|\ \ \
| | | |
| | | | |
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.
|
|\ \ \ \
| |_|/ /
|/| | | |
Fix thread naming on Linux, which limits names to 15 bytes.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- 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!
|
|\ \ \ \
| | | | |
| | | | | |
Project Mjölnir: Part 1 - Input Rewrite
|
| | |/ /
| |/| |
| | | |
| | | |
| | | | |
Co-authored-by: James Rowe <jroweboy@gmail.com>
Co-authored-by: Its-Rei <kupfel@gmail.com>
|
|\ \ \ \
| |/ / /
|/| | | |
common/assert: Make use of C++ attribute syntax
|
| | |/
| |/|
| | |
| | | |
Normalizes the syntax used for attributes
|
|\ \ \
| |/ /
|/| | |
common/color: Migrate code over to the Common namespace
|
| | |
| | |
| | |
| | |
| | | |
No external code makes use of this header, so we can freely change the
namespace.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| | | |
| | | | |
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.
|
|\ \ \
| | | |
| | | | |
common/concepts: Move <type_traits> include out of the Common namespace
|
| |/ /
| | |
| | |
| | | |
This is a compiler/linker error waiting to happen.
|
| | | |
|
|\ \ \
| |/ /
|/| | |
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.
|
|\ \ \
| | | |
| | | | |
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.
|
|/ /
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
Seems like all compilers don't support std::span yet.
|
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| | |
| | | |
lz4_compression/zstd_compression: Make use of std::span in interfaces
|
| | |
| | |
| | |
| | | |
Allows compressing the data and size parameters into one.
|
| | |
| | |
| | |
| | | |
Allows condensing the data and size parameters into a single argument.
|
|\ \ \
| | | |
| | | | |
General: Tidy up clang-format warnings part 2
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | | |
common/virtual_buffer: drop unused includes
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
On DragonFly and NetBSD build fails with
src/common/virtual_buffer.cpp
src/common/virtual_buffer.cpp:16:10: fatal error: sys/sysinfo.h: No such file or directory
#include <sys/sysinfo.h>
^~~~~~~~~~~~~~~
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
|\ \ \ \
| |_|_|/
|/| | | |
partition_data_manager: Make data arrays constexpr
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
|\ \ \ \
| |_|/ /
|/| | | |
logging/backend: Make use of designated initializers
|
| |/ /
| | |
| | |
| | | |
Same behavior, less code.
|
|\ \ \
| |/ /
|/| | |
common/atomic_ops: Don't cast away volatile from pointers
|
| | |
| | |
| | |
| | | |
Preserves the volatility of the pointers being casted.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* 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
|
|\ \ \
| |/ /
|/| | |
screenshots: Option to save screenshots immediately in a specified directory + Linux workaround
|
| |/
| |
| |
| | |
Adds a screenshots directory as a path managed by FileUtil.
|
|\ \
| | |
| | | |
virtual_buffer: Mark size parameter of FreeMemoryPages() as [[maybe_unused]]
|
| |/
| |
| |
| |
| | |
This isn't used on Windows, but is used on non-Windows operating
systems.
|
|/
|
|
| |
This function was relocated to log.h as a constexpr function, so this
can be removed.
|
|
|
|
|
|
|
|
|
|
| |
In file included from src/core/hle/kernel/memory/page_table.cpp:5:
src/./common/alignment.h:67:68: error: no member named 'align_val_t' in namespace 'std'
return static_cast<T*>(::operator new (n * sizeof(T), std::align_val_t{Align}));
~~~~~^
src/./common/alignment.h:71:51: error: no member named 'align_val_t' in namespace 'std'
::operator delete (p, n * sizeof(T), std::align_val_t{Align});
~~~~~^
|
|
|
|
|
| |
With C++20, much of the allocator interface has been simplified, so we
can make the same adjustments.
|
|
|
|
| |
Allows removing a bunch of defines in favor of a two liner.
|
| |
|
| |
|
|
|
|
| |
In cases where the size is not a known constant when inlining, AlignUp<std::size_t> currently generates two 64-bit div instructions.
This generates one div and a cmov which is significantly cheaper.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|\
| |
| | |
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.
|
| | |
|
|/
|
|
|
|
| |
src/common/memory_detect.cpp:15:10: fatal error: 'sys/sysinfo.h' file not found
#include <sys/sysinfo.h>
^~~~~~~~~~~~~~~
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
This commit: Implements CPU Interrupts, Replaces Cycle Timing for Host
Timing, Reworks the Kernel's Scheduler, Introduce Idle State and
Suspended State, Recreates the bootmanager, Initializes Multicore
system.
|
|\
| |
| | |
Implement SpinLocks, Fibers and a Host Timer
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|\
| |
| | |
xbyak_abi: Cleanup
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Pushing GPRs twice.
|
|/
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
Logs both physical memory and swapfile sizes, this is useful for support.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
| |
|
|\
| |
| | |
common/file_util: Allow access to files on network shares
|
| |
| |
| |
| |
| |
| |
| |
| | |
On Windows, network shares use paths like \\server\share\file which were
being broken by FileUtil::SanitizePath() removing double slashes.
Changed the code in SanitizePath to permit a double-backslash if it
occurs at the start of a filepath (on Windows only).
|
|\ \
| | |
| | | |
file_util: Early-exit in WriteArray and ReadArray if specified lengths are zero
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It's undefined behavior to pass a null pointer to std::fread and
std::fwrite, even if the length passed in is zero, so we must perform
the precondition checking ourselves.
A common case where this can occur is when passing in the data of an
empty std::vector and size, as an empty vector will typically have a
null internal buffer.
While we're at it, we can move the implementation out of line and add
debug checks against passing in nullptr to std::fread and std::fwrite.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
|/ / |
|
|\ \
| |/
|/| |
yuzu: Drop SDL2 and Qt frontend Vulkan requirements
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* IOFile: Make the move constructor and move assignment operator noexcept
Certain parts of the standard library try to determine whether or not a
transfer operation should either be a copy or a move. The prevalent notion
of move constructors/assignment operators is that they should not throw,
they simply move an already existing resource somewhere else.
This is typically done with 'std::move_if_noexcept'. Like the name says,
if a type's move constructor is noexcept, then the functions retrieves an
r-value reference (for move semantics), or an l-value (for copy semantics)
if it is not noexcept.
As IOFile deletes the copy constructor and copy assignment operators,
using IOFile with certain parts of the standard library can fail in
unexcepted ways (especially when used with various container
implementations). This prevents that.
* fix various instances of -1 being assigned to unsigned types
* do not assign in conditional statements
* File/IOFile: Check _tfopen_s properly
* common/file_util.cpp: address review comments
Co-authored-by: Lioncash <mathew1800@gmail.com>
Co-authored-by: Shawn Hoffman <godisgovernment@gmail.com>
Co-authored-by: Sepalani <sepalani@hotmail.fr>
|
|\
| |
| | |
PageTable: move backing addresses to a children class as the CPU page table does not need them.
|
| |
| |
| |
| |
| |
| | |
This PR aims to reduce the memory usage in the CPU page table by moving
GPU specific parameters into a child class. This saves 1Gb of Memory for
most games.
|
| | |
|
| | |
|
|/
|
|
|
| |
Instead of pre-specializing shaders and then post-specializing them,
drop the later and only "specialize" the shader while decoding it.
|
| |
|
|\
| |
| | |
Port citra-emu/citra#5039: "common/logging: don't use regex for path trimming"
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
| |
An implementation of the cemuhook motion/touch protocol, this adds the
ability for users to connect several different devices to citra to send
direct motion and touch data to citra.
Co-Authored-By: jroweboy <jroweboy@gmail.com>
|
|
|
|
| |
The information is duplicated in the brand string and the telemetry field is unused
|
| |
|
| |
|
| |
|
|
|
| |
We relies on UNREACHABLE's noreturn attribute to eliminate parent's "no return value" warning. However, this was wrapped in a `if(!false)` block, which compilers may not unfold to recognize the noreturn nature.
|
| |
|
|
|
|
|
| |
Makes code that uses the macros consistent by requiring the lines to be
terminated with a semicolon.
|
|
|
|
|
| |
This is unused, so it can be removed. There's better ways of ensuring
zeroed out padding bits, like using zero-initialization, anyhow.
|
|
|
|
|
| |
We can trivially resolve these by casting the characters to unsigned
values and then shifting the bits.
|
| |
|
|
|
|
| |
- Zero initialization here is useful for determinism.
|
|
|
|
| |
See bunneis comment here https://github.com/citra-emu/citra/pull/4629#discussion_r258533167.
They were supposed to be removed by him, but he missed them.
|
|\
| |
| | |
Kernel: Implement a New Thread Scheduler V2
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Makes it explicit that the header is intended for iterator-based
algorithms that can ideally operate on any type.
|
|/
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
This was related to the source allocator being passed into the
constructor potentially having a different type than allocator being
constructed.
We simply need to provide a constructor to handle this case.
This resolves issues related to the allocator causing debug builds on
MSVC to fail.
|
|
|
|
|
| |
Allows containers and other data structures to consider optimizations
based off of them. We satisfy all of these requirements anyways.
|
|\
| |
| | |
Silence miscellaneous warnings
|
| | |
|
|\ \
| | |
| | | |
ci: Add custom titlebars for mainline and patreon
|
| |/ |
|
| | |
|
|/ |
|
| |
|
|
|
| |
This is better than just using something like Common.Filesystem or Common.Memory
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This commit ensures that all backing memory allocated for the Guest CPU
is aligned to 256 bytes. This due to how gpu memory works and the heavy
constraints it has in the alignment of physical memory.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of storing all block width, height and depths in their shifted
form:
block_width = 1U << block_shift;
Store them like they are provided by the emulated hardware (their
block_shift form). This way we can avoid doing the costly
Common::AlignUp operation to align texture sizes and drop CPU integer
divisions with bitwise logic (defined in Common::AlignBits).
|
| |
|
|
|
|
|
|
|
|
| |
Avoids potentially performing multiple reallocations (depending on the
size of the input data) by reserving the necessary amount of memory
ahead of time.
This is trivially doable, so there's no harm in it.
|
|
|
|
|
|
| |
These can be generified together by using a concept type to designate
them. This also has the benefit of not making copies of potentially very
large arrays.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allows for things such as:
auto rect = Common::Rectangle{0, 0, 0, 0};
as opposed to being required to explicitly write out the underlying
type, such as:
auto rect = Common::Rectangle<int>{0, 0, 0, 0};
The only requirement for the deduction is that all constructor arguments
be the same type.
|
|\
| |
| | |
mii: Implement MiiManager backend and several mii service commands
|
| | |
|
| | |
|
| |
| |
| | |
Since the Mii database uses UUIDs very similar to the Accounts database, it makes no sense to not share code between them.
|
| |
| |
| |
| | |
While we're at it, also invert the conditional into a guard clause.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
nullptr was being returned in the error case, which, at a glance may
seem perfectly OK... until you realize that std::string has the
invariant that it may not be constructed from a null pointer. This
means that if this error case was ever hit, then the application would
most likely crash from a thrown exception in std::string's constructor.
Instead, we can change the function to return an optional value,
indicating if a failure occurred.
|
| |
| |
| |
| |
| | |
These are already present within the header, so they don't need to be
repeated in the cpp file.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Makes the parameter ordering consistent, and also makes the filename
parameter a std::string. A std::string would be constructed anyways with
the previous code, as IOFile's only constructor with a filepath is one
taking a std::string.
We can also make WriteStringToFile's string parameter utilize a
std::string_view for the string, making use of our previous changes to
IOFile.
|
| |
| |
| |
| |
| |
| | |
The file stream open functions have supported std::string overloads
since C++11, so we don't need to use c_str() here. Same behavior, less
code.
|
| |
| |
| |
| |
| |
| | |
We don't need to force the usage of a std::string here, and can instead
use a std::string_view, which allows writing out other forms of strings
(e.g. C-style strings) without any unnecessary heap allocations.
|
|/
|
|
|
| |
Introduced in 72477731ed20c56a4d6f18a22f43224fab667cef. This is only
necessary within header files.
|
|
|
|
| |
These two files were missing the #pragma once directive.
|
|\
| |
| | |
common/scope_exit: Replace std::move with std::forward in ScopeExit()
|
| |
| |
| |
| |
| |
| | |
The template type here is actually a forwarding reference, not an rvalue
reference in this case, so it's more appropriate to use std::forward to
preserve the value category of the type being moved.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Uses arithmetic that can be identified more trivially by compilers for
optimizations. e.g. Rather than shifting the halves of the value and
then swapping and combining them, we can swap them in place.
e.g. for the original swap32 code on x86-64, clang 8.0 would generate:
mov ecx, edi
rol cx, 8
shl ecx, 16
shr edi, 16
rol di, 8
movzx eax, di
or eax, ecx
ret
while GCC 8.3 would generate the ideal:
mov eax, edi
bswap eax
ret
now both generate the same optimal output.
MSVC used to generate the following with the old code:
mov eax, ecx
rol cx, 8
shr eax, 16
rol ax, 8
movzx ecx, cx
movzx eax, ax
shl ecx, 16
or eax, ecx
ret 0
Now MSVC also generates a similar, but equally optimal result as clang/GCC:
bswap ecx
mov eax, ecx
ret 0
====
In the swap64 case, for the original code, clang 8.0 would generate:
mov eax, edi
bswap eax
shl rax, 32
shr rdi, 32
bswap edi
or rax, rdi
ret
(almost there, but still missing the mark)
while, again, GCC 8.3 would generate the more ideal:
mov rax, rdi
bswap rax
ret
now clang also generates the optimal sequence for this fallback as well.
This is a case where MSVC unfortunately falls short, despite the new
code, this one still generates a doozy of an output.
mov r8, rcx
mov r9, rcx
mov rax, 71776119061217280
mov rdx, r8
and r9, rax
and edx, 65280
mov rax, rcx
shr rax, 16
or r9, rax
mov rax, rcx
shr r9, 16
mov rcx, 280375465082880
and rax, rcx
mov rcx, 1095216660480
or r9, rax
mov rax, r8
and rax, rcx
shr r9, 16
or r9, rax
mov rcx, r8
mov rax, r8
shr r9, 8
shl rax, 16
and ecx, 16711680
or rdx, rax
mov eax, -16777216
and rax, r8
shl rdx, 16
or rdx, rcx
shl rdx, 16
or rax, rdx
shl rax, 8
or rax, r9
ret 0
which is pretty unfortunate.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Allows the compiler to inform when the result of a swap function is
being ignored (which is 100% a bug in all usage scenarios). We also mark
them noexcept to allow other functions using them to be able to be
marked as noexcept and play nicely with things that potentially inspect
"nothrowability".
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Including every OS' own built-in byte swapping functions is kind of
undesirable, since it adds yet another build path to ensure compilation
succeeds on.
Given we only support clang, GCC, and MSVC for the time being, we can
utilize their built-in functions directly instead of going through the
OS's API functions.
This shrinks the overall code down to just
if (msvc)
use msvc's functions
else if (clang or gcc)
use clang/gcc's builtins
else
use the slow path
|
|/
|
|
|
| |
We don't plan to support host 32-bit ARM execution environments, so this
is essentially dead code.
|
|\
| |
| | |
shader_cache: Permit a Null Shader in case of a bad host_ptr.
|
| | |
|
|\ \
| | |
| | | |
gl_shader_disk_cache: Use Zstandard for compression
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Makes the return type consistently uniform (like the intrinsics we're
wrapping). This also conveniently silences a truncation warning within
the kernel multi_level_queue.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Introduced within 798d76f4c7018174e58702fb06a042dc8c84f0be, this only
really has an effect within header files.
Silences a -Wpragma-once-outside-header warning with clang.
|
|\| |
| | |
| | | |
Better LZ4 compression utilization for the disk based shader cache and the yuzu build system
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since C++17, the introduction of deduction guides for locking facilities
means that we no longer need to hardcode the mutex type into the locks
themselves, making it easier to switch mutex types, should it ever be
necessary in the future.
|
|\ \ \
| |/ /
|/| | |
common/thread: Remove unused functions
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Many of these functions are carried over from Dolphin (where they aren't
used anymore). Given these have no use (and we really shouldn't be
screwing around with OS-specific thread scheduler handling from the
emulator, these can be removed.
The function for setting the thread name is left, however, since it can
have debugging utility usages.
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|\
| |
| | |
gpu: Rewrite MemoryManager based on the VMManager implementation.
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Introduced as a result of #2090, we already define the copy constructor
further down below, so this isn't needed.
|
|\ \
| | |
| | | |
Port citra-emu/citra#4244 and citra-emu/citra#4599: Changes to BitField
|
| | |
| | |
| | |
| | |
| | |
| | | |
This change needs to be made to get the code compiling again. It was suggested after a conversation with Lioncash.
The conversation can be seen here: https://user-images.githubusercontent.com/20753089/45064197-b6107800-b0b2-11e8-9db8-f696299fb86a.PNG
|
| | | |
|
| | |
| | |
| | |
| | | |
This is compromise for swap type being used in union. A union has deleted default constructor if it has at least one variant member with non-trivial default constructor, and no variant member of T has a default member initializer. In the use case of Bitfield, all variant members will be the swap type on endianness mismatch, which would all have non-trivial default constructor if default value is specified, and non of them can have member initializer
|
| | |
| | |
| | |
| | | |
The tag can be useful for other type-generic templates like BitFields to forward the endianness specification
|
| | | |
|
| | | |
|
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| | |
When #2247 was created, thread_queue_list.h was the only user of
boost-related code, however #2252 moved the page table struct into
common, which makes use of Boost.ICL, so we need to add the dependency
to the common library's link interface again.
|
|\ \
| | |
| | | |
common/thread_queue_list: Remove unnecessary dependency on boost
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We really don't need to pull in several headers of boost related
machinery just to perform the erase-remove idiom (particularly with
C++20 around the corner, which adds universal container std::erase and
std::erase_if, which we can just use instead).
With this, we don't need to link in anything boost-related into common.
|
| | | |
|
|\ \ \
| |/ /
|/| | |
Correct CNTPCT from using CPU Cycles to using Clock Cycles
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
shader_ir: Remove "extras" from the MetaTexture
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This makes the class much more flexible and doesn't make performing
copies with classes that contain a bitfield member a pain.
Given BitField instances are only intended to be used within unions, the
fact the full storage value would be copied isn't a big concern (only
sizeof(union_type) would be copied anyways).
While we're at it, provide defaulted move constructors for consistency.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Moves local global state into the Impl class itself and initializes it
at the creation of the instance instead of in the function.
This makes it nicer for weakly-ordered architectures, given the
CreateEntry() class won't need to have atomic loads executed for each
individual call to the CreateEntry class.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
This function is only ever used within this source file and makes it
easier to remove static state in the following change.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
These types are within the common library, so they should be within the
Common namespace.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
These types are within the common library, so they should be using the
Common namespace.
|
|/ / /
| | |
| | |
| | |
| | | |
Quaternion is within the common library, so it should be using the
Common namespace.
|
| | |
| | |
| | |
| | | |
Citra can't be compiled using GCC <7 because of required C++17 support, so these version checks don't need to exist anymore.
|
| | | |
|
|/ / |
|
|\ \
| | |
| | | |
vulkan: Add dependencies and device abstraction
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Makes it consistent with the regular standard containers in terms of
size representation. This also gets rid of dependence on our own
type aliases, removing the need for an include.
|
|/ /
| |
| |
| |
| |
| | |
The necessity of this parameter is dubious at best, and in 2019 probably
offers completely negligible savings as opposed to just leaving this
enabled. This removes it and simplifies the overall interface.
|
| | |
|
| |
| |
| | |
Co-Authored-By: ReinUsesLisp <reinuseslisp@airmail.cc>
|
| | |
|
|/ |
|
|\
| |
| | |
kernel: Handle kernel capability descriptors
|
| | |
|
|/
|
|
|
| |
Previously xyz was always being zero initialized due to its constructor,
but w wasn't. Ensures that we always have a deterministic initial state.
|
|\
| |
| | |
svc: Implement yield types 0 and -1
|
| | |
|
| | |
|
| |
| |
| |
| | |
Original reason:
As Windows multi-byte character codec is unspecified while we always assume std::string uses UTF-8 in our code base, this can output gibberish when the string contains non-ASCII characters. ::OutputDebugStringW combined with Common::UTF8ToUTF16W is preferred here.
|
|\ \
| | |
| | | |
common/thread: Minor cleanup
|
| | |
| | |
| | |
| | | |
This is inconsistent with our coding style.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
While admirable as a means to ensure immutability, this has the
unfortunate downside of making the class non-movable. std::move cannot
actually perform a move operation if the provided operand has const data
members (std::move acts as an operation to "slide" resources out of an
object instance). Given Barrier contains move-only types such as
std::mutex, this can lead to confusing error messages if an object ever
contained a Barrier instance and said object was attempted to be moved.
|
| | |
| | |
| | |
| | | |
Simplifies the constructor interfaces for Barrier and Event classes.
|
| | |
| | |
| | |
| | |
| | | |
Keeps the non-member interface in one spot instead of split into two
places, making it nicer to locate functions.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is also unused and superceded by standard functionality. The
standard library provides std::this_thread::sleep_for(), which provides
a much more flexible interface, as different time units can be used with
it.
|
| | |
| | |
| | |
| | |
| | |
| | | |
This is an old function that's no longer necessary. C++11 introduced
proper threading support to the language and a thread ID can be
retrieved via std::this_thread::get_id() if it's ever needed.
|
|/ /
| |
| |
| |
| |
| |
| | |
This is an analog of BitSet from Dolphin that was introduced to allow
iterating over a set of bits. Given it's currently unused, and given
that std::bitset exists, we can remove this. If it's ever needed in the
future it can be brought back.
|
|\ \
| | |
| | | |
common/math_util: Minor cleanup
|
| | |
| | |
| | |
| | | |
Gets rid of the need to use typename to access the ::type alias.
|
| | |
| | |
| | |
| | |
| | | |
Allows objects that contain rectangle instances to be constexpr
constructible as well.
|
| | |
| | |
| | |
| | | |
const/constexpr variables have internal linkage by default.
|
| | |
| | |
| | |
| | |
| | | |
This hasn't been used since the project started, so we may as well get
rid of it to keep it from bit rotting.
|
|/ /
| |
| |
| |
| |
| |
| | |
Xbyak is currently entirely unused. Rather than carting it along, remove
it and get rid of a dependency. If it's ever needed in the future, then
it can be re-added (and likely be more up to date at that point in
time).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently, there's no way to specify if an assertion should
conditionally occur due to unimplemented behavior. This is useful when
something is only partially implemented (e.g. due to ongoing RE work).
In particular, this would be useful within the graphics code.
The rationale behind this is it allows a dev to disable unimplemented
feature assertions (which can occur in an unrelated work area), while
still enabling regular assertions, which act as behavior guards for
conditions or states which must not occur. Previously, the only way a
dev could temporarily disable asserts, was to disable the regular
assertion macros, which has the downside of also disabling, well, the
regular assertions which hold more sanitizing value, as opposed to
unimplemented feature assertions.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Currently, this was only performing a logging call, which doesn't
actually invoke any assertion behavior. This is unlike
UNIMPLEMENTED_MSG, which *does* assert.
This makes the expected behavior uniform across both macros.
|
| | |
|
|/
|
| |
Needed as most all software keyboard functions use fixed-length UTF16 string buffers.
|
|
|
|
| |
Storing signed type causes the following behaviour: extractValue can do overflow/negative left shift. Now it only relies on two implementation-defined behaviours (which are almost always defined as we want): unsigned->signed conversion and signed right shift
|
|
|
|
|
|
|
|
| |
An old function from Dolphin. This is also unused, and pretty inflexible
when it comes to printing out different data types (for example, one
might not want to print out an array of u8s but a different type
instead. Given we use fmt, there's no need to keep this implementation
of the function around.
|
|
|
|
|
|
| |
This is an unused hold-over from Dolphin that was primarily used to
parse values out of the .ini files. Given we already have libraries that
do this for us, we don't need to keep this around.
|
|
|
|
|
| |
This is currently unused and doesn't really provide much value to keep
around either.
|
|\
| |
| | |
logging: Add DebuggerBackend for logging to Visual Studio
|
| | |
|
| | |
|
| |
| |
| |
| | |
Just a few overlooked services.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Everything from here is completely unused and also written with the
notion of supporting 32-bit architecture variants in mind. Given the
Switch itself is on a 64-bit architecture, we won't be supporting 32-bit
architectures. If we need specific allocation functions in the future,
it's likely more worthwhile to new functions for that purpose.
|
| |
| |
| |
| | |
MinGW provides POSIX functions
|
| |
| |
| |
| | |
Seems to be the power controller. Listed in switchbrew under the category PTM services.
|
| |
| |
| |
| |
| | |
This will be used in a following change to svcArbitrateLock() and
svcArbitrateUnlock()
|
| |
| |
| |
| |
| | |
Aligning on 4KB pages isn't a Switch-specific thing, so this can be
moved to common so it can be used with other things as well.
|
| |
| |
| |
| |
| |
| | |
Like with TelemetryJson, we can make the implementation details private
and avoid the need to expose httplib to external libraries that need to
use the Client class.
|
|\ \
| | |
| | | |
ips_layer: Add support for IPSwitch executable patches
|
| | | |
|
| | |
| | |
| | |
| | | |
Converts between bytes and strings when the size is not known at compile time.
|
|\ \ \
| | | |
| | | | |
Port citra-emu/citra#4311: "Remove "#" in the version number"
|
| | |/
| |/|
| | |
| | | |
So that people can stop using it in issue/pr comments and randomly link some other issue/pr unintentionally.
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
* Added a context menu on the buttons including Clear & Restore Default
* Allow clearing (unsetting) inputs. Added a Clear All button
* Allow restoring a single input to default (instead of all)
|
|\ \
| | |
| | | |
Port web_service from Citra
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| |_|/
|/| | |
text_formatter: Avoid unnecessary string temporary creation in PrintMessage()
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
operator+ for std::string creates an entirely new string, which is kind
of unnecessary here if we just want to append a null terminator to the
existing one.
Reduces the total amount of potential allocations that need to be done
in the logging path.
|
| | |
|
| |
| |
| |
| | |
First of all they are foundamentally broken. As our convention is that std::string is always UTF-8, these functions assume that the multi-byte character version of TString (std::string) from windows is also in UTF-8, which is almost always wrong. We are not going to build multi-byte character build, and even if we do, this dirty work should be handled by frontend framework early.
|
|/
|
|
| |
We always use unicode internally. Any dirty work of conversion with other codec should be handled by frontend framework (Qt). Further more, ShiftJIS/CP1252 are not special (they are not code set used by 3ds, or any guest/host dependencies we have), so there is no reason to specifically include them
|
|\
| |
| | |
file_sys: Add support for LayeredFS mods
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Stubbed IRS
Currently we have no ideal way of implementing IRS. For the time being we should have the functions stubbed until we come up with a way to emulate IRS properly.
* Added IRS to logging backend
* Forward declared shared memory for irs
|
|/
|
|
| |
simply use the standard library yield()
|
|
|
|
| |
Avoids the need to repeat "std::" twice
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MSVC 19.11 (A.K.A. VS 15.3)'s C++ standard library implements P0154R1
(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0154r1.html)
which defines two new constants within the <new> header, std::hardware_destructive_interference_size
and std::hardware_constructive_interference_size.
std::hardware_destructive_interference_size defines the minimum
recommended offset between two concurrently-accessed objects to avoid
performance degradation due to contention introduced by the
implementation (with the lower-bound being at least alignof(max_align_t)).
In other words, the minimum offset between objects necessary to avoid
false-sharing.
std::hardware_constructive_interference_size on the other hand defines
the maximum recommended size of contiguous memory occupied by two
objects accessed wth temporal locality by concurrent threads (also
defined to be at least alignof(max_align_t)). In other words the maximum
size to promote true-sharing.
So we can simply use this facility to determine the ideal alignment
size. Unfortunately, only MSVC supports this right now, so we need to
enclose it within an ifdef for the time being.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Multi-line doc comments still need the '<' after the ///, otherwise it's
treated as a regular comment and makes the original doc comment broken
in viewers, IDEs, etc. While we're at it, also fix some typos in the
comments.
|
| |
|
|
|
|
| |
Implicit conversions aren't desirable here.
|
|\
| |
| | |
file_util: Correct return value in early exit of ReadFileToString()
|
| |
| |
| |
| |
| | |
While still essentially being zero, we should be returning a numeric
value here, not a boolean typed value.
|
|/
|
|
| |
Makes it so malformed hex strings do not crash the entire program.
|
|
|
|
|
|
|
| |
The previous form of initializing done here is a C-ism, an empty set of
braces is sufficient for initializing (and doesn't potentially cause
missing brace warnings, given the first member of the struct is a COORD
struct).
|
|
|
|
| |
Gets rid of a TODO that is long overdue.
|
|\
| |
| | |
common/telemetry: Migrate core-independent info gathering to common
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously core itself was the library containing the code to gather
common information (build info, CPU info, and OS info), however all of
this isn't core-dependent and can be moved to the common code and use
the common interfaces. We can then just call those functions from the
core instead.
This will allow replacing our CPU detection with Xbyak's which has
better detection facilities than ours. It also keeps more
architecture-dependent code in common instead of core.
|
| |
| |
| |
| |
| | |
It's in the common code, so it should be under the Common namespace like
everything else.
|
|\ \
| | |
| | | |
file_sys: Add support for registration format
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
common/xbyak_abi: Mark defined functions in header as inline
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Avoids potential One Definition Rule violations when these are used in
the future.
|
| | |/
| |/| |
|
|\ \ \
| | | |
| | | | |
common/misc: use windows.h
|
| | | |
| | | |
| | | | |
linux-mingw does not really like this.
|
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | | |
These currently aren't used and contain commented out source code that
corresponds to Dolphin's JIT. Given our CPU code is organized quite
differently, we shouldn't be keeping this around (at the moment it just
adds to compile times marginally).
|
| | |
| | |
| | |
| | |
| | |
| | | |
The filter is returned via const reference, so this was making a
pointless copy of the entire filter every time a message was being
pushed into the logger instance.
|
| | |
| | |
| | |
| | | |
These don't directly modify the contained data.
|
| |/
|/| |
|
|\ \
| | |
| | | |
common/logging: Add missing service log categories
|
| | |
| | |
| | |
| | | |
These weren't added when the services were introduced.
|
|\ \ \
| | | |
| | | | |
vfs: Add VfsFilesystem and fix RealVfs* implementations
|
| | | | |
|
| |/ / |
|
|\ \ \
| | | |
| | | | |
common/color: Minor cleanup
|
| | | |
| | | |
| | | |
| | | | |
These are just superfluous and not necessesary
|
| |/ /
| | |
| | |
| | |
| | | |
Gets rid of type punning via reinterpret_cast within functions. Instead,
we use memcpy to transfer the contents across types.
|
|/ /
| |
| |
| | |
Same behavior, less code
|
|\ \
| | |
| | | |
common: Convert type traits templates over to variable template versions where applicable
|
| | |
| | |
| | |
| | | |
Uses the C++17 inline variable variants
|
|\ \ \
| | | |
| | | | |
vector_math: Minor cleanups
|
| | | | |
|
| | | | |
|
| |/ / |
|
|/ /
| |
| |
| | |
Prevents compiler warnings.
|
|/
|
|
| |
Adds basic skeleton for the usb services based off the information provided by Switch Brew.
|
|
|
|
|
| |
Adds the basic skeleton of the arp services based off the information
provided by Switch Brew.
|
|\
| |
| | |
XCI and Encrypted NCA Support
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
service: Add migration services
|
| | |
| | |
| | |
| | |
| | | |
Adds the basic skeleton for the mig:usr service based off information
provided by Switch Brew.
|
|\ \ \
| | | |
| | | | |
math_util: Always initialize members of Rectangle
|
| |/ /
| | |
| | |
| | | |
Prevents potentially using the members uninitialized.
|
| | |
| | |
| | |
| | | |
PCV isn't the parental control service.
|
|/ /
| |
| |
| |
| | |
Adds the basic skeleton for the psc services based off the information
provided by Switch Brew.
|
|\ \
| | |
| | | |
service: Add capture services
|
| |/
| |
| |
| |
| | |
Adds the basic skeleton for the capture services based off information
provided by Switch Brew.
|
|/
|
|
|
| |
Adds the basic skeleton for the remaining pcv-related services based off
information on Switch Brew.
|
|\
| |
| | |
Port #3973 from Citra: "Remove polymorphism issue"
|
| | |
|
|\ \
| | |
| | | |
service: Add fgm services
|
| | |
| | |
| | |
| | |
| | | |
Adds the basic skeleton for the fgm services based off the information
provided by Switch Brew.
|
|/ /
| |
| |
| |
| | |
Adds the basic skeleton of the pcie service based off information on
Switch Brew.
|
| | |
|
|\ \
| | |
| | | |
Port #3972 from Citra: "common/timer: use std::chrono, avoid platform-dependent code"
|
| |/ |
|
|\ \
| | |
| | | |
Port #3997 from Citra: "common/string_utils: replace boost::transform with std counterpart"
|
| |/
| |
| |
| | |
Note: according to cppreference it is necessary to convert char to unsigned char when using std::tolower and std::toupper, otherwise the behaviour would be undefined.
|
|\ \
| | |
| | | |
Port #3732 from Citra: "common: Fix compilation on ARM"
|
| |/ |
|
|\ \
| | |
| | | |
service: Add wlan services
|
| |/
| |
| |
| |
| | |
Adds the basic skeleton for the wlan services based off the information
on Switch Brew.
|
|/
|
|
|
| |
Adds the skeleton for the btm services based off the information on
Switch Brew.
|
|\
| |
| | |
service: Add ncm services
|
| |
| |
| |
| |
| | |
Adds the basic skeleton for the ncm services based off information on
Switch Brew.
|
|\ \
| |/
|/| |
service: Add mii services
|
| |
| |
| |
| |
| | |
Adds the skeleton for the mii services based off information provided by
Switch Brew
|
|\ \
| | |
| | | |
service: Add nfc services
|
| |/
| |
| |
| |
| | |
Adds the skeleton of the nfc service based off the information provided
on Switch Brew.
|
|/
|
|
|
| |
Implements these functions according to the information available on
Switch Brew.
|
|
|
|
| |
Adds ldn services based off information provided by Switch Brew.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Regression and Mode Fixes
* Review Fixes
* string_view correction
* Add operator& for FileSys::Mode
* Return std::string from SanitizePath
* Farming Simulator Fix
* Use != With mode operator&
|
|
|
|
|
|
|
|
| |
There's no need to perform the resize separately here, since the
constructor allows presizing the buffer.
Also move the empty string check before the construction of the string
to make the early out more straightforward.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is equivalent to doing:
push_back(std::string(""));
which is likely not to cause issues, assuming a decent std::string
implementation with small-string optimizations implemented in its
design, however it's still a little unnecessary to copy that buffer
regardless. Instead, we can use emplace_back() to directly construct the
empty string within the std::vector instance, eliminating any possible
overhead from the copy.
|
|
|
|
|
|
| |
We can just use the variant of std::string's replace() function that can
replace an occurrence with N copies of the same character, eliminating
the need to allocate a std::string containing a buffer of spaces.
|
|\
| |
| | |
file_util, vfs: Use std::string_view where applicable
|
| |
| |
| |
| |
| | |
Avoids unnecessary construction of std::string instances where
applicable.
|
|\ \
| |/
|/| |
file_util: Remove goto usages from Copy()
|
| |
| |
| |
| |
| |
| | |
We can just leverage std::unique_ptr to automatically close these for us
in error cases instead of jumping to the end of the function to call
fclose on them.
|
| |
| |
| |
| |
| | |
This avoids a truncating cast on size. I doubt we'd ever traverse a
directory this large, however we also shouldn't truncate sizes away.
|
|/
|
|
| |
Avoids unnecessary copies when building up the FST entries.
|
|\
| |
| | |
file_util: Remove redundant duplicate return in GetPathWithoutTop()
|
| |
| |
| |
| |
| | |
Given both operands are the same type, there won't be an issue with
overload selection that requires making this explicit.
|
| | |
|
|\ \
| | |
| | | |
common: Remove synchronized_wrapper.h
|
| |/
| |
| |
| | |
This is entirely unused in the codebase.
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of using an unsigned int as a parameter and expecting a user to
always pass in the correct values, we can just convert the enum into an
enum class and use that type as the parameter type instead, which makes
the interface more type safe.
We also get rid of the bookkeeping "NUM_" element in the enum by just
using an unordered map. This function is generally low-frequency in
terms of calls (and I'd hope so, considering otherwise would mean we're
slamming the disk with IO all the time) so I'd consider this acceptable
in this case.
|
|\
| |
| | |
logging: Use std::string_view where applicable
|
| |
| |
| |
| |
| |
| |
| |
| | |
Allows avoiding constructing std::string instances, since this only
reads an arbitrary sequence of characters.
We can also make ParseFilterRule() internal, since it doesn't depend on
any private instance state of Filter
|
| |
| |
| |
| |
| | |
A few inclusions were being satisfied indirectly. To prevent breakages
in the future, include these directly.
|
| |
| |
| |
| |
| |
| | |
These can just use a view to a string since its only comparing against
two names in both cases for matches. This avoids constructing
std::string instances where they aren't necessary.
|
| |
| |
| |
| |
| | |
Allows avoiding string copies by letting the strings be moved into the
function calls.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This avoids a redundant std::string construction if a key doesn't exist
in the map already.
e.g.
data[key] requires constructing a new default instance of the value in
the map (but this is wasteful, since we're already setting something
into the map over top of it).
|
|/
|
|
| |
Avoids potential dynamic allocation occuring during program launch
|
|\
| |
| | |
common/swap: Minor changes
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
common/common_funcs: Remove unused rotation functions
|
| |/
| |
| |
| |
| |
| |
| | |
These are unused and essentially don't provide much benefit either. If
we ever need rotation functions, these can be introduced in a way that
they don't sit in a common_* header and require a bunch of ifdefing to
simply be available
|
|\ \
| | |
| | | |
common/misc: Deduplicate code in GetLastErrorMsg()
|
| |/
| |
| |
| |
| |
| |
| | |
Android and macOS have supported thread_local for quite a while, but
most importantly is that we don't even really need it. Instead of using
a thread-local buffer, we can just return a non-static buffer as a
std::string, avoiding the need for that quality entirely.
|
|\ \
| | |
| | | |
file_util: return string by const reference for GetExeDirectory()
|
| |/
| |
| |
| |
| | |
This disallows modifying the internal string buffer (which shouldn't be
modified anyhow).
|
|/
|
|
| |
Easy TODO
|
|\
| |
| | |
externals: update fmt to version 5.1.0
|
| |
| |
| |
| | |
Previously, we were on 4.1.0, which was a major version behind.
|
|/
|
|
|
|
|
|
|
|
| |
* Virtual Filesystem
* Fix delete bug and documentate
* Review fixes + other stuff
* Fix puyo regression
|
|
|
|
|
| |
We can just take the value parameter by value which allows both moving
into it, and copies at the same time, depending on the calling code.
|
|
|
|
|
|
|
| |
These operators don't modify internal class state, so they can be made
const member functions. While we're at it, drop the unnecessary inline
keywords. Member functions that are defined in the class declaration are
already inline by default.
|
|
|
|
|
|
| |
This provides the equivalent behavior, but without as much boilerplate.
While we're at it, explicitly default the move constructor, since we
have a move-assignment operator defined.
|
|\
| |
| | |
Minor logging improvements
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
| |
* More improvements to GDBStub
- Debugging of threads should work correctly with source and assembly level stepping and modifying registers and memory, meaning threads and callstacks are fully clickable in VS.
- List of modules is available to the client, with assumption that .nro and .nso are backed up by an .elf with symbols, while deconstructed ROMs keep N names.
- Initial support for floating point registers.
* Tidy up as requested in PR feedback
* Tidy up as requested in PR feedback
|
|\
| |
| | |
Port #3579 from Citra: Clean up architecture-specific defines
|
| | |
|
|\ \
| | |
| | | |
Port #3474 from Citra: Do not crash on unimplemented code in debug build
|
| |/ |
|
|/
|
|
| |
This reverts commit 77c684c1140f6bf3fb7d4560d06d2efb1a2ee5e2.
|
|\
| |
| | |
Remove some references to Citra
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add VfsFile and VfsDirectory classes
* Finish abstract Vfs classes
* Implement RealVfsFile (computer fs backend)
* Finish RealVfsFile and RealVfsDirectory
* Finished OffsetVfsFile
* More changes
* Fix import paths
* Major refactor
* Remove double const
* Use experimental/filesystem or filesystem depending on compiler
* Port partition_filesystem
* More changes
* More Overhaul
* FSP_SRV fixes
* Fixes and testing
* Try to get filesystem to compile
* Filesystem on linux
* Remove std::filesystem and document/test
* Compile fixes
* Missing include
* Bug fixes
* Fixes
* Rename v_file and v_dir
* clang-format fix
* Rename NGLOG_* to LOG_*
* Most review changes
* Fix TODO
* Guess 'main' to be Directory by filename
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
convert input buffer (std::vector<u8>) to string, stripping zero chars
|
| |
|
| |
|
|
|
|
| |
Ensures that values are always in a well-defined state.
|
|\
| |
| | |
string_util: Remove StringFromFormat() and related functions
|
| |
| |
| |
| | |
Given we utilize fmt, we don't need to provide our own functions for formatting anymore
|
| |
| |
| |
| |
| |
| |
| | |
Without this, it's possible to get compilation failures in the (rare) scenario where
a container is used to store a bunch of live IOFile instances, as they may be using
std::move_if_noexcept under the hood. Given these definitely don't throw exceptions
this is also not incorrect to add either.
|
|/
|
|
|
|
| |
Ensure that the actual types being passed in are trivially copyable. The internal
call to ReadArray() and WriteArray() will always succeed, since they're passed a pointer to char*
which is always trivially copyable.
|
|
|
|
|
|
| |
The minimum clang/GCC versions we support already support this. We can also
remove is_standard_layout(), as fread and fwrite only require the type to be
trivially copyable.
|
|
|
|
| |
Now that the old macros are no longer used, we can remove all functionality related to them.
|
| |
|
|\
| |
| | |
Implemented some useful interfaces needed for games.
|
| | |
|
| |\ |
|
| | | |
|
| | | |
|
| |/
|/| |
|
|/
|
|
| |
These are unused (and given chunk_file references Dolphin's >SVN< I doubt they were going to be used).
|
|\
| |
| | |
math_util: Remove the Clamp() function
|
| |
| |
| |
| |
| | |
C++17 adds clamp() to the standard library, so we can remove ours in
favor of it.
|
|\ \
| | |
| | | |
common_types: Minor changes
|
| | |
| | |
| | |
| | | |
May as well while we're making changes to this file.
|
| |/
| |
| |
| | |
VS has supported this for quite a while.
|
|\ \
| | |
| | | |
common/thread: Remove unnecessary feature checking for thread_local
|
| |/
| |
| |
| | |
Every compiler we require already supports it.
|
|\ \
| | |
| | | |
common_funcs: Remove check for VS versions that we don't even support
|
| |/
| |
| |
| |
| | |
We don't support any VS versions that don't already have snprintf in the
standard library implementation.
|
|\ \
| | |
| | | |
common_funcs: Remove ARRAY_SIZE macro
|
| |/
| |
| |
| | |
C++17 has non-member size() which we can just call where necessary.
|
|\ \
| | |
| | | |
vector_math: Remove AsArray() and Write() functions from Vec[2,3,4]
|
| |/
| |
| |
| | |
These are all unused and the Write() ones should arguably not even be in the interface. There are better ways to provide this if we ever need it (like iterators).
|
|/
|
|
|
| |
We use dynarmic, so this is unued. Anything else we need will likely use Xbyak, so
this header isn't necessary any more.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Additionally, when updating fmtlib, there was a change in fmtlib broke
how the old logging macro was overloaded, so this works around that by
just naming the fmtlib macro impl something different
|
|
|
|
| |
Due to premature merging of #262 I think the build may be failing right now. Should merge this ASAP to fix it.
|
|\
| |
| | |
Logging: Add fmtlib-based macros
|
| |
| |
| |
| |
| |
| | |
Earlier chrono was included but after some code changed it was no longer needed
Forgot to remove it so I'm removing it now
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a new set of logging macros based on fmtlib
Similar but not exactly the same as https://github.com/citra-emu/citra/pull/3533
Citra currently uses a different version of fmt, which does not support FMT_VARIADIC so
make_args is used instead. On the other hand, yuzu uses fmt 4.1.0 which doesn't have make_args yet
so FMT_VARIADIC is used.
|
|\ \
| | |
| | | |
Change Telemetry Names to yuzu and remove links to citra
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
swap{16,32,64} are defined as macros on the two, but client code
tries to invoke them as Common::swap{16,32,64}, which naturally
doesn't work. This hack redefines the macros as inline functions
in the Common namespace: the bodies of the functions are the
same as the original macros, but relying on OS-specific
implementation details like this is of course brittle.
|
|/ /
| |
| |
| |
| |
| | |
service: Initialize NFP service.
Log: Add NFP service as a log subtype.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|\
| |
| | |
Service/AOC: stub ListAddOnContent function
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Updated the audout:u and IAudioOut, now it might work with RetroArch without trigger an assert, however it's not the ideal implementation
* Updated the audout:u and IAudioOut, now it might work with RetroArch without trigger an assert, however it's not the ideal implementation
* audout:u OpenAudioOut implementation and IAudioOut cmd 1,2,3,4,5 implementation
* using an enum for audio_out_state as well as changing its initialize to member initializer list
* Minor fixes, added Service_Audio for LOG_*, changed PcmFormat enum to EnumClass
* Minor fixes, added Service_Audio for LOG_*, changed PcmFormat enum to EnumClass
* added missing Audio loggin subclass, minor fixes, clang comment breakline
* Solving backend logging conflict
* minor fix
* Fixed duplicated Service NVDRV in backend.cpp, my bad
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Added nvmemp, Added /dev/nvhost-ctrl, SetClientPID now stores pid
* used clang-format-3.9 instead
* lowercase pid
* Moved nvmemp handlers to cpp
* Removed unnecessary logging for NvOsGetConfigU32. Cleaned up log and changed to LOG_DEBUG
* using std::arrays instead of c arrays
* nvhost get config now uses std::array completely
* added pid logging back
* updated cmakelist
* missing includes
* added array, removed memcpy
* clang-format6.0
|
|
|
| |
Minor spelling error of its --> it's
|
| |
|
|\
| |
| | |
CMakeLists: Derive the source directory grouping from targets themselves
|
| |
| |
| |
| |
| | |
Removes the need to store to separate SRC and HEADER variables, and then
construct the target in most cases.
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
* CoreTiming: New CoreTiming; Add Test for CoreTiming
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
# Conflicts:
# src/core/CMakeLists.txt
# src/core/arm/dynarmic/arm_dynarmic.cpp
# src/core/arm/dyncom/arm_dyncom.cpp
# src/core/hle/kernel/process.cpp
# src/core/hle/kernel/thread.cpp
# src/core/hle/kernel/thread.h
# src/core/hle/kernel/vm_manager.cpp
# src/core/loader/3dsx.cpp
# src/core/loader/elf.cpp
# src/core/loader/ncch.cpp
# src/core/memory.cpp
# src/core/memory.h
# src/core/memory_setup.h
|
| | |
|
| |
| |
| |
| |
| | |
It is unlikely we will ever use this without first doing a Cast to a signed type.
Fixes 9 "unary minus operator applied to unsigned type, result still unsigned" warnings on MSVC2017.3
|
| |\
| | |
| | | |
Implement fragment lighting in the sw renderer (take 2)
|
| | | |
|
| | |
| | |
| | |
| | | |
this was originally added to eliminate warnings on MSVC, but it doesn't work for custom types.
|
| | | |
|
| | | |
|
| | | |
|
|/ / |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Added support for network with ENet lib,
connecting is possible, but data can't be sent, yet.
* fixup! Added support for network with ENet lib,
* fixup! CLang
* fixup! Added support for network with ENet lib,
* fixup! Added support for network with ENet lib,
* fixup! Clang format
* More fixups!
* Moved ENetHost* and ENetPeer* into pimpl classes
* fixup! Moved ENetHost* and ENetPeer* into pimpl classes
* fixup! Clang again
* fixup! Moved ENetHost* and ENetPeer* into pimpl classes
* fixup! Moved ENetHost* and ENetPeer* into pimpl classes
* fixup! Moved ENetHost* and ENetPeer* into pimpl classes
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Modules didn't correctly define their dependencies before, which relied
on the frontends implicitly including every module for linking to
succeed.
Also changed every target_link_libraries call to specify visibility of
dependencies to avoid leaking definitions to dependents when not
necessary.
|
| |
|
|
|
|
|
|
| |
This removes a dependency inversion between core and common. It's also
the proper place for the file since it makes screen layout decisions
specific to the 3DS.
|
|\
| |
| | |
Decentralize ResultCode
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Implemented Procedural Texture (Texture Unit 3)
|
| |/ |
|
|/ |
|
| |
|
|\
| |
| | |
Add custom layout settings.
|
| | |
|
|\ \
| | |
| | | |
Refactor input emulation & add SDL gamepad support
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Reduce host file name and path logging
|
| | | | |
|
| |/ / |
|
|/ / |
|
|\ \
| | |
| | | |
Replace built-in Profiler with indicators in status bar
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
APT: implemented Wrap and Unwrap
|
| | | | |
|
| |/ /
|/| |
| | |
| | |
| | | |
Nightly builds now have "Citra Nightly" in the titlebar
Bleeding edge builds now have "Citra Bleeding Edge" in the titlebar
|
| | | |
|
|/ / |
|
|\ \
| | |
| | | |
Oh No! More shader changes!
|
| |/ |
|
| |
| |
| | |
These are not used any more since we moved shader JIT to xbyak.
|
|/ |
|
| |
|
| |
|
|\
| |
| | |
Emulate motion sensor in frontend
|
| | |
|
| | |
|
| | |
|
| | |
|
|/
|
|
| |
Fix Fatal Error in Mini-Mario & Friends - amiibo Challenge
|
|\
| |
| | |
core: Move emu_window and key_map into core
|
| |
| |
| |
| | |
* Removes circular dependences (common should not depend on core)
|
|/ |
|
|\
| |
| | |
Core: Top-level consolidate & misc cleanup
|
| | |
|
|\ \
| |/
|/| |
csnd:SND: Reformat source code
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Common: Fix gcc build on macOS
|
| |/ |
|
|/ |
|
| |
|
|\
| |
| | |
Move WINVER definition to cmake and a bit of cleanup
|
| | |
|
|/ |
|
| |
|
|\
| |
| | |
MIC_U: Stub service funcions
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|\
| |
| | |
Fix mingw compilation support
|
| | |
|
| |
| |
| |
| | |
And other minor style changes
|
| |
| |
| |
| | |
Also minor style changes
|
| | |
|
| |
| |
| | |
Make small screen stay at 1x, and large screen maintain its aspect ratio.
|
|/
|
|
|
| |
Allows users to choose a single screen layout or a large screen layout.
Adds a configuration option to change the prominent screen.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In file included from src/common/x64/cpu_detect.cpp:16:
/usr/include/machine/cpufunc.h:66:17: error: unknown type name 'u_int'
static __inline u_int
^
/usr/include/machine/cpufunc.h:67:6: error: unknown type name 'u_int'
bsfl(u_int mask)
^
/usr/include/machine/cpufunc.h:69:2: error: unknown type name 'u_int'
u_int result;
^
/usr/include/machine/cpufunc.h:75:17: error: unknown type name 'u_long'; did you mean 'long'?
static __inline u_long
^
/usr/include/machine/cpufunc.h:76:6: error: unknown type name 'u_long'; did you mean 'long'?
bsfq(u_long mask)
^
/usr/include/machine/cpufunc.h:78:2: error: use of undeclared identifier 'u_long'; did you mean
'long'?
u_long result;
^
[...]
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most modern Unix environments use 64-bit off_t by default: OpenBSD,
FreeBSD, OS X, and Linux libc implementations such as Musl.
glibc is the lone exception; it can default to 32 bits but this is
configurable by setting _FILE_OFFSET_BITS.
Avoiding the stat64()/fstat64() interfaces is desirable because they
are nonstandard and not implemented on many systems (including
OpenBSD and FreeBSD), and using 64 bits for stat()/fstat() is either
the default or trivial to set up.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
src/common/file_util.cpp:79:19: error: variable has incomplete type 'struct stat64'
struct stat64 file_info;
^
src/common/file_util.cpp:79:12: note: forward declaration of 'stat64'
struct stat64 file_info;
^
src/common/file_util.cpp:99:19: error: variable has incomplete type 'struct stat64'
struct stat64 file_info;
^
src/common/file_util.cpp:99:12: note: forward declaration of 'stat64'
struct stat64 file_info;
^
src/common/file_util.cpp:342:19: error: variable has incomplete type 'struct stat64'
struct stat64 buf;
^
src/common/file_util.cpp:342:12: note: forward declaration of 'stat64'
struct stat64 buf;
^
src/common/file_util.cpp:359:19: error: variable has incomplete type 'struct stat64'
struct stat64 buf;
^
src/common/file_util.cpp:359:12: note: forward declaration of 'stat64'
struct stat64 buf;
^
4 errors generated.
|
|
|
|
|
|
|
|
|
|
|
| |
src/common/thread.cpp:90:5: error: unknown type name 'cpu_set_t'; did you mean 'cpuset_t'?
cpu_set_t cpu_set;
^~~~~~~~~
cpuset_t
/usr/include/sys/_cpuset.h:48:24: note: 'cpuset_t' declared here
typedef struct _cpuset cpuset_t;
^
1 error generated.
|
|
|
|
|
|
|
| |
src/common/thread.cpp:123:5: error: use of undeclared identifier 'pthread_setname_np'
pthread_setname_np(pthread_self(), szThreadName);
^
1 error generated.
|
| |
|
|\
| |
| | |
Update the stub code of BOSS
|
| | |
|
|/
|
|
|
| |
They're not currently used, and it's easy to accidentally pass a single
pointer argument to them, causing an out-of-bounds read.
|
| |
|
| |
|
|
|
|
|
|
|
| |
This makes clang-format useful on those.
Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
ForeachDirectoryEntry didn't actually do anything with the `recursive`
parameter, and the corresponding callback parameter was shadowing the
actual recursion counters in the user functions.
|
|\
| |
| | |
Refactor input mapping & implement circle pad modifier
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Make recursive FileUtil functions take a maximum recursion
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes #1115.
Also improves the performances of DiskArchive’s directory
implementation a lot, simply by not going through the entire tree
instead of just listing the first level files.
Thanks to JayRoxFox for rebasing this on current master!
|
|/ |
|
|
|
|
| |
These shouldn't haphazardly convert types
|
|
|
|
| |
This isn't well-defined in C++.
|
|
|
|
|
|
|
| |
Also gets rid of pointer data variants as this prevents the use of
the regular swapping routines as unary predicates in std lib functions.
They also cast to stricter alignment types, which is undefined behavior.
|
|\
| |
| | |
AudioCore: SDL2 Sink
|
| | |
|
|/ |
|
|
|
|
| |
This has been entirely superseded by MicroProfile. The rest of the code
can go when a simpler frametime/FPS meter is added to the GUI.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Make Citra build with MICROPROFILE_ENABLED set to 0
* Buildfix with microprofile kept on
* moc did not like a dialog to conditionally exist.
* Cleanup
* Fix end of line
|
| |
|
|\
| |
| | |
Fix various build errors encountered on Clang 3.9 on OS X
|
| | |
|
|/ |
|
|\
| |
| | |
Fix driver root identification on Windows
|
| | |
|
|\ \
| | |
| | | |
Thread: Correct Common::Barrier implementation
|
| | | |
|
| |/ |
|
|\ \
| | |
| | | |
IOFile: Minor API changes
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Also applies the template checks to ReadArray as well.
|
| |/ |
|
| | |
|
|/ |
|
| |
|
| |
|
|\
| |
| | |
frd:u: Initial stub some functions
|
| | |
|
|\ \
| | |
| | | |
Common: Remove Common::make_unique, use std::make_unique
|
| | | |
|
|\ \ \
| | | |
| | | | |
Fix filename&path encode problem on Windows
|
| | | | |
|
| | | | |
|
| | |/
| |/| |
|
|\ \ \
| | | |
| | | | |
Dummy implementation dlp:SRVR Service.
|
| | |/
| |/| |
|
| |/
|/| |
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
| |
SuspendDaemons , ResumeDaemons , OverrideDefaultDaemons
The NDM file move to /core/hle/service/ndm/ now!
|
|\
| |
| | |
common: Minor changes to NonCopyable
|
| | |
|
| | |
|
|/ |
|
|\
| |
| | |
emitter: constexpr/misc changes
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
This was removed in Dolphin as there were no particular uses for it.
I'm sure the same will apply to citra.
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
| |
The gl rasterizer already uses alignas,
so we may as well move everything over.
|
|\
| |
| | |
DiskDirectory: Initialize the directory member with valid info.
|
| | |
|
|\ \
| | |
| | | |
x64 Emitter: Fix L bit in VEX prefix
|
| | | |
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit:
* Adds a new subproject, audio_core.
* Defines structures that exist in DSP shared memory.
* Hooks up various other parts of the emulator into audio core.
This sets the foundation for a later HLE DSP implementation.
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
| |
ForeachDirectoryEntry is changed by #1256 ,but return value at last line
was missing.
|
|\
| |
| | |
Services/Cam: Added new log type and camera enums from 3dbrew.
|
| |
| |
| |
| |
| | |
Followup to #1102
Original author @mailwl
|
|/
|
|
|
|
|
|
|
| |
ScanDirectoryTreeAndCallback, before this change, coupled error/return
codes and actual return values (number of entries found). This caused
confusion and difficulty interpreting the precise way the function
worked.
Supersedes, and closes #1255.
|
| |
|
|
|
|
| |
silent warning C4146 on msvc
|
| |
|
|\
| |
| | |
Obligatory "Throw out workarounds VS2013 once limited us to" PR
|
| | |
|
|\ \
| | |
| | | |
Initial implementation of a game list
|
| | |
| | |
| | |
| | |
| | | |
Converted FileUtil::ScanDirectoryTree and FileUtil::DeleteDirRecursively
to use the new ScanDirectoryTreeAndCallback function internally.
|
| | | |
|
| | | |
|
| | | |
|
| |/
|/| |
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
common: Get rid of debug_interface.h
|
| |
| |
| |
| |
| |
| | |
This is technically unused. Also removes TMemChecks because it relies on this.
Whenever memory breakpoints are implemented for real, it should be designed to
match the codebase debugging mechanisms.
|
|/ |
|
|
|
|
|
| |
Import Dolphin stack handling and register saving routines
Also removes the x86 parts from abi files
|
| |
|
| |
|
|
|
|
|
| |
This brings goodies such as a configurable user interface and
multi-threaded timeline view.
|
| |
|
|\
| |
| | |
emitter: Remove pointer casts
|
| |
| |
| |
| | |
This should also technically silence quite a few ubsan warnings.
|
|\ \
| |/
|/| |
Kernel: Correct(er) handling of Heap and Linear Heap allocations
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Functions implemented in a class definition are already implicitly inline.
|
|\ \
| | |
| | | |
Fix building under MinGW
|
| |/ |
|
|/ |
|
|\
| |
| | |
Handle invalid `Log::Class`
|
| |
| |
| |
| |
| |
| | |
Add a case of `Log::Class::Count` to the switch statement that
dispatches on `Log::Class`. The case simply calls the `UNREACHABLE`
macro.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
| |
__forceinline is a MSVC extension, which may confuse some people working on the codebase.
Furthermore, the C++ standard dictates that all names which contain adjacent underscores are reserved.
|
|\
| |
| | |
Handle invalid `Log::Level::Count`
|
| |
| |
| |
| | |
Use the UNREACHABLE macro instead of `ASSERT(false, ...);`.
|
| |
| |
| |
| |
| |
| | |
Add a case of `Log::Level::Count` to all switch statements that
dispatch on `Log::Level`. The case simply asserts `false` and notes
the invalid log level.
|
|/
|
|
|
|
| |
The char16_t/char32_t implementations aren't present in the library and
cause linker errors. This is a known issue that wasn't fixed in VS2015
RTM.
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
Visual Studio 2015 defines this in stdio now
|
|\
| |
| | |
Common: Fix mask generation in BitField
|
| |
| |
| |
| |
| | |
For the signed case, the shifts already remove the rest of the value, so
ANDing by the mask is redundant.
|
| |
| |
| |
| | |
Fixes #913
|
| |
| |
| |
| | |
This isn't used, and there's no implementations of the member functions.
|
|\ \
| |/
|/| |
Cleanup includes, mostly in common
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|\
| |
| | |
Services: Continue separation of services into their own folders
|
| | |
|
|/ |
|
| |
|
|
|
|
| |
The file only contained vector manipulation code, and such widely-useable code doesn't belong in video_core.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implements unrotated planar YUV 4:2:0 -> RGB24 conversions in Y2R.
Currently only the Y (luma) channel is used, so the results don't
contain color. This will be added in a later PR at some point.
This is enough to get all currently know Moflex videos to decode. (Some
don't display on-screen due to seemingly unrelated reasons.)
Thanks to @archshift for doing the initial implementation which I
cleaned up and then fixed the 8x8 block mode.
|
|\
| |
| | |
Common: Remove async logging
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It provided a large increase in complexity of the logging system while
having a negligible performance impact: the usage patterns of the ring
buffer meant that each log contended with the logging thread, causing
it to effectively act as a synchronous extra buffering.
Also removed some broken code related to filtering of subclasses which
was broken since it was introduced. (Which means no one ever used that
feature anyway, since, 8 months later, no one ever complained.)
|
|/ |
|
|
|
|
|
|
|
| |
When the macro was introduced in 326ec51261299e48de97592631c02523da9c8118
it wasn't noticed that it conflicted in name with a heavily used macro
inside of dyncom. This causes some compiler warnings. Since it's only
lightly used, it was opted to simply remove the new macro.
|
| |
|
| |
|
|\
| |
| | |
Remove unused hash and mem_arena from common
|
| |
| |
| |
| |
| |
| | |
It is superfluous for Citra. (It's only really necessary if you're doing
JIT. We were using it but not taking any advantage from it.) This should
make 32-bit builds work again.
|
| |
| |
| |
| | |
Currently unused and the code quality is pretty questionable.
|
|\ \
| | |
| | | |
string_util: Get rid of UriDecode/UriEncode
|
| | | |
|
| |/
|/| |
|
|/
|
|
|
|
|
| |
The old system of just defining macros available in some other platform
was susceptible to silently using the wrong code if you forgot to
include a particular header. This fixes a crash on non-Windows platforms
introduced by e1fbac3ca13d37d2625c11d30cfdece4327b446b.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
If the mouse position for a mouse move/drag would take it outside the emulated screen dimensions, clip the coordinates to
the emulated screen dimensions.
Qt and GLFW will report negative coordinates for mouse positions to the left, or above citra window. Added restriction
to mouse coordinates passed to touchmoved by Qt/GLFW to be greater or equal to zero.
|
|
|
|
|
| |
The helper classes are rendered obsolete by C++11 lambdas. Also made
formatting conform to our code style.
|
|
|
|
|
|
| |
SVC: Return correct error code on invalid CreateThread processor ID.
SVC: Assert when creating a thread with an invalid userland priority.
|
|\
| |
| | |
Services: Stubs and minor changes
|
| | |
|
|/ |
|
| |
|
| |
|
|
|
|
| |
in GetTouchState()
|
|\
| |
| | |
Touchpad support
|
| | |
|
| | |
|
| | |
|
|\ \
| |/
|/| |
Implement SetLcdForceBlack and add implementation for color filling in the GPU code
|
| | |
|
|\ \
| | |
| | | |
Apply the logging filter before sending the message to the queue
|
| | | |
|
|\ \ \
| | | |
| | | | |
Asserts: Use lambdas to keep assertion code away from the main code path
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Set framebuffer layout from EmuWindow.
|
| | |_|/
| |/| | |
|
|\ \ \ \
| |_|_|/
|/| | | |
Add profiling infrastructure and widget
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
MSVC 2013 (at least) doesn't use QueryPerformanceCounter to implement
std::chrono::high_resolution_clock, so it has bad precision. Manually
implementing our own clock type using it works around this for now.
|
| |/ / |
|
|/ / |
|
| |
| |
| |
| | |
This allows for easily movable and independent configuration and data directories, using standardized paths.
|
|\ \
| | |
| | | |
Added information reporting from ThrowFatalError
|
| | |
| | |
| | |
| | | |
This was RE'd from the errdisp applet.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
|/ / |
|
|\ \
| |/
|/| |
ConfigMem: Clean up the Config memory to be more like the shared page
|
| |
| |
| |
| | |
the helper macro for padding to common_funcs.h
|
|\ \
| |/
|/| |
Build: Fixed some warnings
|
| | |
|
|/
|
|
| |
Fixes an assertion upon executing citra in debug mode.
|
|
|
|
|
|
|
| |
Involves making asserts use printf instead of the log functions (log functions are asynchronous and, as such, the log won't be printed in time)
As such, the log type argument was removed (printf obviously can't use it, and it's made obsolete by the file and line printing)
Also removed some GEKKO cruft.
|
|\
| |
| | |
Services: Stub some functions
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
|\
| |
| | |
Common: Clean up ThreadQueueList
|
| |
| |
| |
| |
| |
| |
| |
| | |
Replace all the C-style complicated buffer management with a std::deque.
In addition to making the code easier to understand it also adds support
for non-POD IdTypes.
Also clean the rest of the code to follow our code style.
|
|\ \
| |/
|/| |
Ported the CoreTiming namespace from PPSSPP
|
| |
| |
| |
| |
| |
| | |
Implemented the required calls to make it work.
CoreTiming: Added a new logging class Core_Timing.
|
|\ \
| | |
| | | |
Remove dead platform #ifdefs to make the code more readable.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Symbian, Xbox, Blackberry and iOS got removed.
FreeBSD and Android kept due to them potentially being able to run Citra in the future.
The iOS specific part also got removed from PPSSPP in order to fix a bug there.
|
|\ \ \
| |/ /
|/| | |
Archives: Change the folder layout of some archives.
|
| | |
| | |
| | |
| | | |
Each archive now takes a mount point of either NAND or SDMC, and builds its own directory structure there, trying to simulate an HLE-friendly hardware layout
|
| | |
| | |
| | |
| | | |
under /nand/title/high/low/content/00000000.app.romfs
|
| |/
| |
| |
| | |
This is to better represent the hardware layout, they are still aren't quite accurate, but this better and will help a bit when implementing the other archives like NAND-RO and NAND-RW
|
| | |
|
|/ |
|
|
|
|
| |
Fixed a few warnings and cleaned up the code
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Stubbed CreateMemoryBlock
Using Berkeley sockets, and Winsock2.2 on Windows.
So far ftpony creates the socket and accepts incoming connections
SOC_U: Renamed functions to maintain consistency
Also prevents possible scope errors / conflicts with the actual Berkeley socket functions
SOCU: Close all the opened sockets when cleaning up SOCU
|
|\
| |
| | |
Fix MinGW build (2)
|
| | |
|
| |\ |
|
| | | |
|
| |/
|/|
| |
| |
| |
| |
| |
| | |
They will be stored in /extsavedata/SDMC and /extsavedata/NAND respectively.
Also redirect some APT_A functions to their APT_U equivalents.
Implemented the gamecoin.dat file in SharedExtSaveData in the PTM module.
Implemented formatting the savegame.
Retake a previous savegame if it exists instead of reporting them as not formatted every time a game is loaded.
|
|\ \
| | |
| | | |
More warning cleanups
|
| | | |
|
|\ \ \
| |/ /
|/| | |
License change
|
| | | |
|
| | |
| | |
| | |
| | | |
This is useful when doing crazy stuff like inheriting from BitField.
|
|/ / |
|
| |
| |
| |
| | |
It will be stored in the /syssavedata folder. This archive is user by various Services and possibly games via the FS:U service.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The savedata for each game is stored in /savedata/<ProgramID> for NCCH files. ELF files and 3DSX files use the folder 0 because they have no ID information
Got rid of the code duplication in File and Directory
Files that deal with the host machine's file system now live in DiskFile, similarly for directories and DiskDirectory and archives with DiskArchive.
FS_U: Use the correct error code when a file wasn't found
|
| |
| |
| |
| | |
Fixes #277
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
APT shared font loading
|
| | | |
|
| | | |
|
|\ \ \
| |/ /
|/| | |
Add Boost as a submodule and add some minor cleanups using Boost.Range
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
|/ / |
|
|/ |
|
| |
|
| |
|
| |
|
|\
| |
| | |
Stretch emulation output to render window and be display density independent
|
| | |
|
| |
| |
| |
| |
| |
| | |
Implementing this function currently is not critical, as we don't perform any configuration changes, yet.
However, the interface is a good starting point for adding this functionality.
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
The window title is none of the emulation core's business. The GUI code is free to put whatever it wants there.
Providing properly thread-safe window title getters and setters is a mess anyway.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
The view is scaled to be as large as possible, without changing the aspect, within the bounds of the window.
On "retina" displays, or other displays where window units != pixels, the view should no longer draw incorrectly.
|
| |
| |
| |
| | |
Replace asserts with _dbg_assert_.
|
|/ |
|
|
|
|
| |
Gets rid of a warning on OSX.
|
| |
|
| |
|
|
|
|
| |
This was automated using `clang-modernize`.
|
| |
|
|\
| |
| | |
bit_field: Fix a typo in the sample usage.
|
| | |
|
|/ |
|
|\
| |
| | |
Use config files to store whether SDMC is enabled or not, auto-create SDMC dir.
|
| | |
|
|/ |
|
|\
| |
| | |
Configuration files
|
| |
| |
| |
| | |
Uses QSettings on citra-qt, and inih on citra-cli.
|
| |
| |
| |
| | |
Core: Fix the SDMC Directory implementation to make blargSnes work.
|
|/ |
|
|\
| |
| | |
chunk_file: General cleanup
|
| |
| |
| |
| |
| | |
- Remove unnecessary ifdefs
- Remove commented out code. Can be retrieved later if needed.
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
loader.cpp: improved file extension checking, made Upper/LowerStr useful, moved string_util into Common namespace
|
| | |
|
| | |
|
| |
| |
| |
| | |
Instead of forcibly taking the last 4 characters, it now finds the last extension separator (the period) and takes a substr of its location.
|
|\ \
| | |
| | | |
Prune redundant includes
|
| |/ |
|
|\ \
| | |
| | | |
Removed fixed_size_queue.h
|
| |/
| |
| |
| | |
It's unused and doesn't look like it compiles anyway :/
|
|\ \
| | |
| | | |
Common: Fix a potential infinite loop in StringUtil's ReplaceAll
|
| |/ |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Several cleanups to the buildsystem:
- Do better factoring of common libs between platforms.
- Add support to building on Windows.
- Remove Qt4 support.
- Re-sort file lists and add missing headers.
|
|\
| |
| | |
Common: Add a clamp function to math_utils.h
|
| | |
|
|/ |
|
|
|
|
| |
Returning a copy of the string is what was likely meant to be done.
|
|\
| |
| | |
Common: Correctly set ptr to null if mmap fails in memory_util
|
| |
| |
| |
| | |
On POSIX systems mmap will return MAP_FAILED ((void*)-1) instead of a null pointer.
|
|\ \
| | |
| | | |
Replace insecure temporary file creation with devshm.
|
| |/ |
|
| | |
|
|/
|
|
| |
Also replaced C headers with the C++ equivalent ones
|
| |
|
|\
| |
| | |
Changed iterators to use auto, many of which using range-based loops
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
| |
While it was some nice and fancy template usage, it ultimately had many practical issues regarding length of involved expressions under regular usage as well as common code completion tools not being able to handle the structures.
Instead, we now use a more conventional approach which is a lot more clean to use.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
The Git for Windows installer doesn't add the Git binaries to the path
by default. (Due to risk of conflicts with built-in windows commands.)
Unless you have configured your system specially this causes the
scm_rev_gen.js script to fail to find Git. Added more paths to the
script so that it searches in the default msysgit installation
directory, eliminating the need to set the PATH for most environments.
|
| |
|
|
|
|
| |
Being able to store BitField within unions requires BitField to be of standard layout, which in turn is only given if the underlying type is also has standard layout.
|
|
|
|
| |
Cf. https://github.com/dolphin-emu/dolphin/pull/483
|
|
|
|
| |
Sometimes it can be beneficial to use this in places where an explicit cast needs to happen otherwise. By using the evaluation method, it's not necessary anymore to explicitly write the underlying type in this case.
|
|\
| |
| |
| |
| |
| | |
Conflicts:
src/core/hle/function_wrappers.h
src/core/hle/service/gsp.cpp
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|\| |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Only Rect is in the namespace for now; the rest of common should be added in the future
|
| |
| |
| |
| | |
Changed QGL version to 3,2 in order to be less restrictive, yet it should still change up to 4,1 on OSX on Qt5.
|
| |
| |
| |
| | |
Changes for clarity of comments, removed redundant compiler flags.
|
| | |
|
|\| |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
- added stubs for GetResourceLimit and GetResourceLimitCurrentValues SVCs
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Somewhere along the line an OSX header had already taken the name Rect.
|
|/ |
|
| |
|
|\ |
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\ |
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
- cleaned up window title
- cleaned up emu_window_glfw/emu_window
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|