Commit graph

15390 commits

Author SHA1 Message Date
ReinUsesLisp 9d8ca6cc4a 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 069afcc633 maxwell_to_gl: Remove unused code
Removes unused declarations in maxwell_to_gl.h
2021-02-12 23:01:09 -05:00
Chloe Marcec 7ad63ea542 revert to std::sin and std::cos 2021-02-12 18:48:10 -08:00
Chloe Marcec d28b942458 address issues 2021-02-12 18:48:10 -08:00
Chloe Marcec 4a7fd91857 audren: Implement I3dl2Reverb
Most notable fix is the voices in Fire Emblem Three Houses
2021-02-12 18:48:10 -08:00
ameerj ec9b6641b1 kernel: More accurately reserve and release resources 2021-02-12 19:05:24 -05:00
ameerj 5fa6b15215 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 37939482fb
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 dcc0617cc2 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 a0379c2db5
Merge pull request #5902 from lioncash/core-warn
core: Silence various warnings on Clang 12
2021-02-11 18:57:23 -08:00
bunnei e53b6ecc76
Merge pull request #5869 from german77/mousePanning
input_common: Add mouse panning
2021-02-11 09:58:23 -08:00
Morph 886043a6d2 software_keyboard: Implement Finalize request command 2021-02-10 21:42:49 -05:00
bunnei 3e6e0d8f13
Merge pull request #5893 from lioncash/input
configure_input_player_widget: Minor cleanup
2021-02-10 10:55:59 -08:00
LC dee133ab3d
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 3c22ce035b
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 0e004269a9 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 a58086ae0d 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 68f718943e 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 70db238f80
Merge pull request #5901 from lioncash/input-warn
udp: Silence warnings on Clang 12
2021-02-09 20:19:56 -05:00
bunnei 245d60bfff
Merge pull request #5900 from lioncash/unused-func
video_core: Remove unused functions and variables
2021-02-09 15:29:10 -08:00
Lioncash 0cd40fb523 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 1dab8acf5f 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 d64ba58759 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 a352f34462 udp: Silence unused member variable warnings
Simply mark them as unused for now.
2021-02-09 17:38:45 -05:00
Lioncash cda24b8eb1 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 10636d2494 gl_rasterizer: Remove unused variables
Resolves warnings on clang 12
2021-02-09 17:31:37 -05:00
Lioncash 783dc9e112 texture_cache/util: Remove unused functions
Silences a few warnings on clang 12.
2021-02-09 17:30:20 -05:00
Lioncash 864762cac9 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 5c7c212f61 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 bcd4e4f650 Use GC image 2021-02-09 08:12:21 -06:00
Jatoxo 2e32ab4e0b
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 26669d9e13
Merge pull request #5880 from lat9nq/ffmpeg-external
cmake: FFmpeg linking rework
2021-02-08 21:13:10 -05:00
bunnei 1b730827dd
Merge pull request #5892 from german77/backup
olsc: Stub GetSaveDataBackupSetting
2021-02-08 17:48:52 -08:00
bunnei 7666c0994c
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 ff58ad2050 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 a994a40467 hid: Implement GC controller 2021-02-07 22:59:46 -06:00
bunnei 0896089092
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 3f9eb56972 olsc: Stub GetSaveDataBackupSetting 2021-02-07 22:32:13 -06:00
german 52b79ac009 Add mouse panning 2021-02-07 20:31:58 -06:00
Chloe d0a760a34a
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 4c82c08897
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 148fb12bf3
Merge pull request #5889 from ogniK5377/morton-remove
video_core: Delete morton
2021-02-07 18:48:28 -05:00
Chloe Marcec c5f109bc50 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 6e5cc977ad renderer_opengl: Update OpenGL backend version requirement to 4.6 2021-02-07 16:32:35 -05:00
bunnei 230e71b255
Merge pull request #5887 from ogniK5377/lm-fix
lm: Fix ReadLeb128
2021-02-07 10:25:56 -08:00
Morph 458be11f93
Merge pull request #5878 from aleasto/master
pl_u: Fix read out of bounds
2021-02-07 22:20:47 +08:00
Chloe Marcec 9d5a56a40b 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 8893b766c3 Add GC controller animation 2021-02-07 00:15:24 -06:00
bunnei 4a01812ebe
Merge pull request #5885 from MerryMage/ring_buffer-granularity
ring_buffer: Remove granularity template argument
2021-02-06 13:18:41 -08:00
bunnei 9078f4a9c7
Merge pull request #5871 from lioncash/address-arb
k_address_arbiter: Minor cleanup
2021-02-06 13:05:19 -08:00
MerryMage 8d00265998 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 32d9a83f8e pl_u: Fix read out of bounds 2021-02-06 18:44:01 +01:00
german 160341fcf8 Refresh debug controller settings 2021-02-06 09:43:42 -06:00
german d6a0975e5d Refresh controller only when necessary 2021-02-06 09:43:42 -06:00
german c9597af39d Add SL SR vectors, change dual joycon view, add missing raw data from keyboard/mouse 2021-02-06 09:43:42 -06:00
german a7f9983563 Add controller window and single joycon top view 2021-02-06 09:43:42 -06:00
german ea1f656d7e Replace text with vectors 2021-02-06 09:43:42 -06:00
german 481cd86722 Make settings controller image change with controller input 2021-02-06 09:43:41 -06:00
bunnei 61bf850f3d
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 40ab2b9348 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 b8fc74d74d 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 7b9c58880f 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 75a60a6e22 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 1498a7c9a8
Merge pull request #5862 from bunnei/kevent
Kernel Rework: Refactor KEvent/KReadableEvent/KWritableEvent
2021-02-05 23:00:43 -08:00
bunnei 3a804752cb
Merge pull request #5875 from lioncash/identifier
k_priority_queue: Minor cleanup
2021-02-05 17:02:13 -08:00
bunnei ea4f62615e hle: kernel: Drop R_UNLESS_NOLOG in favor of expanded if-statement. 2021-02-05 14:03:36 -08:00
bunnei 546af64340 hle: kernel: KAddressArbiter: Remove noisy error log. 2021-02-05 14:03:36 -08:00
bunnei eba3c59a61 hle: kernel: svc: Cleanup KEvent/KReadableEvent/KWritableEvent SVCs. 2021-02-05 14:03:36 -08:00
bunnei 18175c71ed common: scope_exit: Add a cancellable ScopeExit macro. 2021-02-05 14:03:36 -08:00
bunnei ff3c7c068b hle: kernel: Reimplement KReadableEvent and KWritableEvent. 2021-02-05 14:03:32 -08:00
bunnei 6bf80dfee0 hle: kernel: Implement KEvent. 2021-02-05 14:00:36 -08:00
bunnei e9446d232f hle: kernel: KAddressArbiter: Use R_UNLESS_NOLOG where applicable. 2021-02-05 14:00:36 -08:00
bunnei 4577dcd5f9 common: common_funcs: Add R_UNLESS_NOLOG for scenarios that should not log. 2021-02-05 14:00:36 -08:00
bunnei 3f942c01f0 hle: kernel: Rename WritableEvent to KWritableEvent. 2021-02-05 14:00:36 -08:00
bunnei e86a7e3691 hle: kernel: Rename ReadableEvent to KReadableEvent. 2021-02-05 14:00:36 -08:00
bunnei b0727c90c5
Merge pull request #5867 from Morph1984/am-GetHealthWarningDisappearedSystemEvent
IApplicationFunctions: Implement GetHealthWarningDisappearedSystemEvent
2021-02-05 13:49:49 -08:00
lat9nq b7e6eca8b2 Address reviewer comments 2021-02-05 16:46:03 -05:00
lat9nq 1d19eac415 CMake: Port citra-emu/citra FindFFmpeg.cmake
Also renames related CMake variables to match both the Find*FFmpeg* and
variables defined within the file. Fixes odd errors produced by the old
FindFFmpeg.

