Commit Graph

15366 Commits

Author SHA1 Message Date
ReinUsesLisp 3f190b946c video_core: Fix clang build issues 2021-02-13 02:26:47 -03:00
ReinUsesLisp 50d8c1eb35 vk_staging_buffer_pool: Fix softlock when stream buffer overflows
There was still a code path that could wait on a timeline semaphore tick
that would never be signalled.

While we are at it, make use of more STL algorithms.
2021-02-13 02:18:38 -03:00
ReinUsesLisp 0cc70777ca vk_buffer_cache: Add support for null index buffers
Games can bind a null index buffer (size=0) where all indices are
evaluated as zero. VK_EXT_robustness2 doesn't support this and all
drivers segfault when a null index buffer is passed to
vkCmdBindIndexBuffer.

Workaround this by creating a 4 byte buffer and filling it with zeroes.
If it's read out of bounds, robustness takes care of returning zeroes as
indices.
2021-02-13 02:18:38 -03:00
ReinUsesLisp 8e14700d9c buffer_cache: Add extra bytes to guest SSBOs
Bind extra bytes beyond the guest API's bound range.
This is due to some games like Astral Chain operating out of bounds.
Binding the whole map range would be technically correct, but games
have large maps that make this approach unaffordable for now.
2021-02-13 02:18:38 -03:00
ReinUsesLisp cc201e3d82 Merge branch 'bytes-to-map-end' into new-bufcache-wip 2021-02-13 02:18:35 -03:00
ReinUsesLisp e83c4bd65d vk_staging_buffer_pool: Get a staging buffer instead of waiting
Avoids waiting idle while the GPU finishes to do work, and fixes an
issue where we'd wait forever if a single command buffer (logic tick)
all the data.
2021-02-13 02:18:05 -03:00
ReinUsesLisp 889ce02dcf yuzu/config: Disable assembly shaders by default
Due to BindBufferRangeNV limitations and poor quality code emission from
our side, assembly shaders are currently slower than GLSL. Their build
time and feature advantages are still relevant, but they are outweighted
by their runtime performance.
2021-02-13 02:18:05 -03:00
ReinUsesLisp 982ff88c8a renderer_opengl: Remove interop
Remove unused interop code from the OpenGL backend.
2021-02-13 02:18:04 -03:00
ReinUsesLisp b0573192d4 gl_buffer_cache: Drop interop based parameter buffer workarounds
Sacrify runtime performance to avoid generating kernel exceptions on
Windows due to our abusive aliasing of interop buffer objects.
2021-02-13 02:17:24 -03:00
ReinUsesLisp d70e2f28b6 buffer_cache: Heuristically detect stream buffers
Detect when a memory region has been joined several times and increase
the size of the created buffer on those instances. The buffer is assumed
to be a "stream buffer", increasing its size should stop us from
constantly recreating it and fragmenting memory.
2021-02-13 02:17:24 -03:00
ReinUsesLisp c86394220d buffer_cache: Split CreateBuffer in separate functions
Allow adding functionality to each function without making CreateBuffer
more complex.
2021-02-13 02:17:24 -03:00
ReinUsesLisp 48a391810c buffer_cache: Skip cache on small uploads on Vulkan
Ports from OpenGL the optimization to skip small 3D uniform buffer
uploads. This will take advantage of the previously introduced stream
buffer.

Fixes instances where the staging buffer offset was being ignored.
2021-02-13 02:17:24 -03:00
ReinUsesLisp c210923ccb vk_staging_buffer_pool: Add stream buffer for small uploads
This uses a ring buffer similar to OpenGL's stream buffer for small
uploads. This stops us from allocating several small buffers, reducing
memory fragmentation and cache locality.

It uses dedicated allocations when possible.
2021-02-13 02:17:24 -03:00
ReinUsesLisp fbacc95d26 vulkan_device: Enable robustBufferAccess
Fix regression on Pascal on Animal Crossing: New Horizons, fixing a
validation error.
2021-02-13 02:17:23 -03:00
ReinUsesLisp 2dfce2fca6 video_core: Reimplement the buffer cache
Reimplement the buffer cache using cached bindings and page level
granularity for modification tracking. This also drops the usage of
shared pointers and virtual functions from the cache.

- Bindings are cached, allowing to skip work when the game changes few
  bits between draws.
- OpenGL Assembly shaders no longer copy when a region has been modified
  from the GPU to emulate constant buffers, instead GL_EXT_memory_object
  is used to alias sub-buffers within the same allocation.