Citra's FindFFmpeg is slightly modified here: adds Citra's copyright at
the beginning, renames FFmpeg_INCLUDES to FFmpeg_INCLUDE_DIR, disables a
few components in _FFmpeg_ALL_COMPONENTS, and adds the missing avutil
component to the comment above.
2021-02-05 15:39:19 -05:00
lat9nq 47401016bf 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 741dc13c5a
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 00cb631b2f
Merge pull request #5876 from lioncash/truncation
k_affinity_mask: Avoid implicit truncation to bool
2021-02-04 14:44:11 -08:00
Lioncash 756365386a 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 b944edc85d 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 31e6e58101 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 53aec1fe2d 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 806e2d7900 key_manager: Create the keys directory if it does not exist 2021-02-04 06:05:50 -05:00
bunnei b331bb5210
Merge pull request #5870 from german77/hanheldfix2
config: Always update handheld config
2021-02-03 19:02:59 -08:00
german 8019b2b9b5 Add footer types and address comments 2021-02-03 20:17:08 -06:00
german 9a9e81f2e9 Fix npad struct to match switchbrew 2021-02-03 20:17:08 -06:00
german f30ef98761 Adds missing controller types and properties 2021-02-03 20:17:08 -06:00
bunnei cde532cc52
Merge pull request #5863 from ogniK5377/disable-reverb
audren: Disable reverb for the time being
2021-02-03 18:05:54 -08:00
german c1b81f776c Always update handheld config 2021-02-03 17:48:04 -06:00
bunnei b0c9752663
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 2c6e940493 Simplify limitableresource names 2021-02-03 12:55:16 +11:00
bunnei 48d040fded
Merge pull request #5842 from german77/userfix
acc: Fix error when second user is selected
2021-02-02 15:43:51 -08:00
bunnei e5a76d728f
Merge pull request #5841 from german77/username
Avoid overwriting username
2021-02-02 15:04:09 -08:00
german 7784b1da6d Prevent over scheduling audio events and terminate properly the motion update event 2021-02-02 10:17:10 -06:00
Morph 13b08376b7 IApplicationFunctions: Implement GetHealthWarningDisappearedSystemEvent 2021-02-02 10:47:38 -05:00
Morph 9137f3ec68 settings: Log the cache, config, and mod load directories 2021-02-02 04:01:05 -05:00
lat9nq fc43eac82a 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 d4ebc9a120
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 64c3582705 Compile error 2021-02-02 13:23:34 +11:00
Chloe Marcec 9e4b2d60bc Address issues 2021-02-02 13:23:00 +11:00
MerryMage 821fc4a7b6 arm_dynarmic_32: Print out CPSR.T on exception 2021-02-01 18:35:33 +00:00
bunnei f317b0d354
Merge pull request #5859 from Morph1984/nifm
nifm: Stub GetCurrentNetworkProfile and GetCurrentIpConfigInfo
2021-01-31 21:31:14 -08:00
Ameer J f614d7d887
Merge pull request #5856 from Morph1984/nifm-fix-getappletinfo-stub
nifm: Fix GetAppletInfo stub
2021-01-31 23:33:11 -05:00
Chloe Marcec 9fc7f60b94 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 67d08f14af
Merge pull request #5858 from Morph1984/IsGamePlayRecordingSupported-stub
am/IApplicationFunctions: Stub IsGamePlayRecordingSupported
2021-01-31 18:04:04 -08:00
german 2489547dc5 Only update motion for npad and prevent over scheduling events 2021-01-31 18:52:38 -06:00
bunnei 1498ece290
Merge pull request #5860 from Morph1984/prepo-transmission-stub
prepo: Stub RequestImmediateTransmission and GetTransmissionStatus
2021-01-31 12:26:00 -08:00
Morph f7dc77e03a
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 8c7d89e6c7 nifm: Stub GetCurrentIpConfigInfo
- Used by Lets Sing 12
2021-01-31 07:36:37 -05:00
Morph 7d9465d47a prepo: Stub GetTransmissionStatus 2021-01-31 07:07:11 -05:00
Morph 2394807b42 prepo: Stub RequestImmediateTransmission
- Used by Animal Crossing: New Horizons
2021-01-31 07:04:35 -05:00
Morph 4bf1cf1f81 nifm: Stub GetCurrentNetworkProfile
- Used by Minecraft Bedrock Edition
- Used by Bloons TD 5
2021-01-31 06:56:29 -05:00
Morph 70a2065828 nifm: Add several structs 2021-01-31 06:56:29 -05:00
Morph 9f6b35e61f am/IApplicationFunctions: Stub IsGamePlayRecordingSupported
Used by RetroArch
2021-01-31 03:11:03 -05:00
Morph ded094a340 bsd: Fix EventFd stub 2021-01-31 02:57:56 -05:00
bunnei 1cc009a996
Merge pull request #5855 from Morph1984/bsd-fix-getsockopt-stub
bsd: Fix GetSockOpt stub
2021-01-30 23:21:21 -08:00
Morph 9914db8daa nifm: Fix GetAppletInfo stub 2021-01-31 02:19:36 -05:00
Morph 94f660d1cb
Merge pull request #5851 from ameerj/pop-inv-stub
am: Stub TryPopFromFriendInvitationStorageChannel
2021-01-31 14:18:40 +08:00
Morph 6cc769065d bsd: Fix GetSockOpt stub 2021-01-31 01:08:56 -05:00
ameerj ad146eca60 bsd: Stub EventFd
Used by Family Feud
2021-01-30 21:47:32 -05:00
ameerj 99dcf7da21 am: Stub TryPopFromFriendInvitationStorageChannel
Used by Family Feud
2021-01-30 21:43:55 -05:00
Chloe Marcec ee333e063d fix compile error 2021-01-30 21:51:22 +11:00
Chloe Marcec 56742c6222 cleanup commenting 2021-01-30 21:20:35 +11:00
Chloe Marcec 7791cfd960 Drop m_ from lock 2021-01-30 21:19:49 +11:00
Chloe Marcec 3bf62c7a8a Move to GetGlobalTimeNs, fix GetTotalPhysicalMemoryAvailable 2021-01-30 21:03:10 +11:00
Chloe Marcec 3be1a565f8 kernel: Rewrite resource limit to be more accurate
Matches closer to hardware
2021-01-30 20:40:49 +11:00
bunnei a4526c4e1a
Merge pull request #5779 from bunnei/kthread-rewrite
Rewrite KThread to be more accurate
2021-01-29 23:06:40 -08:00
bunnei 5861bacafd
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 f67cfebada
Merge pull request #5838 from german77/prepostub
prepo: Stub GetSystemSessionId
2021-01-30 14:19:59 +08:00
german 9150b8972e Stub GetSystemSessionId 2021-01-29 18:41:28 -06:00
bunnei 650734cc3e
Merge pull request #5805 from german77/HandheldFix
Fix connect and disconnect controller events
2021-01-29 16:39:01 -08:00
ameerj ef8b3623f5 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 b786568c5a
Merge pull request #5809 from ogniK5377/FlushAudioOutBuffers
audout: FlushAudioOutBuffers
2021-01-28 21:54:46 -08:00
bunnei 543e212554 hle: kernel: KLightLock: Fix several bugs. 2021-01-28 21:53:21 -08:00
bunnei 8d1afcb90f common: common_funcs: Change R_UNLESS to LOG_ERROR. 2021-01-28 21:51:16 -08:00
bunnei c8fe8247ee arm: dynarmic: Reintroduce JIT checks on SaveContext/LoadContext. 2021-01-28 21:50:39 -08:00
bunnei e24c6dab93 hle: kernel: KThread: Release thread resource on thread exit. 2021-01-28 21:49:47 -08:00
bunnei 10738839ad yuzu: debugger: Ignore HLE threads. 2021-01-28 21:42:27 -08:00
bunnei 3856564727 hle: kernel: process: Add state lock. 2021-01-28 21:42:26 -08:00
bunnei ff46ef7ea3 hle: kernel: threading: Fix bug with host thread naming. 2021-01-28 21:42:26 -08:00
bunnei 6ee8340a6b hle: kernel: k_scheduler_lock: Cleanup. 2021-01-28 21:42:26 -08:00
bunnei 055194d2ab core: arm: Remove unnecessary JIT checks. 2021-01-28 21:42:26 -08:00
bunnei 091e9e8c41 common: common_funcs: Log error on R_UNLESS. 2021-01-28 21:42:26 -08:00
bunnei 6e953f7f02 hle: kernel: Allocate a dummy KThread for each host thread, and use it for scheduling. 2021-01-28 21:42:26 -08:00
bunnei 37f74d8741 hle: kernel: k_scheduler: Use atomics for current_thread, etc. 2021-01-28 21:42:26 -08:00
bunnei f6b10fad63 hle: kernel: k_scheduler: Fix for single core mode. 2021-01-28 21:42:26 -08:00
bunnei 0a1449e04b kernel: Fix build errors. 2021-01-28 21:42:26 -08:00
bunnei 89a5ae92bd core: cpu_manager: Remove unused variable. 2021-01-28 21:42:26 -08:00
bunnei ca78f77827 hle: kernel: KScheduler: Introduce thread context_guard. 2021-01-28 21:42:26 -08:00
bunnei cdd14b03e5 hle: kernel: Recode implementation of KThread to be more accurate. 2021-01-28 21:42:26 -08:00
bunnei 1470338458 kernel: svc_types: Add ThreadActivity. 2021-01-28 21:42:26 -08:00
bunnei 1772ebeb1e kernel: KSchedulerPriorityQueue: Lowest priority should be LowestThreadPriority. 2021-01-28 21:42:26 -08:00
bunnei 1f99f5473c kernel: k_light_lock: Simplify EmuThreadHandle implementation. 2021-01-28 21:42:26 -08:00
bunnei c0f5830323 hle: kernel: TimeManager: Simplify to not rely on previous EmuThreadHandle implementation. 2021-01-28 21:42:26 -08:00
bunnei bb966d3e33 common: common_funcs: Add useful kernel macro R_SUCCEED_IF. 2021-01-28 21:42:26 -08:00
bunnei ff186b2498 core: hle: kernel: object: Implement Finalize() virtual method. 2021-01-28 21:42:26 -08:00
bunnei 33b4930280 core: hle: kernel: svc_results: Populate with several missing error codes. 2021-01-28 21:42:26 -08:00
bunnei 5a4fc4a529 core: hle: kernel: Implement KLightLock. 2021-01-28 21:42:26 -08:00
bunnei 97129bc742 core: hle: kernel: Implement KThreadQueue. 2021-01-28 21:42:25 -08:00
bunnei 2fb77adb9f common: common_funcs: Add a few more useful macros for kernel code. 2021-01-28 21:42:25 -08:00
bunnei 4dbf3f4880 hle: kernel: KThread: Clean up thread priorities. 2021-01-28 21:42:25 -08:00
bunnei 1e55498110 hle: kernel: KThread: Reorganize thread priority defaults. 2021-01-28 21:42:25 -08:00
bunnei 0530292b97 hle: kernel: KThread: Fix ThreadType definition. 2021-01-28 21:42:25 -08:00
bunnei 4782985013 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 eea346ba8e hle: kernel: KThread: Remove thread types that do not exist. 2021-01-28 21:42:25 -08:00
bunnei 9a4e148f9e 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 c0d3aef28c core: hle: kernel: Rename Thread to KThread. 2021-01-28 21:42:25 -08:00
german 8ba0cac71c Fix user changing to 0 if valid 2021-01-28 21:02:25 -06:00
bunnei df41e78205
Merge pull request #5837 from german77/socketstub
sockets: Stub GetSockOpt
2021-01-28 16:28:11 -08:00
german 7b8fa78c65 Avoid overwritting username 2021-01-28 16:58:53 -06:00
LC 16818e952c
Merge pull request #5836 from ReinUsesLisp/unaligned-constr-sched
vk_scheduler: Fix unaligned placement new expressions
2021-01-28 10:53:15 -05:00
LC 9f6290d207
Merge pull request #5840 from Morph1984/prepo-fix
prepo: Fix BufferDescriptorX invalid buffer index errors and add New variants of SaveReport
2021-01-28 10:52:44 -05:00
LC 0e125dfd43
Merge pull request #5835 from Morph1984/cleanup-sixaxis-fusion
hid: Cleanup SixAxisFusionParameters
2021-01-28 10:51:04 -05:00
Morph 4921ba05db hid: Add static_assert for Parameter size 2021-01-28 09:41:43 -05:00
Morph ae6b3bdfbf prepo: Fix BufferDescriptorX invalid buffer errors and add "New" variants of SaveReport
The second input buffer could be optional when prepo/srepo is called, test for the availability of the second buffer prior to reading from it.
2021-01-28 01:32:24 -05:00
Morph 008afa5d59 hle_ipc: Add Can(Read, Write)Buffer
Allows us to test whether a buffer can be read from or written to memory
2021-01-28 01:32:24 -05:00
german 659b5f8088 Stub GetSockOpt 2021-01-27 23:18:20 -06:00
ReinUsesLisp 9e88ad8da9 vk_scheduler: Fix unaligned placement new expressions
We were accidentaly creating an object in an unaligned memory address.
Fix this by manually aligning the offset.
2021-01-27 22:28:22 -03:00
bunnei 45b13c3037
Merge pull request #5786 from ReinUsesLisp/glsl-cbuf
gl_shader_decompiler: Fix constant buffer size calculation
2021-01-27 15:27:53 -08:00
Rodrigo Locatti ef6cc3aa1d
vulkan_device: Blacklist Intel from float16 math (#5798)
Astral Chain crashes Intel's SPIR-V compiler when using fp16.
Disable this while the vendor works on a fix.
2021-01-27 13:31:32 -08:00
bunnei 28b822fe38
Merge pull request #5778 from ReinUsesLisp/shader-dir
renderer_opengl: Avoid precompiled cache and force NV GL cache directory
2021-01-27 11:34:21 -08:00
Morph d4d39aa4c7 npad: Remove unused device handle parameter 2021-01-27 13:05:31 -05:00
bunnei fb0fe3b8c3
Merge pull request #5812 from german77/StubSixaxisFusion
HID: Stub Set/Get/Reset SixaxisSensorFusionParameters
2021-01-26 15:58:04 -08:00
bunnei 09b6f03592
Merge pull request #5810 from ogniK5377/stereo-vision
hle: Implement remaining services for Stereo Vision
2021-01-26 15:01:01 -08:00
bunnei 72c1cb85f1
Merge pull request #5824 from ogniK5377/IPsmSession
psm: IPsmSession
2021-01-26 11:11:29 -08:00
bunnei 64a5548454
Merge pull request #5774 from ogniK5377/mii-raw-random
mii: Fix BuildRandomStoreData & Cleanup raw_data
2021-01-25 16:41:20 -08:00
bunnei 81a037df9d
Merge pull request #5771 from ogniK5377/lm-rework
lm: Recode LM service
2021-01-25 10:18:09 -08:00
Chloe Marcec 2c57f0fbd5 Omit system reference 2021-01-25 23:13:37 +11:00
Chloe Marcec 04e9486651 psm: IPsmSession
Used by homebrew menu
2021-01-25 21:37:51 +11:00
bunnei 2a2ee62cfd
Merge pull request #5799 from ogniK5377/event-register-unregister
nvdrv: Unregister already registered events
2021-01-24 23:19:10 -08:00
bunnei 62766b1326
Merge pull request #5785 from ReinUsesLisp/buffer-dma
video_core/memory_manager: Flush destination buffer on CopyBlock
2021-01-24 22:57:00 -08:00
ReinUsesLisp 34c3ec2f8c Revert "Start of Integer flags implementation"
This reverts #4713. The implementation in that PR is not accurate.
It does not reflect the behavior seen in hardware.
2021-01-25 02:48:03 -03:00
ReinUsesLisp 9dc4a80b17 vk_graphics_pipeline: Fix narrowing conversion on MSVC 2021-01-24 21:41:29 -03:00
LC df0d8c45d2
Merge pull request #5807 from ReinUsesLisp/vc-warnings
video_core: Silence the remaining gcc warnings and enforce them
2021-01-24 17:36:43 -05:00
Rodrigo Locatti b769b1be26
Merge pull request #5363 from ReinUsesLisp/vk-image-usage
vk_texture_cache: Support image store on sRGB images with VkImageViewUsageCreateInfo
2021-01-24 18:44:51 -03:00
bunnei 44c5ea3639
Merge pull request #5151 from comex/xx-vfs
vfs_real: When moving files or directories, don't assume file opening will succeed
2021-01-24 13:42:51 -08:00
ReinUsesLisp 6b00443bc1 vk_texture_cache: Support image store on sRGB images with VkImageViewUsageCreateInfo
Vulkan 1.0 didn't support creating sRGB image views on an ABGR8 VkImage
with storage usage bits. VK_KHR_maintenance2 addressed this allowing to
reduce the usage bits on a VkImageView.

To allow image store on non-sRGB image views when the VkImage is created
with sRGB, always create VkImages without sRGB and add the sRGB format
on the view.
2021-01-24 18:16:43 -03:00
ReinUsesLisp 6a0143400f vulkan_device: Lift VK_EXT_extended_dynamic_state blacklist on RDNA
It seems to be safe to use this on new drivers.
2021-01-24 20:21:11 -03:00
ReinUsesLisp 748551dafb cmake: Enforce -Warray-bounds and -Wmissing-field-initializers globally 2021-01-24 17:31:29 -03:00
bunnei 19c14589d3
Merge pull request #5796 from ReinUsesLisp/vertex-a-bypass-vk
vk_pipeline_cache: Properly bypass VertexA shaders
2021-01-24 11:22:58 -08:00
german a8245cf2f1 Stub Set/Get/Reset SixaxisSensorFusionParameters 2021-01-24 11:28:52 -06:00
Chloe Marcec 2afc1060ef Print Process ID and Thread ID as hex 2021-01-25 02:47:40 +11:00
Chloe Marcec 5882cc0502 hle: Implement remaining services for Stereo Vision
Used by Zelda Breath of the Wild, Super Mario Odyssey and Nintendo Labo
2021-01-25 00:34:01 +11:00
LC 04dcada85f
Merge pull request #5808 from ReinUsesLisp/glslang-quiet
host_shaders/cmake: Pass --quiet to glslang to keep it quiet
2021-01-24 05:01:10 -05:00
Chloe Marcec b2b95e96c1 audout: FlushAudioOutBuffers
Fixes Devil May Cry
2021-01-24 19:13:34 +11:00
ReinUsesLisp f81c783b5b host_shaders/cmake: Pass --quiet to glslang to keep it quiet
Silences noisy builds on toolchains.
2021-01-24 04:55:23 -03:00
ReinUsesLisp cc4335a9c6 video_core/cmake: Enforce -Warray-bounds and -Wmissing-field-initializers 2021-01-24 04:42:41 -03:00
bunnei f7ac4e1eb4
Merge pull request #5806 from bunnei/am-stub
hle: service: am: Stub ILibraryAppletAccessor::PresetLibraryAppletGpuTimeSliceZero.
2021-01-23 23:37:05 -08:00
ReinUsesLisp 1b76e7e890 video_core: Silence -Wmissing-field-initializers warnings 2021-01-24 04:32:19 -03:00
ReinUsesLisp 80a673a27f maxwell_3d: Silence array bounds warnings 2021-01-24 04:31:41 -03:00
ReinUsesLisp ad48259d7e maxwell_to_vk: Silence -Wextra warnings about using different enum types 2021-01-24 04:03:36 -03:00
german 3b4da2d7fa Fix connect and disconnect controller events 2021-01-23 22:59:44 -06:00
comex e9bb95ae16 vfs_real: When moving files or directories, don't assume file opening will succeed
Found this via a warning, but it's a substantive fix.

Since this is only for a cache, it should be safe to silently drop the
entry if opening fails.  I think.
2021-01-23 16:19:29 -05:00
Levi Behunin 9477d23d70
shader_ir: Fix comment typo 2021-01-23 13:16:37 -05:00
Morph 5942d206c2 sdl_impl: Set the maximum vibration duration to 1 second 2021-01-23 08:06:07 -05:00
Chloe Marcec 822edff5bd Simplify condition 2021-01-23 22:12:05 +11:00
Chloe Marcec 3b0458a7a5 nvdrv: Unregister already registered events 2021-01-23 22:02:14 +11:00
LC 65f821850e
Merge pull request #5797 from ReinUsesLisp/nsight-aftermath-build
nsight_aftermath_tracker: Fix build issues when enabled
2021-01-23 05:40:50 -05:00
Chloe Marcec df42100320 Clamp string reads to buffer size 2021-01-23 18:24:57 +11:00
ReinUsesLisp 966896daad video_core/cmake: Properly generate fatal errors on Aftermath
Fix "message(ERROR ..." to "message(FATAL_ERROR ..." to properly stop
cmake when Nsight Aftermath can't be configured.
2021-01-23 04:15:30 -03:00
ReinUsesLisp 625a011888 nsight_aftermath_tracker: Fix build issues when enabled
Fixes a bunch of build errors when Nsight Aftermath is properly enabled.
2021-01-23 04:13:39 -03:00
bunnei 12355cbf02
Merge pull request #5776 from ogniK5377/lbl
lbl: Implement most of lbl
2021-01-22 23:13:23 -08:00
ReinUsesLisp 37ef2ee595 vk_pipeline_cache: Properly bypass VertexA shaders
The VertexA stage is not yet implemented, but Vulkan is adding its
descriptors, causing a discrepancy in the pushed descriptors and the
template. This generally ends up in a driver side crash.

Bypass the VertexA stage for now.
2021-01-23 03:59:59 -03:00
bunnei 302a5f00e8
Merge pull request #4713 from behunin/int-flags
Start of Integer flags implementation
2021-01-22 21:57:14 -08:00
bunnei 981d8e82d2
Merge pull request #5765 from ogniK5377/StoreSaveDataThumbnail-stub
acc: Stub StoreSaveDataThumbnail
2021-01-22 21:51:54 -08:00
ReinUsesLisp bda177ef40 video_core/memory_manager: Add BytesToMapEnd
Track map address sizes in a flat ordered map and add a method to query
the number of bytes until the end of a map in a given address.
2021-01-22 18:31:12 -03:00
bunnei 1e9b1d439f
common: Add missing include to bit_util.h 2021-01-21 15:30:28 -08:00
ReinUsesLisp 436457b6e7 gl_shader_decompiler: Fix constant buffer size calculation
The divide logic was wrong and can cause an uniform buffer size
overflow.
2021-01-21 19:47:41 -03:00
bunnei 2c4c7aea8a
Merge pull request #5781 from lioncash/bits
bit_util: Unify implementations of MostSignificantBit32/MostSignificantBit64
2021-01-21 14:45:40 -08:00
ReinUsesLisp b7febb5625 video_core/memory_manager: Remove unused CopyBlockUnsafe
This function was not being used.
2021-01-21 19:16:06 -03:00
ReinUsesLisp 0e9a6759f9 video_core/memory_manager: Flush destination buffer on CopyBlock
When we copy into a buffer, it might contain data modified from the GPU
on the same pages. Because of this, we have to flush the contents before
writing new data.

An alternative approach would be to write the data in place, but games
can also write data in other ways, invalidating our contents.

Fixes geometry in Zombie Panic in Wonderland DX.
2021-01-21 19:16:06 -03:00
ReinUsesLisp dd790abab0 video_core/memory_manager: Add GPU address based flush method
Allow flushing rasterizer contents based on a GPU address.
2021-01-21 19:16:05 -03:00
Lioncash 6ff2db181f bit_util: Unify implementations of MostSignificantBit32/MostSignificantBit64
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.
2021-01-21 04:07:58 -05:00
bunnei a1335d3d51
Merge pull request #5270 from german77/multiTouch
HID: Add multitouch support
2021-01-20 22:39:01 -08:00
bunnei ffbde909c8
Merge pull request #5361 from ReinUsesLisp/vk-shader-comment
vk_shader_decompiler: Show comments as OpUndef with a type
2021-01-20 21:33:42 -08:00
bunnei f83ef80ebd hle: service: am: Stub ILibraryAppletAccessor::PresetLibraryAppletGpuTimeSliceZero.
- Used by Monster Hunter Rise demo.
2021-01-20 20:35:12 -08:00
ReinUsesLisp 51512d01d8 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.
2021-01-21 00:41:03 -03:00
bunnei d98b0f8f48
Merge pull request #5743 from german77/HandheldFix
Fix player 1 turning on handheld and not updating handheld settings
2021-01-20 17:05:44 -08:00
Chloe Marcec c795207fb2 lbl: Implement most of lbl
Pretty basic service, only thing left to do is handle setting applying once set:sys is implemented
2021-01-21 00:46:03 +11:00
Chloe Marcec 5b8bc56e65 mii: Fix BuildRandomStoreData & Cleanup raw_data
Cleaned up mii raw data to reflect the underlying values instead of just a chunk of bytes.
Fixed BuildRandomStoreData not actually generating random miis properly. "values" should be a u32, not a u8.
2021-01-20 21:53:57 +11:00
Chloe Marcec dc18a1261c Mark DestinationToString as static 2021-01-20 18:42:39 +11:00
Chloe Marcec dca2e2c8f1 Mark LogPacketHeaderEntry hash as noexcept 2021-01-20 18:35:58 +11:00
Chloe Marcec 83f8c1a25e lm: Recode LM service
Rework the service to spit out to logs instead of a seperate file as well as fix any crashes caused by lm.
2021-01-20 18:25:15 +11:00
bunnei 4cd8b2f1f7
Merge pull request #5755 from FearlessTobi/port-5344
Port citra-emu/citra#5344: "game_list: Fix folder reordering"
2021-01-19 10:53:18 -08:00
Chloe Marcec 2d33b2c55a acc: Stub StoreSaveDataThumbnail
Fixes ACA NEOGEO METAL SLUG hanging on boot.
2021-01-19 20:56:18 +11:00
Rodrigo Locatti 2ef4591e58
Merge pull request #5746 from lioncash/sign-compare
texture_cache/util: Resolve -Wsign-compare warning
2021-01-18 03:49:58 -03:00
LC f1b58f0cd9
Merge pull request #5754 from lat9nq/fix-disable-boxcat
configure_service: Only compile FormatEventStatusString when YUZU_ENABLE_BOXCAT is enabled
2021-01-17 23:52:47 -05:00