- OpenGL Assembly shaders stream constant buffer data using
  glProgramBufferParametersIuivNV, from NV_parameter_buffer_object. In
  theory this should save one hash table resolve inside the driver
  compared to glBufferSubData.
- A new OpenGL stream buffer is implemented based on fences for drivers
  that are not Nvidia's proprietary, due to their low performance on
  partial glBufferSubData calls synchronized with 3D rendering (that
  some games use a lot).
- Most optimizations are shared between APIs now, allowing Vulkan to
  cache more bindings than before, skipping unnecesarry work.

This commit adds the necessary infrastructure to use Vulkan object from
OpenGL. Overall, it improves performance and fixes some bugs present on
the old cache. There are still some edge cases hit by some games that
harm performance on some vendors, this are planned to be fixed in later
commits.
2021-02-13 02:17:22 -03:00
ReinUsesLisp 5c15618495 vulkan_common: Expose interop and headless devices 2021-02-13 02:16:21 -03:00
ReinUsesLisp d0dba1b7a8 vulkan_common: Make interop extensions mandatory 2021-02-13 02:16:21 -03:00
ReinUsesLisp 05ce913982 vulkan_device: Enable robust buffers 2021-02-13 02:16:21 -03:00
ReinUsesLisp e67dfe0db1 vulkan_device: Use designated initializers for features 2021-02-13 02:16:21 -03:00
ReinUsesLisp b6ab02b809 vulkan_wrapper: Add memory barrier pipeline barrier helper 2021-02-13 02:16:21 -03:00
ReinUsesLisp a7e1377ed6 vulkan_device: Fix formatting of constants 2021-02-13 02:16:21 -03:00
ReinUsesLisp f89c2c26f6 vulkan_wrapper: Add interop functions 2021-02-13 02:16:21 -03:00
ReinUsesLisp 73f58a249c vulkan_instance: Initialize Vulkan instance in a separate thread
Workaround an issue on Nvidia where creating a Vulkan instance from an
active OpenGL thread disables threaded optimization on the driver.
This optimization is important to have good performance on Nvidia
OpenGL.
2021-02-13 02:16:21 -03:00
ReinUsesLisp 758731e48c vulkan_wrapper: Pull Windows symbols 2021-02-13 02:16:21 -03:00
ReinUsesLisp 70b3c29534 gpu: Report renderer errors with exceptions
Instead of using a two step initialization to report errors, initialize
the GPU renderer and rasterizer on the constructor and report errors
through std::runtime_error.
2021-02-13 02:16:19 -03:00
ReinUsesLisp 3dac956230 tests/buffer_base: Add cached CPU writes tests
Ensure the behavior of the previous commit in tests.
2021-02-13 02:15:29 -03:00
ReinUsesLisp 9c9afa99b9 buffer_base: Add support for cached CPU writes
Some games usually write memory pages currently used by the GPU, causing
rendering issues (e.g. flashing geometry and shadows on Link's
Awakening). To workaround this issue, Guest CPU writes are delayed until
the command buffer finishes processing, but the pages are updated
immediately.

The overall behavior is:
- CPU writes are cached until they are flushed, they update the page
  state, but don't change the modification state. Cached writes stop
  pages from being flushed, in case games have meaningful data in it.
- Command processing writes (e.g. push constants) update the page state
  and are marked to the command processor as dirty. They don't remove
  the state of cached writes.
2021-02-13 02:15:29 -03:00
ameerj 8ad9e3721a maxwell_to_gl: Remove unused code
Removes unused declarations in maxwell_to_gl.h
2021-02-12 23:01:09 -05:00
Chloe Marcec 6d5a42e4aa revert to std::sin and std::cos 2021-02-12 18:48:10 -08:00
Chloe Marcec dccb1546a8 address issues 2021-02-12 18:48:10 -08:00
Chloe Marcec dffe01cb67 audren: Implement I3dl2Reverb
Most notable fix is the voices in Fire Emblem Three Houses
2021-02-12 18:48:10 -08:00
ameerj faae6b5595 kernel: More accurately reserve and release resources 2021-02-12 19:05:24 -05:00
ameerj 48b09cc56d kernel: KScopedReservation implementation
This implements KScopedReservation, allowing resource limit reservations to be more HW accurate, and release upon failure without requiring too many conditionals.
2021-02-12 18:57:34 -05:00
Chloe e62886ead0 kernel: Unify result codes (#5890)
* kernel: Unify result codes

Drop the usage of ERR_NAME convention in kernel for ResultName. Removed seperation between svc_results.h & errors.h as we mainly include both most of the time anyways.

* oops

* rename errors to svc_results
2021-02-12 15:43:01 -08:00
lat9nq 0d1cbac0a0 yuzu: Create screenshot path before capture
Allows screenshots in cases where the screenshots path doesn't already
exist.
2021-02-12 17:26:01 -05:00
bunnei 24ae113fc8 Merge pull request #5902 from lioncash/core-warn
core: Silence various warnings on Clang 12
2021-02-11 18:57:23 -08:00
bunnei 152e089482 Merge pull request #5869 from german77/mousePanning
input_common: Add mouse panning
2021-02-11 09:58:23 -08:00
Morph 118e33cfa9 software_keyboard: Implement Finalize request command 2021-02-10 21:42:49 -05:00
bunnei cba1eb8f32 Merge pull request #5893 from lioncash/input
configure_input_player_widget: Minor cleanup
2021-02-10 10:55:59 -08:00
LC 2952be3145 Merge pull request #5904 from lat9nq/common-sized-dealloc
common: Add -fsized-deallocation as a Clang flag
2021-02-09 23:45:52 -05:00
LC bd7d2e6e69 Merge pull request #5905 from lat9nq/core-sized-dealloc
core: Add -fsized-dealloction as a Clang flag
2021-02-09 23:45:36 -05:00
lat9nq 187d76e48e configure_input_player_widget: Silence unused variable warnings
Prevents clang 11 from throwing an error since these variables are
unused.
2021-02-09 22:09:23 -05:00
lat9nq 19dad3e319 common: Add -fsized-deallocation as a Clang flag
Prevents an operator delete error when compiling with Clang 11.
2021-02-09 21:28:33 -05:00
lat9nq 51b74a317b core: Add -fsized-dealloction as a Clang flag
Prevents a operator delete error when compiling with Clang 11.
2021-02-09 21:27:12 -05:00
Ameer J e5b68ec93e Merge pull request #5901 from lioncash/input-warn
udp: Silence warnings on Clang 12
2021-02-09 20:19:56 -05:00
bunnei 50a42d9a50 Merge pull request #5900 from lioncash/unused-func
video_core: Remove unused functions and variables
2021-02-09 15:29:10 -08:00
Lioncash 2f9cc2f0ae bsd: Remove usage of optional emplace() with no arguments
Clang 12 currently falls over in the face of this.
2021-02-09 17:50:29 -05:00
Lioncash 771865bdfc am/controller: Remove [[fallthrough]] from unreachable path
Prevents warnings on clang 12. This path is reachable on other
variations of the build that disable the unreachable macro.
2021-02-09 17:44:14 -05:00
Lioncash 32e763c64c nfp: Correct uninitialized size being used within GetTagInfo()
We were previously the name of the object being initialized within its
own initializer, which results in uninitialized data being read.
2021-02-09 17:42:02 -05:00
Lioncash 4681f5b60b udp: Silence unused member variable warnings
Simply mark them as unused for now.
2021-02-09 17:38:45 -05:00
Lioncash 70b6d985e7 udp/client: Define ClientData constructor/destructor in cpp file
Prevents compilation errors on clang 12 due to incomplete types within a
unique_ptr member.
2021-02-09 17:36:32 -05:00
Lioncash 3f3fbe779e gl_rasterizer: Remove unused variables
Resolves warnings on clang 12
2021-02-09 17:31:37 -05:00
Lioncash cb80206c8c texture_cache/util: Remove unused functions
Silences a few warnings on clang 12.
2021-02-09 17:30:20 -05:00
Lioncash e4e97e5577 configure_input_player_widget: Reduce duplication of array accessors where applicable
Reduces the amount of code to read in expressions a little bit by
separating constituents out a little.
2021-02-09 13:15:05 -05:00
Lioncash a903d18db2 configure_input_player_widget: Avoid nontrivial copies where applicable
Previously a function was copying an array of 20 std::string instances
by value.
2021-02-09 13:15:03 -05:00
german 20d98fc773 Use GC image 2021-02-09 08:12:21 -06:00
Jatoxo 4bf6e49bda Settings: Add depth to Joysticks on Pro Controller preview (#5894)
* Add some depth to ProJoysticks

* address comments

* clang

* address nits

* fix wrong inner_offset when offset.x was 0
2021-02-08 21:06:37 -08:00
Ameer J a4606a986a Merge pull request #5880 from lat9nq/ffmpeg-external
cmake: FFmpeg linking rework
2021-02-08 21:13:10 -05:00
bunnei e9fc670bff Merge pull request #5892 from german77/backup
olsc: Stub GetSaveDataBackupSetting
2021-02-08 17:48:52 -08:00
bunnei eaacb5047c Merge pull request #5868 from german77/HandheldFix
Prevent over scheduling audio events and add motion update unschedule event
2021-02-08 11:33:53 -08:00
Morph 1b1866e7ee string_util: Remove MSVC workaround for converting between UTF8/UTF16
This has been fixed as of Visual Studio 2019 Version 16.2
2021-02-08 02:56:07 -05:00
german 020c22f53d hid: Implement GC controller 2021-02-07 22:59:46 -06:00
bunnei da2a91a019 Merge pull request #5339 from german77/interactive
Settings: Make settings controller image change with controller input
2021-02-07 20:53:46 -08:00
german 0210c4e219 olsc: Stub GetSaveDataBackupSetting 2021-02-07 22:32:13 -06:00
german c7cae8769f Add mouse panning 2021-02-07 20:31:58 -06:00
Chloe a5dd2bb598 Merge pull request #5872 from lioncash/svc-error
svc: Provide more detailed error logs for svc functions
2021-02-08 12:27:36 +11:00
Rodrigo Locatti 634c18b3ff Merge pull request #5888 from Morph1984/ogl-4.6
renderer_opengl: Update OpenGL backend version requirement to 4.6
2021-02-07 21:44:49 -03:00
LC 2112335647 Merge pull request #5889 from ogniK5377/morton-remove
video_core: Delete morton
2021-02-07 18:48:28 -05:00
Chloe Marcec 66c653566c video_core: Delete morton
moron.h & morton.cpp are not used anywhere and are just empty files
2021-02-08 10:20:21 +11:00
Morph 657ac39f45 renderer_opengl: Update OpenGL backend version requirement to 4.6 2021-02-07 16:32:35 -05:00
bunnei c7b2027e8f Merge pull request #5887 from ogniK5377/lm-fix
lm: Fix ReadLeb128
2021-02-07 10:25:56 -08:00
Morph 708c6ef06b Merge pull request #5878 from aleasto/master
pl_u: Fix read out of bounds
2021-02-07 22:20:47 +08:00
Chloe Marcec 937aa8908b lm: Fix ReadLeb128
Fixes assertion on Bloodstained Ritual of the Night.

We would over read sometimes, this is fixed by checking if the top bit is set in the first iteration. We also lock the loop off to be only the max size of the type we can fit. Finally we changed an incorrect print of "DEBUG" to "TRACE" to reflect the proper log severity
2021-02-07 23:52:56 +11:00
german 38d14331f5 Add GC controller animation 2021-02-07 00:15:24 -06:00
bunnei 1c784618b5 Merge pull request #5885 from MerryMage/ring_buffer-granularity
ring_buffer: Remove granularity template argument
2021-02-06 13:18:41 -08:00
bunnei bd5c4c438e Merge pull request #5871 from lioncash/address-arb
k_address_arbiter: Minor cleanup
2021-02-06 13:05:19 -08:00
MerryMage 46ea7034cc 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
2021-02-06 19:16:00 +00:00
Alessandro Astone 60353d70af pl_u: Fix read out of bounds 2021-02-06 18:44:01 +01:00
german beaa027b5c Refresh debug controller settings 2021-02-06 09:43:42 -06:00
german 9bba095b2b Refresh controller only when necessary 2021-02-06 09:43:42 -06:00
german cbe925c31a Add SL SR vectors, change dual joycon view, add missing raw data from keyboard/mouse 2021-02-06 09:43:42 -06:00
german e448ba4281 Add controller window and single joycon top view 2021-02-06 09:43:42 -06:00
german ace7b59863 Replace text with vectors 2021-02-06 09:43:42 -06:00
german 93ac87f29e Make settings controller image change with controller input 2021-02-06 09:43:41 -06:00
bunnei f41e6fba60 Merge pull request #5326 from german77/hidUpdate1
HID: Update the HID service to match more closely to switchbrew part 1
2021-02-06 02:40:11 -08:00
Lioncash 6764c7ce52 k_address_arbiter: Unfold R_UNLESS macros
Allows for more descriptive error messages and also doesn't hide
control-path exit returns from the reader.
2021-02-06 04:08:27 -05:00
Lioncash 8884e73c8b k_address_arbiter: Remove unnecessary usages of std::addressof
This is a useful function in a generic context or with types that
overload unary operator&. However, primitives and pointers will never do
this, so we can opt for a more straightforward syntax.
2021-02-06 04:06:33 -05:00
Lioncash c8cc1c301e k_address_arbiter: Remove dead code
This code is never used, so we can remove it. It's in version control,
so it can always be brought back when needed.
2021-02-06 04:06:33 -05:00
Lioncash 8618ac9b8b svc: Provide more detailed error logs for svc functions
Allows SVC calls to have much more informative information during error
cases. This also doesn't hide control flow returns from the reader.
2021-02-06 02:03:40 -05:00
bunnei 4e7b713922 Merge pull request #5862 from bunnei/kevent
Kernel Rework: Refactor KEvent/KReadableEvent/KWritableEvent
2021-02-05 23:00:43 -08:00
bunnei c48847e7d6 Merge pull request #5875 from lioncash/identifier
k_priority_queue: Minor cleanup
2021-02-05 17:02:13 -08:00
bunnei 7126a200c4 hle: kernel: Drop R_UNLESS_NOLOG in favor of expanded if-statement. 2021-02-05 14:03:36 -08:00
bunnei 308995e446 hle: kernel: KAddressArbiter: Remove noisy error log. 2021-02-05 14:03:36 -08:00
bunnei 9c2719d86f hle: kernel: svc: Cleanup KEvent/KReadableEvent/KWritableEvent SVCs. 2021-02-05 14:03:36 -08:00
bunnei 559c505126 common: scope_exit: Add a cancellable ScopeExit macro. 2021-02-05 14:03:36 -08:00
bunnei 0508831455 hle: kernel: Reimplement KReadableEvent and KWritableEvent. 2021-02-05 14:03:32 -08:00
bunnei 9da7b774ae hle: kernel: Implement KEvent. 2021-02-05 14:00:36 -08:00
bunnei 80a509355c hle: kernel: KAddressArbiter: Use R_UNLESS_NOLOG where applicable. 2021-02-05 14:00:36 -08:00
bunnei b4b968b9c4 common: common_funcs: Add R_UNLESS_NOLOG for scenarios that should not log. 2021-02-05 14:00:36 -08:00
bunnei 80d0eb3bbd hle: kernel: Rename WritableEvent to KWritableEvent. 2021-02-05 14:00:36 -08:00
bunnei 284a4d9283 hle: kernel: Rename ReadableEvent to KReadableEvent. 2021-02-05 14:00:36 -08:00
bunnei 0bb7225361 Merge pull request #5867 from Morph1984/am-GetHealthWarningDisappearedSystemEvent
IApplicationFunctions: Implement GetHealthWarningDisappearedSystemEvent
2021-02-05 13:49:49 -08:00
lat9nq e82fa6cce2 Address reviewer comments 2021-02-05 16:46:03 -05:00
lat9nq 1eaff4546b CMake: Port citra-emu/citra FindFFmpeg.cmake
Also renames related CMake variables to match both the Find*FFmpeg* and
variables defined within the file. Fixes odd errors produced by the old
FindFFmpeg.

Citra's FindFFmpeg is slightly modified here: adds Citra's copyright at
the beginning, renames FFmpeg_INCLUDES to FFmpeg_INCLUDE_DIR, disables a
few components in _FFmpeg_ALL_COMPONENTS, and adds the missing avutil
component to the comment above.
2021-02-05 15:39:19 -05:00
lat9nq e6211c3753 CMake: Implement YUZU_USE_BUNDLED_FFMPEG
For Linux, instructs CMake to use the FFmpeg submodule in externals.
This is HEAVILY based on our usage of the late Unicorn.  Minimal change
to MSVC as it uses the yuzu-emu/ext-windows-bin. MinGW now targets the
same ext-windows-bin libraries as MSVC for FFmpeg. Adds FFMPEG_LIBRARIES
to WIN32 and simplifies video_core/CMakeLists.txt a bit.
2021-02-05 14:49:51 -05:00
bunnei 09a542fdf1 Merge pull request #5865 from lat9nq/conditionally-quiet
video_core: host_shaders: Don't pass --quiet to glslangValidator if unavailable
2021-02-04 17:07:17 -08:00
bunnei d607a57c4c Merge pull request #5876 from lioncash/truncation
k_affinity_mask: Avoid implicit truncation to bool
2021-02-04 14:44:11 -08:00
Lioncash 7da83ef6f7 k_affinity_mask: Avoid implicit truncation to bool
This can cause compiler warnings. Instead, we can explicitly add a
boolean expression around it to naturally turn the result into a bool.
2021-02-04 15:35:46 -05:00
Lioncash 9fb1a47658 k_priority_queue: Unfold several declval usages
Given these are only used as function existence checks, we can simplify
some usages of declval, given they aren't particularly useful here.

Reduces a few template instantiations, which at most reduces compile
times a tiny bit.
2021-02-04 15:18:58 -05:00
Lioncash 8170435ec5 k_priority_queue: Simplify affinity mask type alias
We can make use of the _t variants of the templates to cut down on a
little bit of verbosity.
2021-02-04 14:57:41 -05:00
Lioncash 4431b499d0 k_priority_queue: Resolved reserved identifier
An identifier containing a starting underscore followed by a capital
letter is reserved by the standard. It's trivial to avoid this by moving
the underscore to the end of the identifier.

While the likelihood of clashing here being minimal, we can turn a
"should not break" scenario into a definitive "will not break" one, so
why not?.
2021-02-04 14:55:08 -05:00
Morph 53d62eb9bd key_manager: Create the keys directory if it does not exist 2021-02-04 06:05:50 -05:00
bunnei 0c275a6464 Merge pull request #5870 from german77/hanheldfix2
config: Always update handheld config
2021-02-03 19:02:59 -08:00
german 5809b8941e Add footer types and address comments 2021-02-03 20:17:08 -06:00
german 5c9d8e8f39 Fix npad struct to match switchbrew 2021-02-03 20:17:08 -06:00
german 1f204e5930 Adds missing controller types and properties 2021-02-03 20:17:08 -06:00
bunnei 65bd33b7c6 Merge pull request #5863 from ogniK5377/disable-reverb
audren: Disable reverb for the time being
2021-02-03 18:05:54 -08:00
german ebf3784c75 Always update handheld config 2021-02-03 17:48:04 -06:00
bunnei 297e909002 Merge pull request #5848 from ogniK5377/k-resourcelimit
kernel: Rewrite resource limit to be more accurate
2021-02-03 14:53:25 -08:00
Chloe Marcec 6ff08eb44f Simplify limitableresource names 2021-02-03 12:55:16 +11:00
bunnei 6f37a78056 Merge pull request #5842 from german77/userfix
acc: Fix error when second user is selected
2021-02-02 15:43:51 -08:00
bunnei cac3881076 Merge pull request #5841 from german77/username
Avoid overwriting username
2021-02-02 15:04:09 -08:00
german e0c83e305a Prevent over scheduling audio events and terminate properly the motion update event 2021-02-02 10:17:10 -06:00
Morph 922d1556a0 IApplicationFunctions: Implement GetHealthWarningDisappearedSystemEvent 2021-02-02 10:47:38 -05:00
Morph c21d343b04 settings: Log the cache, config, and mod load directories 2021-02-02 04:01:05 -05:00
lat9nq 255834538c video_core: host_shaders: Don't pass --quiet to glslangValidator if unavailable
Prevents CMake from calling `glslangValidator` with `--quiet` when it is
not available, i.e. on older downstream versions from Ubuntu.
2021-02-01 23:39:54 -05:00
bunnei 57d0ac56cc Merge pull request #5861 from german77/HandheldFix
hid: Only update motion for npad and prevent over scheduling events
2021-02-01 18:46:26 -08:00
Chloe Marcec 1c1940200a Compile error 2021-02-02 13:23:34 +11:00
Chloe Marcec 4d7f0c4c07 Address issues 2021-02-02 13:23:00 +11:00
MerryMage 6f76ed25df arm_dynarmic_32: Print out CPSR.T on exception 2021-02-01 18:35:33 +00:00
bunnei eee513213d Merge pull request #5859 from Morph1984/nifm
nifm: Stub GetCurrentNetworkProfile and GetCurrentIpConfigInfo
2021-01-31 21:31:14 -08:00
Ameer J a57a3172ce Merge pull request #5856 from Morph1984/nifm-fix-getappletinfo-stub
nifm: Fix GetAppletInfo stub
2021-01-31 23:33:11 -05:00
Chloe Marcec 6619834395 audren: Disable reverb for the time being
As this is causing issues in a few games, it's best to have it disabled until it's completely implemented
2021-02-01 14:41:58 +11:00
bunnei 179fb1e2f0 Merge pull request #5858 from Morph1984/IsGamePlayRecordingSupported-stub
am/IApplicationFunctions: Stub IsGamePlayRecordingSupported
2021-01-31 18:04:04 -08:00
german 963ce4f5ab Only update motion for npad and prevent over scheduling events 2021-01-31 18:52:38 -06:00
bunnei 693ea6362b Merge pull request #5860 from Morph1984/prepo-transmission-stub
prepo: Stub RequestImmediateTransmission and GetTransmissionStatus
2021-01-31 12:26:00 -08:00
Morph a777002e4c Merge pull request #5846 from ameerj/analog-join
analog_from_button: Fix update_thread.join exception
2021-01-31 23:06:06 +08:00
Morph 200c8bce5a nifm: Stub GetCurrentIpConfigInfo
- Used by Lets Sing 12
2021-01-31 07:36:37 -05:00
Morph af32dc3653 prepo: Stub GetTransmissionStatus 2021-01-31 07:07:11 -05:00
Morph 343ee0fc1f prepo: Stub RequestImmediateTransmission
- Used by Animal Crossing: New Horizons
2021-01-31 07:04:35 -05:00
Morph 130ca0ca61 nifm: Stub GetCurrentNetworkProfile
- Used by Minecraft Bedrock Edition
- Used by Bloons TD 5
2021-01-31 06:56:29 -05:00
Morph 9b855feeec nifm: Add several structs 2021-01-31 06:56:29 -05:00
Morph 5bf0587bee am/IApplicationFunctions: Stub IsGamePlayRecordingSupported
Used by RetroArch
2021-01-31 03:11:03 -05:00
Morph 18c2915be2 bsd: Fix EventFd stub 2021-01-31 02:57:56 -05:00
bunnei bd51df8969 Merge pull request #5855 from Morph1984/bsd-fix-getsockopt-stub
bsd: Fix GetSockOpt stub
2021-01-30 23:21:21 -08:00
Morph 3bd2f586a1 nifm: Fix GetAppletInfo stub 2021-01-31 02:19:36 -05:00
Morph e2b1734183 Merge pull request #5851 from ameerj/pop-inv-stub
am: Stub TryPopFromFriendInvitationStorageChannel
2021-01-31 14:18:40 +08:00
Morph e1ad1c2552 bsd: Fix GetSockOpt stub 2021-01-31 01:08:56 -05:00
ameerj 6b81524050 bsd: Stub EventFd
Used by Family Feud
2021-01-30 21:47:32 -05:00
ameerj 86e8b00299 am: Stub TryPopFromFriendInvitationStorageChannel
Used by Family Feud
2021-01-30 21:43:55 -05:00
Chloe Marcec 7a8501243d fix compile error 2021-01-30 21:51:22 +11:00
Chloe Marcec dea89a59c9 cleanup commenting 2021-01-30 21:20:35 +11:00
Chloe Marcec 3edb06af11 Drop m_ from lock 2021-01-30 21:19:49 +11:00
Chloe Marcec a69befa745 Move to GetGlobalTimeNs, fix GetTotalPhysicalMemoryAvailable 2021-01-30 21:03:10 +11:00
Chloe Marcec 68a52e9050 kernel: Rewrite resource limit to be more accurate
Matches closer to hardware
2021-01-30 20:40:49 +11:00
bunnei aba77ea06a Merge pull request #5779 from bunnei/kthread-rewrite
Rewrite KThread to be more accurate
2021-01-29 23:06:40 -08:00
bunnei 15108fcea7 Merge pull request #5795 from ReinUsesLisp/bytes-to-map-end
video_core/memory_manager: Add BytesToMapEnd
2021-01-29 22:56:29 -08:00
Morph 4128ce3e12 Merge pull request #5838 from german77/prepostub
prepo: Stub GetSystemSessionId
2021-01-30 14:19:59 +08:00
german 11815a3499 Stub GetSystemSessionId 2021-01-29 18:41:28 -06:00
bunnei bef8c080a2 Merge pull request #5805 from german77/HandheldFix
Fix connect and disconnect controller events
2021-01-29 16:39:01 -08:00
ameerj 37e544492e analog_from_button: Fix update_thread.join exception
This commit aims to address an exception that occurs when trying to join the Analog object's update_thread.

By using an atomic bool for the status of the update thread, we ensure its value is consistent across the threads accessing it.
2021-01-29 18:41:22 -05:00
bunnei 46f2ca41a4 Merge pull request #5809 from ogniK5377/FlushAudioOutBuffers
audout: FlushAudioOutBuffers
2021-01-28 21:54:46 -08:00
bunnei 189340d654 hle: kernel: KLightLock: Fix several bugs. 2021-01-28 21:53:21 -08:00
bunnei 4bb6de297f common: common_funcs: Change R_UNLESS to LOG_ERROR. 2021-01-28 21:51:16 -08:00
bunnei 1ebbfe8e3b arm: dynarmic: Reintroduce JIT checks on SaveContext/LoadContext. 2021-01-28 21:50:39 -08:00
bunnei d09ade6cab hle: kernel: KThread: Release thread resource on thread exit. 2021-01-28 21:49:47 -08:00
bunnei a96667d30c yuzu: debugger: Ignore HLE threads. 2021-01-28 21:42:27 -08:00
bunnei 38ae7c53c0 hle: kernel: process: Add state lock. 2021-01-28 21:42:26 -08:00
bunnei 1a1bef5154 hle: kernel: threading: Fix bug with host thread naming. 2021-01-28 21:42:26 -08:00
bunnei bb41b9d462 hle: kernel: k_scheduler_lock: Cleanup. 2021-01-28 21:42:26 -08:00
bunnei 2f34533f47 core: arm: Remove unnecessary JIT checks. 2021-01-28 21:42:26 -08:00
bunnei d685f12dbc common: common_funcs: Log error on R_UNLESS. 2021-01-28 21:42:26 -08:00
bunnei cf3a05cf8c hle: kernel: Allocate a dummy KThread for each host thread, and use it for scheduling. 2021-01-28 21:42:26 -08:00
bunnei 0b307a12f3 hle: kernel: k_scheduler: Use atomics for current_thread, etc. 2021-01-28 21:42:26 -08:00
bunnei 9b0a981710 hle: kernel: k_scheduler: Fix for single core mode. 2021-01-28 21:42:26 -08:00
bunnei 67d28075dd kernel: Fix build errors. 2021-01-28 21:42:26 -08:00
bunnei f6ea864471 core: cpu_manager: Remove unused variable. 2021-01-28 21:42:26 -08:00
bunnei 177b4da4e7 hle: kernel: KScheduler: Introduce thread context_guard. 2021-01-28 21:42:26 -08:00
bunnei f34dd04d09 hle: kernel: Recode implementation of KThread to be more accurate. 2021-01-28 21:42:26 -08:00
bunnei 25cece3cea kernel: svc_types: Add ThreadActivity. 2021-01-28 21:42:26 -08:00
bunnei 589ecb9a75 kernel: KSchedulerPriorityQueue: Lowest priority should be LowestThreadPriority. 2021-01-28 21:42:26 -08:00
bunnei 4440a59cb6 kernel: k_light_lock: Simplify EmuThreadHandle implementation. 2021-01-28 21:42:26 -08:00
bunnei 86206c81c2 hle: kernel: TimeManager: Simplify to not rely on previous EmuThreadHandle implementation. 2021-01-28 21:42:26 -08:00
bunnei 7351708eea common: common_funcs: Add useful kernel macro R_SUCCEED_IF. 2021-01-28 21:42:26 -08:00
bunnei eb3a02a3fd core: hle: kernel: object: Implement Finalize() virtual method. 2021-01-28 21:42:26 -08:00
bunnei 3cefddbb47 core: hle: kernel: svc_results: Populate with several missing error codes. 2021-01-28 21:42:26 -08:00
bunnei ddfa48d704 core: hle: kernel: Implement KLightLock. 2021-01-28 21:42:26 -08:00
bunnei 54620961fb core: hle: kernel: Implement KThreadQueue. 2021-01-28 21:42:25 -08:00
bunnei 39987beb17 common: common_funcs: Add a few more useful macros for kernel code. 2021-01-28 21:42:25 -08:00
bunnei 4ba9d6f969 hle: kernel: KThread: Clean up thread priorities. 2021-01-28 21:42:25 -08:00
bunnei 0ae0bc4340 hle: kernel: KThread: Reorganize thread priority defaults. 2021-01-28 21:42:25 -08:00
bunnei eb396cd021 hle: kernel: KThread: Fix ThreadType definition. 2021-01-28 21:42:25 -08:00
bunnei d49e29d866 hle: kernel: Move single core "phantom mode" out of KThread.
- This is a workaround that does not belong in a kernel primitive.
2021-01-28 21:42:25 -08:00
bunnei e74f682506 hle: kernel: KThread: Remove thread types that do not exist. 2021-01-28 21:42:25 -08:00
bunnei db342cc6f0 arm: arm_dynarmic: Skip calls when JIT is invalid.
- This can happen if called from an idle or suspension thread.
2021-01-28 21:42:25 -08:00
bunnei 3d70b4a4ea core: hle: kernel: Rename Thread to KThread. 2021-01-28 21:42:25 -08:00
german f970b836e5 Fix user changing to 0 if valid 2021-01-28 21:02:25 -06:00
bunnei 9f626d9b94 Merge pull request #5837 from german77/socketstub
sockets: Stub GetSockOpt
2021-01-28 16:28:11 -08:00
german f4442c3456 Avoid overwritting username 2021-01-28 16:58:53 -06:00
LC a4a8cae837 Merge pull request #5836 from ReinUsesLisp/unaligned-constr-sched
vk_scheduler: Fix unaligned placement new expressions
2021-01-28 10:53:15 -05:00