Commit graph

15960 commits

Author SHA1 Message Date
bunnei
da7e9553de hle: kernel: Migrate more of KThread to KAutoObject. 2021-05-05 16:40:50 -07:00
bunnei
6fca1c82fd hle: kernel: svc: Migrate GetThreadPriority, StartThread, and ExitThread. 2021-05-05 16:40:50 -07:00
bunnei
de4746ff69 hle: kernel: svc: Migrate CreateThread. 2021-05-05 16:40:50 -07:00
bunnei
0eeecde67c hle: kernel: Migrate idle threads. 2021-05-05 16:40:50 -07:00
bunnei
479bd50b96 hle: kernel: Migrate KThread to KAutoObject. 2021-05-05 16:40:50 -07:00
bunnei
d3d0f2f451 hle: kernel: Add initial impl. of slab setup. 2021-05-05 16:40:50 -07:00
bunnei
34bed1ab41 hle: kernel: Refactor out various KThread std::shared_ptr usage. 2021-05-05 16:40:50 -07:00
bunnei
d9df63583f core: Defer CoreTiming initialization. 2021-05-05 16:40:50 -07:00
bunnei
3401676768 core: memory: Add a work-around to allocate and access kernel memory regions by vaddr. 2021-05-05 16:40:50 -07:00
bunnei
02c2b28cd0 common: common_funcs: Add Size helper function. 2021-05-05 16:40:49 -07:00
bunnei
66f2ad716b hle: kernel: Add initial impl. of KLinkedList. 2021-05-05 16:40:49 -07:00
bunnei
74120c5e3a common: bit_util: Add BIT macro. 2021-05-05 16:40:49 -07:00
bunnei
f93d939426 hle: kernel: Add initial impl. of KSlabAllocated. 2021-05-05 16:40:49 -07:00
bunnei
34ce1dd7c7 hle: kernel: Add initial impl. of KAutoObjectWithListContainer. 2021-05-05 16:40:49 -07:00
bunnei
b8751630e2 hle: kernel: Add initial impl. of KAutoObject. 2021-05-05 16:40:49 -07:00
bunnei
d9205f82b3 common: intrusive_red_black_tree: Disable static_assert that will not evaluate as constant on MSVC. 2021-05-05 16:40:49 -07:00
bunnei
b99fc70191 common: common_funcs: Add helper macros for non-copyable and non-moveable.
- Useful for scenarios where we do not want to inherit from NonCopyable.
2021-05-05 16:40:49 -07:00
bunnei
260b841dc3
Merge pull request #6279 from ogniK5377/nvhost-prof
nvdrv: /dev/nvhost-prof-gpu for production
2021-05-05 16:16:13 -07:00
bunnei
0b7a03bd65
Update src/core/hle/service/nvdrv/interface.cpp
Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com>
2021-05-05 16:16:02 -07:00
german77
8c30ed6d09 hid: Improve hardware accuracy of gestures 2021-05-05 10:13:09 -05:00
Lioncash
cc47a6a9c2 service: Remove unused class variables
Prevents some warnings from occurring.
2021-05-05 01:32:28 -04:00
Lioncash
9e726a9250 service: Resolve cases of member field shadowing
Now all that remains is for kernel code to be 'shadow-free' and then
-Wshadow can be turned into an error.
2021-05-04 04:38:38 -04:00
bunnei
df51eb9bde
Merge pull request #6278 from lioncash/misc-shadow
core: Resolve misc straggler cases of variable shadowing
2021-05-03 16:04:28 -07:00
bunnei
898aa5fb66
Merge pull request #6275 from german77/mousefocus
input_common: Release mouse buttons on out of focus
2021-05-03 12:50:19 -07:00
Lioncash
ebb64d5bf4 core: Resolve misc cases of variable shadowing
Resolves shadowing warnings that aren't in a particularly large
subsection of core. Brings us closer to turning -Wshadow into an error.

All that remains now is for cases in the kernel (left untouched for now
since a big change by bunnei is pending), and a few left over in the
service code (will be tackled next).
2021-05-03 01:19:13 -04:00
Chloe Marcec
7d257ce7bd nvdrv: /dev/nvhost-prof-gpu for production
While we're at it, we can fix the is_initialized error code.
This fixes the crashes on Shante
2021-05-03 14:39:03 +10:00
german77
08d5bd36d8 hid: Fix touch not initializing properly if disabled 2021-05-02 21:27:15 -05:00
german77
6e81473574 input_common: Release mouse buttons on out of focus 2021-05-02 19:08:33 -05:00
bunnei
c17a59b58e
Merge pull request #6269 from lioncash/file-shadow
file_sys: Resolve cases of variable shadowing
2021-05-02 15:12:07 -07:00
Morph
0d2d0844a5
Merge pull request #6263 from Kewlan/folder-swap-expand-state
game_list: Fix dir move up/down expand state
2021-05-02 07:43:45 -04:00
bunnei
01a57d4c8d
Merge pull request #6265 from Morph1984/snap-save-fix
service: filesystem: Return proper error codes for CreateFile
2021-05-02 00:45:18 -07:00
Lioncash
1da72c7792 file_sys: Resolve cases of variable shadowing
Brings us closer to enabling -Wshadow as an error in the core code.
2021-05-02 02:59:57 -04:00
bunnei
03b3c5800b
Merge pull request #6261 from Kewlan/game-list-filter-fix
game_list: Update filter results when removing directories
2021-05-01 09:14:10 -07:00
Morph
72b22fd433 service: filesystem: Return proper error codes for CreateFile
This improves the accuracy of CreateFile by returning the correct error codes on certain conditions (parent directory does not exist, path already exists).

This fixes saving and the loading of existing saves in New Pokemon Snap
2021-05-01 09:33:00 -04:00
german77
1ed1dd3c89 Disable touch if setting is not enabled 2021-04-30 19:28:21 -05:00
bunnei
fa3ffff8de
Merge pull request #6257 from Morph1984/fix-use-after-free-webapplet
applets/web: Fix a use-after-free when passing in the URL string
2021-04-30 14:48:32 -07:00
bunnei
aab57b7975
Merge pull request #6243 from german77/GCresetOrigin
input_common: Reset GC sticks center by measuring multiple packets
2021-04-30 12:02:05 -07:00
Kewlan
497ccfaedc game_list: Fix dir move up/down expand state 2021-04-30 12:18:38 +02:00
bunnei
922b0d9933
Merge pull request #6226 from german77/sevensix
hid: Implement SevenSixAxis and ConsoleSixAxisSensor
2021-04-29 22:06:57 -07:00
Kewlan
fc84822266 game_list: Update filter results when removing directories 2021-04-30 00:05:23 +02:00
Morph
29a06ad393 yuzu: config: Silence narrowing conversion warning on MSVC 2021-04-28 22:42:56 -04:00
Morph
0af182baa2 applets/web: Fix a use-after-free when passing in the URL string
The URL string was being deleted before being used, leading to a use-after-free occurring when it is used afterwards.

Fix this by taking the string by const ref to extend its lifetime, ensuring it doesn't get deleted before use.
2021-04-28 12:34:28 -04:00
Morph
d95605cd24 yuzu: main: Silence type conversion warning on MSVC 2021-04-28 12:22:41 -04:00
Lioncash
724c19a307 loader: Resolve instances of variable shadowing
Eliminates variable shadowing cases across all the loaders to bring us
closer to enabling variable shadowing as an error in core.
2021-04-27 12:48:15 -04:00
german77
cfdec68d5a address comments 2021-04-26 22:07:16 -05:00
german77
729545a946 input_common: Reset GC sticks center by measuring multiple packets 2021-04-26 18:34:00 -05:00
bunnei
cd80471c90
Merge pull request #6246 from lioncash/shadow
service: Eliminate cases of member variable shadowing
2021-04-26 16:19:49 -07:00
bunnei
dec5680934
Merge pull request #6236 from Morph1984/swkbd-button-hint-scaling
applets/swkbd: Fix software keyboard button hint scaling
2021-04-26 14:40:37 -07:00
A-w-x
6a2084a204 gl_device: Intel: Disable texture view formats workaround on mesa 2021-04-26 18:14:10 +02:00
Lioncash
dcb91ca4a4 service: Eliminate cases of member shadowing
Resolves a few localized instances of member variable shadowing. Brings
us a little closer to turning shadowing warnings into errors.
2021-04-26 09:39:49 -04:00
bunnei
7412f314e4
Merge pull request #6198 from Kewlan/favorite-games
game_list: Mark games as favorite to make them appear at the top.
2021-04-25 23:33:44 -07:00
bunnei
3c5fb53634
Merge pull request #6237 from ameerj/nvdec-end-fix
nvhost_vic: Fix device closure
2021-04-25 23:05:58 -07:00
Morph
3b5690c9e1 config: Add new keyboard bindings
Changes the keyboard bindings to be based on RPCS3's tried and true keyboard bindings.
2021-04-25 07:26:57 -04:00
ameerj
ae758a236f vk_texture_cache: Swap R and B channels of color flipped format
Swaps the Red and Blue channels of the A1B5G5R5_UNORM texture format, which was being incorrectly rendered.
2021-04-24 23:59:42 -04:00
ameerj
75e0d16caa nvhost_vic: Fix device closure
Implements the OnClose method of the nvhost_vic device, and removes the remnants of an older implementation.

Also cleans up some of the surrounding code.
2021-04-24 19:22:09 -04:00
Its-Rei
c413cafdac applets/swkbd: Fix software keyboard button hint scaling
Fixes the scaling of the button hints using background images. Now they scale like the rest of the elements.
2021-04-24 13:47:33 -04:00
Mat M
4c8c5ad1b6
Merge pull request #6234 from Morph1984/stub-am
ICommonStateGetter: Stub SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled
2021-04-24 12:37:34 -04:00
Mat M
98fb36cb0a
Merge pull request #6235 from german77/ectx_aw
glue: Add ectx:aw service placeholder
2021-04-24 12:37:12 -04:00
german77
a02c4686c3 glue: Add ectx:aw placeholder 2021-04-24 10:50:25 -05:00
bunnei
1acd807176
Merge pull request #6230 from Morph1984/default-resource-size
program_metadata: Set a default resource size when a NPDM is not present
2021-04-24 02:55:20 -07:00
bunnei
f4610e77e2
Merge pull request #6227 from lioncash/meta
program_metadata: Explicitly specify copy/move operators/functions
2021-04-23 23:12:44 -07:00
german77
c19ad21ae8 hid: Implement SevenSixAxis and ConsoleSixAxisSensor 2021-04-23 22:12:41 -05:00
Morph
04d9c27120 ICommonStateGetter: Stub SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled
- Used by Pixel Game Maker Series Werewolf Princess Kaguya
2021-04-23 23:04:22 -04:00
bunnei
4cc8ab8a86
Merge pull request #6228 from lioncash/semi
lm: Resolve -Wextra-semi warning
2021-04-23 19:59:20 -07:00
bunnei
2e268abe42
Merge pull request #6229 from lioncash/unused-var
acc/lbl: Remove unused variables
2021-04-23 15:48:47 -07:00
bunnei
51c787bfc1
Merge pull request #6231 from lioncash/aes
aes_util: Make use of std::span
2021-04-23 11:37:17 -07:00
Morph
1c65b3ee53 program_metadata: Set a default resource size when a NPDM is not present
Sets a default size of 0x1FE00000 bytes (510 MiB) for the system_resource_size when a NPDM is not present.
2021-04-23 12:47:31 -04:00
bunnei
19bbdedf00
Merge pull request #6232 from lioncash/alias2
emu_window: unsigned -> u32
2021-04-23 09:26:56 -07:00
Lioncash
d363b2c7d2 emu_window: Return pair from ClipToTouchScreen() instead of tuple
This is only a 2-tuple, so it can be converted over to the std::pair
class.
2021-04-23 11:21:02 -04:00
Lioncash
8805233f5e emu_window: unsigned -> u32
This is more concise and consistent with the rest of the codebase.
2021-04-23 11:19:32 -04:00
Lioncash
9c5248d101 aes_util: Make use of std::span
Allows us to simplify the interface quite a bit as it will handle
contiguous sequences for us.
2021-04-23 09:58:41 -04:00
Lioncash
502f3cef87 acc/lbl: Remove unused variables 2021-04-23 09:39:56 -04:00
Lioncash
29cd40bded lm: Make use of insert_or_assign() in Log()
Avoids unnecessary default construction of an entry in cases where no
entry exists before overwriting the created entry.
2021-04-23 09:27:18 -04:00
Lioncash
5ba49f188b lm: Prevent redundant map lookups in Log()
We can perform the lookup and then do the contains check by checking the
end iterator. The benefit of this is that if we *do* find an entry, then
we aren't hashing into the map again to find it.

We can also get rid of an unused std::vector temporary while we're at
it.
2021-04-23 09:24:21 -04:00
Lioncash
6e2040c955 lm: Resolve -Wextra-semi warning
Resolves a trivial warning with clang.
2021-04-23 09:20:54 -04:00
Lioncash
ae93402312 program_metadata: Explicitly specify copy/move functions
The generation of the copy assignment operators are deprecated on being
generated when a user-provided destructor is present.

We can explicitly specify that we desire this behavior to keep the class
forward compatible with future standards.
2021-04-23 09:16:17 -04:00
ameerj
5568fcfec1 yuzu_cmd: Remove unused resource.h 2021-04-22 22:25:49 -04:00
Morph
86278f5db2 service: hid: Get transfer memory for InitializeSevenSixAxisSensor 2021-04-22 05:50:46 -04:00
bunnei
f0c2190ceb
Merge pull request #6214 from Morph1984/time-fix-kirby-clash
time: Fix GetClockSnapshotFromSystemClockContext
2021-04-21 11:17:58 -07:00
bunnei
4cd6c3e6f1
Merge pull request #6219 from lioncash/log-erase
log/backend: Make use of erase_if
2021-04-20 16:07:00 -07:00
bunnei
8cdd86fa25
Merge pull request #6218 from lioncash/tcache
texture_cache/util: Fix src being used instead of dst within DeduceBlitImages case
2021-04-20 11:56:40 -07:00
bunnei
7083c5bfc8
Merge pull request #6207 from lat9nq/sdl-2.0.14
cmake: Use SDL 2.0.14 and fix scope issue
2021-04-20 10:19:03 -07:00
Lioncash
6125590a7b log/backend: Use in-class initializer for FileBackend
We can also avoid redundant constructions of the same string repeatedly.
2021-04-20 12:57:49 -04:00
Lioncash
aaaca1cd6d log/backend: Make use of erase_if
Same behavior, but less verbose.
2021-04-20 12:53:05 -04:00
bunnei
17704271f4
Merge pull request #6217 from Morph1984/consistent-writebuffers
general: Write buffers before pushing raw arguments
2021-04-19 20:54:25 -07:00
bunnei
e5e9bee1cc
Merge pull request #6215 from lioncash/duplicate
npad: Remove duplicated class member variable
2021-04-19 18:12:48 -07:00
Lioncash
17b7f0389a texture_cache/util: Fix src being used instead of dst within DeduceBlitImages
This line can only ever be reached if src is null, so dereferencing it
here is a logic bug that slipped through.

Instead, we dereference dst instead which is guaranteed to be valid.
2021-04-19 13:01:50 -04:00
Morph
27eeb20001 general: Write buffers before pushing raw arguments
For consistency with the rest of the service implementations
2021-04-19 12:45:50 -04:00
Lioncash
9f39f7c041 arp: Use type alias for issue function
Reduces some verbosity and centralizes the function details in one spot.
2021-04-19 12:36:10 -04:00
Lioncash
b7d04d848d arp: Prevent uninitialized read of launch member variable
If anything happened to call arp functions in the wrong order and called
IRegistrar's Issue function before SetApplicationLaunchProperty, we'd
read from an uninitialized ApplicationLaunchProperty instance.

Instead, we can always initialize it so if this does happen, then the
outcome of doing such a thing is at least consistently reproducible.
2021-04-19 12:30:34 -04:00
Lioncash
39497183a6 npad: Remove duplicated class member variable
ControllerBase already has a System reference that can be accessed from
this class, so we can get rid of this to make the class layout a little
more straightforward.
2021-04-19 12:23:28 -04:00
Morph
8285776603 time: Write buffer before pushing RESULT_SUCCESS in GetClockSnapshot 2021-04-19 12:09:28 -04:00
Morph
a223006c50 time: Fix GetClockSnapshotFromSystemClockContext
This removes an incorrect alignment usage and corrects the positions of the popped parameters.

- Fixes Super Kirby Clash crashing on boot
2021-04-19 11:17:47 -04:00
lat9nq
f973274b99 general: Ignore implicit-fallthrough for SDL.h
SDL 2.0.14 introduces an incompatibility with Clang, causing it to
trigger -Wimplicit-fallthrough even though it is marked. Ignore it for
now, with a comment mentioning why this is needed.
2021-04-18 01:31:26 -04:00
lat9nq
de69a5266f cmake: Use SDL 2.0.14 and fix CMake scope issue
Forces using SDL 2.0.14. Upgrades the SDL external to that version. Adds
a message when switching to the external.

Fixes an error where input_common only links to SDL when SDL2_FOUND is
set, but externals/CMakeLists cannot set that variable to the required
scope. Switch to using ENABLE_SDL2, which we can use since we now
include the SDL source.
2021-04-17 23:42:57 -04:00
Morph
51ca93981d applets: Send focus state change message on applet state change
Fixes the softlock after the controller applet exits in Mario Kart 8 Deluxe.
2021-04-17 09:26:48 -04:00
Morph
ba2c917842 applets: Make the applet mode a protected property of Applet 2021-04-17 08:50:49 -04:00
bunnei
9ad77ba6d3
Merge pull request #6125 from ogniK5377/nvdec-close-dev
nvdrv: Cleanup CDMA Processor on device closure
2021-04-16 23:14:44 -07:00
bunnei
d5c1f3929c
Merge pull request #6133 from Morph1984/project-eleuthia
Project Eleuthia - On-Screen Keyboard and Error Applet Overlays
2021-04-16 23:03:23 -07:00
bunnei
0a5bc8ec14
Merge pull request #6119 from german77/SDLMapping
InputCommon: Address mapping and naming issues with SDL2
2021-04-15 21:40:35 -07:00
Chloe Marcec
edb1d5d242 Address issues 2021-04-16 13:52:32 +10:00
Morph
7eff91ff20 applets/swkbd: Implement the Qt Software Keyboard frontend
The Qt Software Keyboard frontend attempts to mimic the software keyboard rendered by the Nintendo Switch.
This frontend implements multiple keyboard types, such as the normal software keyboard, the numeric pad software keyboard and the inline software keyboard.
Keyboard and controller input is also supported in this frontend.
Keyboard input is handled as native keyboard input, and so the on-screen keyboard cannot be navigated with the keyboard arrow keys as the arrow keys are used to move the text cursor.
Controller input is translated into mouse hover movements on the onscreen keyboard or their respective button actions (B for backspace, A for entering the selected button, L/R for moving the text cursor, etc).
The text check dialogs can also be confirmed with controller input through the use of the OverlayDialog

Massive thanks to Rei for creating all the UI for the various keyboards and OverlayDialog. This would not have been possible without his excellent work.

Co-authored-by: Its-Rei <kupfel@gmail.com>
2021-04-15 01:53:17 -04:00
Morph
b45930a0ed error: Make the error code as the title text of the OverlayDialog
Co-authored-by: Its-Rei <kupfel@gmail.com>
2021-04-15 01:53:17 -04:00
Morph
4143675b2d overlay_dialog: Add an overlay text dialog that accepts controller input
An OverlayDialog is an interactive dialog that accepts controller input (while a game is running)
This dialog attempts to replicate the look and feel of the Nintendo Switch's overlay dialogs and
provide some extra features such as embedding HTML/Rich Text content in a QTextBrowser.
The OverlayDialog provides 2 modes: one to embed regular text into a QLabel and another to embed
HTML/Rich Text content into a QTextBrowser.

Co-authored-by: Its-Rei <kupfel@gmail.com>
2021-04-15 01:53:17 -04:00
Morph
4a5f9f5a6d main: Move meta type registration into its own function
Moves the existing meta type registration into its own function and adds registration of common integral, floating point and string types.
This function is also now called in the constructor of the GMainWindow instead of on starting a game.
2021-04-15 01:53:17 -04:00
Morph
aa3adf6c3f input_interpreter: Fix button hold being interpreted incorrectly on init
We reset all the button states to 0 except the first index (which has all the buttons as pressed) to prevent a button hold being interpreted as a button that was pressed once on the first poll.
2021-04-15 01:53:17 -04:00
Morph
578e6c5a57 applets/swkbd: Implement the Default Software Keyboard frontend 2021-04-15 01:53:17 -04:00
Morph
5bc9f15c6d applets/swkbd: Implement the Normal and Inline Software Keyboard Applet 2021-04-15 01:53:17 -04:00
Morph
a8c09cd5e4 ILibraryAppletCreator: Implement CreateHandleStorage
Used by Monster Hunter Generations Ultimate
2021-04-15 01:53:16 -04:00
Morph
e3e6a11ab8 hle_ipc: Add helper functions to get copy/move handles 2021-04-15 01:53:16 -04:00
Morph
0a40106cf1 ILibraryAppletAccessor: Demote from ERROR to DEBUG for null storage logs
Avoids unnecessary console spam when the inline software keyboard is used.
2021-04-15 01:53:16 -04:00
Morph
d1e40dd244 applets: Pass in the LibraryAppletMode each applet's constructor 2021-04-15 01:53:16 -04:00
Morph
0f40c8c634 applets: Remove the previous software keyboard applet implementation 2021-04-15 01:53:16 -04:00
Kewlan
fd40d55a4f game_list: Mark games as favorite to make them appear at the top.
Icons are from Icons8.
2021-04-15 07:15:42 +02:00
bunnei
60511976bb
Merge pull request #6199 from lioncash/log-ns
common/log: Move Log namespace into the Common namespace
2021-04-14 21:29:44 -07:00
Lioncash
2a341c9969 log/backend: Correct order of const in copy constructor
Follows our predominant coding style. Also explicitly specifies the move
constructor/assignment operator as well.
2021-04-14 23:11:01 -04:00
Lioncash
64606aefcf common/log: Move Log namespace into the Common namespace
Forgot to move this over when I moved the rest of the source files with
lacking namespaces over.
2021-04-14 23:10:58 -04:00
bunnei
de5bf640b7
Merge pull request #6196 from bunnei/asserts-setting
core: settings: Add setting for debug assertions and disable by default.
2021-04-14 17:47:18 -07:00
bunnei
a4c6712a4b common: Move settings to common from core.
- Removes a dependency on core and input_common from common.
2021-04-14 16:24:03 -07:00
bunnei
c6c0771b12 core: settings: Add setting for debug assertions and disable by default.
- 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.
2021-04-14 16:24:02 -07:00
bunnei
eedbe8351c
Merge pull request #6197 from ameerj/kreslimit-cleanup
k_resource_limit: Cleanup of member variables/headers
2021-04-14 14:25:51 -07:00
bunnei
62a8505345
Merge pull request #6195 from Morph1984/controller-applet-motion
applets/controller: Hook up the "Motion" button functionality
2021-04-13 21:53:34 -07:00
ameerj
2067115c78 k_resource_limit: Minor cleanup of member variables/headers 2021-04-14 00:40:33 -04:00
bunnei
bb922d6ff6
Merge pull request #6185 from ameerj/process-reslimit
kernel/process: Replace process resource limit instance with the kernel's resource limit
2021-04-13 21:08:59 -07:00
bunnei
8146c8c5e7
Merge pull request #6191 from lioncash/vdtor
engine_interface: Add missing virtual destructor
2021-04-13 19:59:10 -07:00
bunnei
12a343ed8d
Merge pull request #6190 from lioncash/constfn2
vk_master_semaphore: Add missing const qualifier for IsFree()
2021-04-13 17:52:38 -07:00
bunnei
62b560e8e3
Merge pull request #6188 from lioncash/bits
vk_texture_cache: Make use of bit_cast where applicable
2021-04-13 16:44:49 -07:00
bunnei
154eb3cfbe
Merge pull request #6187 from lioncash/sign-conv
texure_cache/util: Resolve implicit sign conversions with std::reduce
2021-04-13 09:46:32 -07:00
Morph
10ca4c9490 applets/controller: Hook up the "Motion" button functionality
I forgot to hook this up during the development of the controller applet, this PR amends that.
2021-04-13 10:05:07 -04:00
bunnei
335a3cc115
Merge pull request #6186 from lioncash/cache-erase
query_cache: Make use of std::erase_if
2021-04-12 17:52:34 -07:00
Lioncash
ff6a83e0fe nvidia_flags: Add missing header guard
Prevents potential inclusion compilation errors.
2021-04-12 19:18:48 -04:00
ameerj
5e85bc3d23 kernel/process: Replace process resource limit instance with the kernel's resource limit
This commit addresses the inaccurate behavior of kernel processes creating their own resource limit, rather than utilizing the kernel's system-wide resource limit instance.
2021-04-12 16:14:19 -04:00
Lioncash
0fb3773924 k_thread: Remove [[nodiscard]] attribute from ClearWaitCancelled()
This function has a void return value, so this attribute doesn't apply
to it.
2021-04-12 10:17:38 -04:00
Lioncash
31932904c5 engine_interface: Add missing virtual destructor
Eliminates a potential bug vector related to inheritance. Plus, we
should generally be specifying the destructor as virtual within purely
virtual interfaces to begin with.
2021-04-12 09:53:55 -04:00
Lioncash
9b331a5fb5 vk_master_semaphore: Deduplicate atomic access within IsFree()
We can just reuse the already existing KnownGpuTick() to deduplicate the
access.
2021-04-12 09:41:55 -04:00
Lioncash
c5f5d6e7f6 vk_master_semaphore: Add missing const qualifier for IsFree()
This member function doesn't modify class state.
2021-04-12 09:41:23 -04:00
Lioncash
4198c92ed0 vk_texture_cache: Make use of Common::BitCast where applicable
Also clarify the TODO comment a little more on the lacking
implementations for std::bit_cast.
2021-04-12 09:17:36 -04:00
Lioncash
fddb278aa3 texure_cache/util: Resolve implicit sign conversions with std::reduce
Amends implicit sign conversions occurring with usages of std::reduce
and also relocates it to its own utility function to reduce verbosity a
little bit.
2021-04-12 05:21:53 -04:00
Lioncash
4209588505 query_cache: Make use of std::erase_if
Same behavior, but much more straightforward to read.
2021-04-12 04:51:18 -04:00
bunnei
26d60014d0
Merge pull request #6135 from Morph1984/borderless-windowed-fullscreen
configure_graphics: Add Borderless Windowed fullscreen mode
2021-04-11 21:23:59 -07:00
Rodrigo Locatti
ddbd1387aa
Merge pull request #6181 from Joshua-Ashton/robustness_features
vulkan_device: Enable EXT_robustness2 features
2021-04-11 20:42:14 -03:00
Rodrigo Locatti
9f1cf99ea0
Merge pull request #6182 from Joshua-Ashton/null-offset
vk_buffer_cache: Fix offset for NULL vertex buffers
2021-04-11 20:41:48 -03:00
bunnei
0c19147e09
Merge pull request #6170 from Morph1984/more-time-fixes
service: time: Setup the network clock with the local clock context
2021-04-11 10:50:08 -07:00
Joshua Ashton
0ec6cb942d
vk_buffer_cache: Fix offset for NULL vertex buffers
The Vulkan spec states:
If an element of pBuffers is VK_NULL_HANDLE, then the corresponding element of pOffsets must be zero.

https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdBindVertexBuffers2EXT.html#VUID-vkCmdBindVertexBuffers2EXT-pBuffers-04112
2021-04-11 10:34:52 +01:00
Joshua Ashton
08337a492d
vulkan_device: Enable EXT_robustness2 features
When this was being made mandatory, these enablement of these features was removed, but this is still needed.

Fixes: 757fd1e917 ("vulkan_device: Require VK_EXT_robustness2")
2021-04-11 09:48:38 +01:00
Joshua Ashton
bcf58c8210
renderer_vulkan: Check return value of AcquireNextImage
We can get into a really bad state by ignoring this
leading to device loss and using incorrect resources.
2021-04-11 09:27:50 +01:00
bunnei
4f60818eae
Merge pull request #6167 from Morph1984/time-fix
service: time: Fix CalculateStandardUserSystemClockDifferenceByUser
2021-04-10 22:11:53 -07:00
bunnei
290b452ea1
Merge pull request #6112 from ogniK5377/pctl
pctl: Rework how pctl works to be more accurate
2021-04-10 21:09:54 -07:00
bunnei
1063e0be48
Merge pull request #6172 from degasus/cmake_opus
externals: Search for shared opus installation.
2021-04-10 02:27:02 -07:00
bunnei
b04877dd95
Merge pull request #6099 from bunnei/derive-mem
Kernel Rework: Derive memory regions from board layout.
2021-04-10 00:02:52 -07:00
bunnei
31c80b8c6f
Merge pull request #6171 from german77/services
service: Update service function tables and use proper names
2021-04-09 22:47:34 -07:00
bunnei
c6d2af16b5
Merge pull request #6156 from lioncash/lock-discard
kernel: Mark lock helper classes as [[nodiscard]]
2021-04-09 21:42:26 -07:00
bunnei
9cf8bcc75c
Merge pull request #6113 from german77/playhistory
Friend: Stub GetPlayHistoryRegistrationKey
2021-04-09 20:50:13 -07:00
bunnei
96d07b4949
Merge pull request #6158 from german77/hidServiceTables
hid: Update service function tables
2021-04-09 16:10:06 -07:00
bunnei
d6e5e053a6
Merge pull request #6162 from degasus/no_spin_loops
video_core: Avoid spin loops.
2021-04-09 11:52:18 -07:00
Morph
9c85bcbecc ns: Update to 12.x 2021-04-09 00:49:47 -04:00
Morph
467ef54e2a aoc_u: Update to 12.x 2021-04-09 00:49:47 -04:00
Morph
8a9e834fc2 nim: Update to 12.x 2021-04-09 00:49:47 -04:00
Morph
e0bddf8f07 npns: Update to 12.x 2021-04-09 00:49:47 -04:00
Morph
5ce0e127da bgtc: Update to 12.x and implement OpenTaskService 2021-04-09 00:49:47 -04:00
Morph
6af7bd02b2 vi: Update to 12.x 2021-04-09 00:49:47 -04:00
Morph
7e62452ac8 erpt: Update to 12.x 2021-04-09 00:49:46 -04:00
Morph
5ec2fdceca btm: Update to 12.x 2021-04-09 00:49:46 -04:00
Morph
214ef2dd8a btdrv: Update to 12.x 2021-04-09 00:49:46 -04:00
bunnei
c1017efb4a
Merge pull request #6168 from Morph1984/stub-SetNpadAnalogStickUseCenterClamp
service: hid: Stub SetAnalogStickUseCenterClamp
2021-04-08 21:16:47 -07:00
german77
09a8e08109 wlan: Update to 12.x 2021-04-08 19:40:25 -06:00
german77
ac14ef70b5 usb: Use proper names 2021-04-08 19:40:25 -06:00
german77
35abd560c4 ITimeZoneService: Update to 12.x 2021-04-08 19:40:25 -06:00
german77
e7530b341e spl: Update to 12.x 2021-04-08 19:40:25 -06:00
german77
01928b1d17 sfdnsres: Use proper names 2021-04-08 19:40:25 -06:00
german77
ff1201210c nsd: Update to 12.x 2021-04-08 19:40:25 -06:00
german77
f90041a2d4 ethc: Update to 12.x 2021-04-08 19:40:25 -06:00
german77
6c81332ca7 sm: Use proper names, update to 12.x 2021-04-08 19:40:25 -06:00
german77
7133bfdd2c set_sys: Update to 12.x 2021-04-08 19:40:25 -06:00
german77
556c5df745 pctl_module: Update to 12.x 2021-04-08 19:40:25 -06:00
german77
4530b58eb0 pcie: Use proper names 2021-04-08 19:40:25 -06:00
german77
53f1560a24 olsc: Update to 12.x 2021-04-08 19:40:25 -06:00
german77
c37b8a1028 pl_u: Update to 12.x 2021-04-08 19:40:25 -06:00
german77
278c38aa4a ldr: Use proper names 2021-04-08 19:40:25 -06:00
german77
a4e2821530 arp: Use proper names, update to 12.x 2021-04-08 19:40:25 -06:00
german77
a83f0f7154 caps_u: Update to 12.x 2021-04-08 19:40:25 -06:00
german77
dbc4c8e314 caps_a: Update to 12.x 2021-04-08 19:40:24 -06:00
german77
03790771a6 bpc: Use proper names 2021-04-08 19:40:24 -06:00
german77
0377618288 bcat_module: Update to 12.x 2021-04-08 19:40:24 -06:00
german77
247b1c14d2 codecctl: Use proper names 2021-04-08 19:40:24 -06:00
german77
ec0e644fb0 audren_u: Use proper names 2021-04-08 19:40:24 -06:00
german77
8f1300cd31 audren_a: Use proper names 2021-04-08 19:40:24 -06:00
german77
6219da627b audrec_u: Use proper names, update to 12.x 2021-04-08 19:40:24 -06:00
german77
5ce97bf0a0 audrec_a: Use proper names 2021-04-08 19:40:24 -06:00
german77
b059db74c5 audout_u: Use proper names 2021-04-08 19:40:24 -06:00
german77
c51d9e0b0a audout_a: Use proper names 2021-04-08 19:40:24 -06:00
german77
d7f2078e7b audin_u: Use proper names 2021-04-08 19:40:24 -06:00
german77
b6bbc0d483 audin_a: Use proper names 2021-04-08 19:40:24 -06:00
bunnei
701b6c2fb8
Merge pull request #6155 from ameerj/kernel-12-rescnt
kernel: Increase event and session counts
2021-04-08 18:21:00 -07:00
bunnei
d894818bb3
Merge pull request #6157 from Morph1984/am-update-12.x
service: am: Update service function tables
2021-04-08 16:37:59 -07:00
bunnei
1744fa6ecf
Merge pull request #6062 from ameerj/auto-stub
service: Add a toggle for auto stub fallback
2021-04-08 15:32:41 -07:00
Markus Wick
5096ed5e0a externals: Search for shared opus installation.
We had used conan for opus before, but there was a bug in the AVX detection.
However we still had the Findopus.cmake file within the repository, but not used.

This patch reenables the Findopus helper and prefer the system wide installation of opus.
2021-04-08 23:49:32 +02:00
bunnei
dfac2e2d25
Merge pull request #6145 from lat9nq/nvhost_empty_memcpy
nvhost_nvdec_common: Avoid memcpy with null pointers
2021-04-08 13:23:05 -07:00
Morph
2283fccc1b service: time: Setup the network clock with the local clock context
Setting the network time allows some time based events using the network clock to not reset.
2021-04-08 13:26:38 -04:00
bunnei
415dfb6cd3
Merge pull request #6154 from lioncash/svcrange2
svc: Expand SVC tables
2021-04-08 09:21:55 -07:00
Morph
8e545deab9 service: hid: Stub SetAnalogStickUseCenterClamp
- Used by eBASEBALLパワフルプロ野球2020
2021-04-08 03:41:06 -04:00
bunnei
15a07f0282
Merge pull request #6160 from Morph1984/fs-update-12.x
service: fs: Update service function tables
2021-04-07 20:54:42 -07:00
Morph
28d3661a5c service: time: Fix CalculateStandardUserSystemClockDifferenceByUser
CalculateStandardUserSystemClockDifferenceByUser passes in the ClockSnapshots through 2 input buffers and not as raw arguments. Fix this by reading the 2 input buffers instead of popping raw arguments.
2021-04-07 23:34:14 -04:00
bunnei
262a70223f
Merge pull request #6143 from lat9nq/nvhost_null_memcpy
nvhost_ctrl_gpu: Avoid sending null pointer to memcpy
2021-04-07 16:50:22 -07:00
bunnei
535e50db1c
Merge pull request #6159 from Morph1984/acc-update-12.x
service: acc: Update service function tables
2021-04-07 14:37:59 -07:00
Markus Wick
e8bd9aed8b video_core: Use a CV for blocking commands.
There is no need for a busy loop here. Let's just use a condition variable to save some power.
2021-04-07 22:38:52 +02:00
Markus Wick
e6fb49fa4b video_core/gpu_thread: Keep the write lock for allocating the fence.
Else the fence might get submited out-of-order into the queue, which makes testing them pointless.
Overhead should be tiny as the mutex is just moved from the queue to the writing code.
2021-04-07 22:38:52 +02:00
Markus Wick
5145133a60 video_core/gpu_thread: Implement a ShutDown method.
This was implicitly done by `is_powered_on = false`, however the explicit method allows us to block until the GPU is actually gone.

This should fix a race condition while removing the other subsystems while the GPU is still active.
2021-04-07 22:38:52 +02:00
Markus Wick
4aec060f6d common/threadsafe_queue: Provide Wait() method.
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.
2021-04-07 22:38:52 +02:00
bunnei
3173a53db9
Merge pull request #6130 from degasus/better_assert_handling
common: Move assert failure handling into a cpp file.
2021-04-07 13:35:41 -07:00
bunnei
d490f6dcf8
Merge pull request #6153 from lioncash/svcrange
process_capability: Handle extended SVC range
2021-04-07 13:01:40 -07:00
Morph
a2d40b8185 hwopus: Update to 12.x 2021-04-07 02:57:39 -04:00
Morph
1ad4c98a5c IFile: Update to 12.x 2021-04-07 02:49:19 -04:00
Morph
c44db90ad1 fsp-srv: Update to 12.x 2021-04-07 02:46:29 -04:00
Morph
531e797795 dauth_o: Update to 11.x 2021-04-07 02:15:55 -04:00
Morph
ded420cfeb acc_u1: Update to 12.x 2021-04-07 02:15:55 -04:00
Morph
63caeca6ba acc_su: Update to 12.x 2021-04-07 02:15:55 -04:00
german77
4fe05d7b42 hid: Update service function tables 2021-04-07 01:15:38 -05:00
Morph
63ebf2a328 ISelfController: Update to 11.x 2021-04-07 02:00:19 -04:00
Morph
d04120169d IApplicationFunctions: Update to 11.x 2021-04-07 01:59:35 -04:00
Morph
ad0d5818a6 IDebugFunctions: Update to 12.x 2021-04-07 01:53:04 -04:00
Morph
49ec5784b0 ICommonStateGetter: Update to 12.x 2021-04-07 01:53:04 -04:00
Morph
4cdc701fd3 IGlobalStateController: Update to 12.x 2021-04-07 01:53:04 -04:00
Morph
95fa89da27 IHomeMenuFunctions: Update to 12.x 2021-04-07 01:53:04 -04:00
Lioncash
530a5a1d09 Amend bizarre clang-format suggestions 2021-04-07 01:52:08 -04:00
Lioncash
1e964604bb k_scoped_scheduler_lock_and_sleep: Mark class as [[nodiscard]]
Prevents logic bugs from slipping through.
2021-04-07 01:45:04 -04:00
Lioncash
c018769016 k_scoped_lock: delete copy and move assignment operators
If we delete the copy and move constructor, we should also be deleting
the copy and move assignment operators (and even if this were intended,
it would be pretty odd to not document why it's done this way).
2021-04-07 01:25:57 -04:00
Lioncash
bc30aa8249 k_scoped_lock: Mark class as [[nodiscard]]
Prevents logic bugs of the kind described in the previous commit from
slipping through.
2021-04-07 01:23:08 -04:00
Lioncash
97e2604575 k_scheduler: Mark KScopedSchedulerLock as [[nodiscard]]
Prevents logic bugs like:

KScopedSchedulerLock{kernel};

instead of:

KScopedSchedulerLock lk{kernel};

from slipping through.
2021-04-07 01:19:29 -04:00
ameerj
24900674b7 kernel: Increase event and session counts
12.x increased the number of available sessions and event resource counts
2021-04-07 01:01:05 -04:00
bunnei
068b2ffbcc
Merge pull request #6146 from lat9nq/vp9_empty_memcpy
vp9: Avoid memcpy with null pointers
2021-04-06 21:57:43 -07:00
Lioncash
55fc808d64 svc: Expand SVC tables
12.x expanded the range of SVC entries from 0x7F to 0xBF (with all new
entries being unused), so we can expand it to also match.
2021-04-07 00:55:33 -04:00
Lioncash
03dda80e2b process_capability: Handle extended SVC range
12.x extended the range of SVC IDs, so we need to expand the range of
bits that need to be tested.

The upside of this is that we can eliminate a range check, given the
whole range is used.
2021-04-07 00:35:49 -04:00
Morph
8ce31f1c8e config: Default to exclusive fullscreen mode on platforms other than Windows
Several issues have been reported with the borderless windowed fullscreen mode on *nix platforms. Default to exclusive fullscreen mode on these platforms for now.
2021-04-06 05:58:57 -04:00
Morph
01ea0f3c74 configure_graphics: Add Borderless Windowed fullscreen mode
The borderless windowed fullscreen mode solves several issues with the presentation of the overlay dialogs and on-screen keyboard in exclusive fullscreen mode, and also has other benefits such as smoother gameplay, lower latency and a significant reduction in screen tearing.

Co-authored-by: Its-Rei <kupfel@gmail.com>
2021-04-06 05:58:57 -04:00
lat9nq
2cc42e40c5 nvhost_nvdec_common: Avoid memcpy with null pointers
Avoid sending null pointer to memcpy as reported by Undefined Behavious
Sanitizer.

Co-authored-by: LC <mathew1800@gmail.com>
2021-04-05 16:40:03 -04:00
lat9nq
638c892edf nvhost_ctrl_gpu: Avoid sending null pointer to memcpy
Undefined Behaviour Sanitizer reports a null pointer is being sent to
memcpy, thought it's "guaranteed to never be null". Guard it with an if
statement, and log when the action has been averted.
2021-04-05 00:49:09 -04:00
lat9nq
a60653dcd3 vp9: Avoid memcpy with null pointers
Avoid sending null pointer to memcpy as reported by Undefined Behaviour
Sanitizer. Replaces the std::memcpy calls in SpliceVectors with
std::copy calls. Opting to replace all the memcpy's with copy's.

Co-authored-by: LC <mathew1800@gmail.com>
2021-04-05 00:44:38 -04:00
Markus Wick
9be819faaf common: Move assert failure handling into a cpp file.
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.
2021-04-04 21:19:33 +02:00
lat9nq
33ed02a239 configure_graphics: Prevent stack-use-after-scope
Address Sanitizer reports stack-use-after-scope on line 231
`vulkan_devices.push_back(QString::fromStdString(name));`. Instead of
using a pointer, copy the string into a std::string and use that,
instead.
2021-04-04 15:05:22 -04:00
bunnei
c92a211e7c
Merge pull request #6127 from german77/udpSingleConnection
InputCommon: Improve UDP communications
2021-04-03 23:14:23 -07:00
bunnei
c5ca8675c8
Merge pull request #6132 from MerryMage/code_size
arm_dynarmic: Increase size of code cache
2021-04-02 18:47:04 -07:00
Morph
aca6ab6417
Merge pull request #6131 from german77/rightjoyconSLSR
HID: Fix SL and SR buttons for right joycon
2021-04-02 15:48:04 -04:00
MerryMage
0fbd7752c3 arm_dynarmic: Increase size of code cache 2021-04-02 18:09:15 +01:00
german77
eaf0c4af11 HID: Fix SL and SR buttons for right joycon 2021-04-02 09:03:11 -05:00
bunnei
d69421b1db
Merge pull request #6106 from MerryMage/nullptr-jit
[test] arm_dynarmic: Always have a 'valid' jit instance
2021-04-01 09:50:00 -07:00
bunnei
e44622860a
Merge pull request #6126 from Morph1984/stub-SetAlbumImageTakenNotificationEnabled
ISelfController: Stub SetAlbumImageTakenNotificationEnabled
2021-03-30 21:32:01 -07:00
german77
bb3dce9363 Use a single connection for UDP server, make connection test longer and check all pads instead of only the first one 2021-03-30 22:17:08 -05:00
german77
d9db1d125e InputCommon: Name properly xbox 360 and one controllers, Fix mappings for Nintendo Pro controllers 2021-03-30 21:40:36 -05:00
Rodrigo Locatti
5ee669466f
Merge pull request #5927 from ameerj/astc-compute
video_core: Accelerate ASTC texture decoding using compute shaders
2021-03-30 19:31:52 -03:00
bunnei
eeea426c74
Merge pull request #6116 from german77/userArgument
yuzu/main: Add user command line argument
2021-03-30 15:01:33 -07:00
Morph
ca30190fad ISelfController: Stub SetAlbumImageTakenNotificationEnabled
This service call sets an internal flag whether a notification is shown when an image is captured.
Currently we do not support capturing images via the capture button, so this can be stubbed for now.
2021-03-30 13:45:00 -04:00
ameerj
54c1e0897d configuration: Add auto stub toggle that resets on boot
Auto-stub is an experimental debugging feature that may cause unforseen bugs. This adds a toggle to only allow auto-stubbing unimplemented functions when explicitly enabled when yuzu is launched.
2021-03-30 13:40:31 -04:00
ameerj
e6e61424d4 service: Auto stub fallback
For simple services we can implement an automatic stub fallback to help with compatibility until a proper implementation is done.

Co-Authored-By: Chloe <25727384+ognik5377@users.noreply.github.com>
2021-03-30 13:40:31 -04:00
bunnei
b3f68098d5
Merge pull request #6124 from jbeich/vulkan+opengl
vulkan_common: enable OpenGL interop on other Unices
2021-03-30 09:37:00 -07:00
Chloe Marcec
bf1c1788ca nvdrv: Cleanup CDMA Processor on device closure
Brings us a step closer to unifying all channels to share a common interface.
2021-03-30 20:37:40 +11:00
Chloe Marcec
4930242c20 Addressed issues 2021-03-30 20:27:27 +11:00
bunnei
f234531f92
Merge pull request #6109 from german77/gestureID
HID: Initialize correctly the gesture finger_id and filter invalid inputs
2021-03-29 18:00:47 -07:00
Jan Beich
9b50b23a50 vulkan_common: enable OpenGL interop on other Unices 2021-03-30 00:25:25 +00:00
bunnei
fb7dcbf7af
Merge pull request #6102 from ogniK5377/fd-pass
nvdrv: Pass device fd and handle device create methods for device opening and closing
2021-03-29 12:53:55 -07:00
bunnei
f8561c7a65
Merge pull request #6115 from bunnei/fix-kernel-init
hle: kernel: Initialize preemption task after schedulers.
2021-03-28 12:13:39 -07:00
german77
9cebde760f yuzu/main: Add user command line argument 2021-03-27 12:34:48 -05:00
bunnei
cb7f2e5616 hle: kernel: Initialize preemption task after schedulers.
- Fixes a startup crash that occurs if CoreTiming tries to preempt before kernel initialization completes.
2021-03-27 10:04:13 -07:00
Morph
3b98fab850 service: friend: Change logging class from ACC to Friend 2021-03-27 11:11:07 -04:00
german77
b2fb5c60e1 Friend: Stub GetPlayHistoryRegistrationKey 2021-03-27 08:25:36 -05:00
Narr the Reg
7c26a9aefe HID: Initialize correctly the gesture finger_id and filter invalid results 2021-03-26 11:13:18 -06:00
Chloe Marcec
e9a1f29e93 pctl: Rework how pctl works to be more accurate
Introduces the usage of compatibilities to allow it the module to be closer to how it works on hardware.
2021-03-27 02:03:18 +11:00
ameerj
2f83d9a61b astc_decoder: Refactor for style and more efficient memory use 2021-03-25 16:53:51 -04:00
Chloe Marcec
99fdfa1fcd nvdrv: Pass device fd and handle device create methods for device opening and closing
We pass the fd to the ioctl as well as alert the device when it's opened or closed to allow for fd unique actions to take place
2021-03-25 12:56:42 +11:00
bunnei
65774084fd
Merge pull request #6101 from ogniK5377/alloc-as-ex
nvdrv: Change InitializeEx to AllocAsEx
2021-03-24 17:37:01 -07:00
Jan Beich
8c016b02e7 gl_device: unblock async shaders on other Unix systems
Mesa is the primary OpenGL provider on all FreeDesktop systems.
For example, iris is used on Intel GPU + FreeBSD by default.
2021-03-24 19:59:20 +00:00
MerryMage
52dae41d7f arm_dynarmic: Always have a 'valid' jit instance 2021-03-24 18:47:17 +00:00
bunnei
10d6e9f32b hle: kernel: Breakup InitializeMemoryLayout. 2021-03-23 18:47:16 -07:00
bunnei
fb91647bca hle: kernel: k_memory_region_type: Minor code cleanup. 2021-03-23 18:42:04 -07:00
bunnei
4eac8703d2 hle: kernel: k_memory_region: Minor code cleanup. 2021-03-23 18:37:39 -07:00
bunnei
9032d21365 hle: kernel: k_memory_layout: Use pair instead of tuple. 2021-03-23 18:35:01 -07:00
bunnei
a32190d0c2 hle: kernel: k_system_control: Remove unnecessary inline. 2021-03-23 18:33:29 -07:00
bunnei
ab5995c7ae common: common_sizes: Move sizes to the Common namespace. 2021-03-23 18:31:46 -07:00
bunnei
716285fab8
Merge pull request #6100 from bunnei/arm-fix
core: arm_dynarmic: Ensure JIT state is saved/restored on page table changes.
2021-03-23 17:08:37 -07:00
bunnei
dde074eaab
Merge pull request #6092 from ivan-boikov/cancel-dir-select
Fix cancelation of getExistingDirectory dialog
2021-03-22 17:55:18 -07:00
Chloe Marcec
875183e7c5 nvdrv: Change InitializeEx to AllocAsEx
Wee also report the correct "big page size" now in GetVARegions & fix up the struct for IoctlAllocAsEx
2021-03-22 19:59:30 +11:00
LC
a50133fc5e
Merge pull request #6095 from lat9nq/async-shader-block
gl_device: Block async shaders on AMD and Intel
2021-03-21 23:29:49 -04:00
bunnei
1d78190843 hle: kernel: Merge KMemoryRegionAttr and KMemoryRegionType.
- Fixes clang errors with mixed enum arithmetic.
2021-03-21 15:53:21 -07:00
bunnei
3ffbe50e7d hle: kernel: Remove unused variable. 2021-03-21 15:47:24 -07:00
bunnei
fc5205fc84 hle: kernel: k_memory_region_type: Remove extra ". 2021-03-21 15:47:05 -07:00
bunnei
a35717b245 core: arm_dynarmic: Ensure JIT state is saved/restored on page table changes.
- We re-create the JIT here without preserving any state.
2021-03-21 15:25:25 -07:00
bunnei
1996cae9cb hle: kernel: k_memory_layout: Move KMemoryRegionAllocator out of global. 2021-03-21 14:45:13 -07:00
bunnei
343eaecd38 hle: kernel: k_memory_layout: Derive memory regions based on board layout. 2021-03-21 14:45:13 -07:00
bunnei
8d0ba7ee49 common: common_sizes: Move Invalid to Size_* prefix and add missing values. 2021-03-21 14:45:03 -07:00
bunnei
80688362cf hle: kernel: k_memory_region: Refactor to simplify code. 2021-03-21 14:45:03 -07:00
bunnei
edbc505e52 hle: kernel: board: k_system_control: Extend to include memory region sizes. 2021-03-21 14:45:03 -07:00
bunnei
10265ad0e4 hle: kernel: board: Add secure_monitor module. 2021-03-21 14:45:03 -07:00
bunnei
28be8aec9a common: Move common sizes to their own header for code reuse. 2021-03-21 14:45:03 -07:00
bunnei
01f04fee32 hle: kernel: k_address_space_info: Cleanup. 2021-03-21 14:45:02 -07:00
bunnei
f2e1441567 hle: kernel: Add k_trace module. 2021-03-21 14:45:02 -07:00
bunnei
5762517728 hle: kernel: KSystemControl: Update to reflect board-specific behavior. 2021-03-21 14:45:02 -07:00
bunnei
a439867f2c hle: kernel: KMemoryManager: Add CalculateManagementOverheadSize. 2021-03-21 14:45:02 -07:00
bunnei
43a29b5803 hle: kernel: KMemoryManager: Add aliases. 2021-03-21 14:45:02 -07:00
bunnei
c17beefe3d hle: kernel: Add architecture and board specific memory regions. 2021-03-21 14:45:02 -07:00
bunnei
3fb64da452 hle: kernel: KMemoryRegion: Derive region values. 2021-03-21 14:45:02 -07:00
bunnei
5872561077 hle: kernel: Migrate some code from Common::SpinLock to KSpinLock. 2021-03-21 14:45:02 -07:00
bunnei
541b4353e4 hle: kernel: Add initial KMemoryRegionType module. 2021-03-21 14:45:02 -07:00
bunnei
778e0f8ec1 hle: kernel: Move KMemoryRegion to its own module and update. 2021-03-21 14:45:02 -07:00
lat9nq
538f097f97 gl_device: Block async shaders on AMD and Intel
Currently, the Windows versions of the Intel OpenGL driver and the AMD
proprietary OpenGL driver do not properly support (or in fact degrade)
when asynchronous shader compilation is enabled. This blocks
specifically those drivers from using this feature. This affects
AMDGPU-PRO on Linux, and AMD's and Intel's OpenGL drivers on Windows.
2021-03-21 01:25:45 -04:00
ivan-boikov
afa4bcbb3b Fix cancelation of choose directory dialog 2021-03-20 15:52:22 +01:00
bunnei
2e85ee250d
Merge pull request #6052 from Morph1984/vi-getindirectlayerimagemap
IApplicationDisplayService: Stub GetIndirectLayerImageMap
2021-03-19 22:59:25 -07:00
bunnei
cb48ed2e1a
Merge pull request #6056 from zkitX/spl-updates
service: Refactor spl
2021-03-18 15:49:41 -07:00
bunnei
4aa8189328
Merge pull request #6055 from MerryMage/exceed-the-limit
[testing] fiber: Double default stack size
2021-03-17 20:46:45 -07:00
Morph
ec514a4d1b IApplicationDisplayService: Stub GetIndirectLayerImageMap
Used by games invoking the inline software keyboard such as GNOSIA
2021-03-17 03:25:12 -04:00
bunnei
e1f7938a3b
Merge pull request #6070 from Morph1984/sysver-11.0.1
system_version: Update to 11.0.1
2021-03-16 18:13:12 -07:00
Morph
8441094ba3 bsd: Avoid writing empty buffers
Silences log spam on empty buffer writes
2021-03-16 12:50:44 -04:00
bunnei
0687a8370d
Merge pull request #6069 from Morph1984/ngWord
system_archive: Update NgWord archive version
2021-03-15 15:44:04 -07:00
Morph
824e53149d system_version: Update to 11.0.1 2021-03-14 08:47:36 -04:00
Morph
9761618a8d system_archive: Update NgWord archive version 2021-03-14 08:33:48 -04:00
bunnei
d3a4a192fe
Merge pull request #6054 from Morph1984/time-GetClockSnapshot
time: Assign the current time point to the ClockSnapshot
2021-03-13 23:15:54 -08:00
Rodrigo Locatti
2f30c10584 astc_decoder: Reimplement Layers
Reimplements the approach to decoding layers in the compute shader. Fixes multilayer astc decoding when using Vulkan.
2021-03-13 12:16:03 -05:00
ameerj
c7553abe89 astc_decoder: Fix out of bounds memory access
resolves a crash with some anamolous textures found in Astral Chain.
2021-03-13 12:16:03 -05:00
ameerj
20eb368e14 renderer_vulkan: Accelerate ASTC decoding
Co-Authored-By: Rodrigo Locatti <reinuseslisp@airmail.cc>
2021-03-13 12:16:03 -05:00
ameerj
f6566338eb host_shaders: Modify shader cmake integration to allow for larger shaders
using a raw string to encapsulate the entire shader code limits us to shaders of size less than 2KB. This change overcomes this limitation.
2021-03-13 12:16:03 -05:00
ameerj
2985e5e94c renderer_opengl: Accelerate ASTC texture decoding with a compute shader
ASTC texture decoding is currently handled by a CPU decoder for GPU's without native ASTC decoding support (most desktop GPUs). This is the cause for noticeable performance degradation in titles which use the format extensively.

This commit adds support to accelerate ASTC decoding using a compute shader on OpenGL for GPUs without native support.
2021-03-13 12:16:03 -05:00
bunnei
3b85ac2ac4
Merge pull request #6053 from Morph1984/time-CalculateSpanBetween
time: Fix CalculateSpanBetween implementation
2021-03-12 23:31:09 -08:00
bunnei
4735d18bb9
Merge pull request #6028 from bunnei/raster-cache
video_core: rasterizer_accelerated: Use a flat array instead of interval_map for cached pages.
2021-03-12 21:57:27 -08:00
bunnei
a9d24b0df3 video_core: rasterizer_accelerated: Fix un/signed mismatch. 2021-03-12 21:52:49 -08:00
bunnei
5dae45b958
Merge pull request #5327 from AniLeo/master
qt: Set DISPLAY env var when not present
2021-03-12 12:10:28 -08:00
bunnei
827dcad26e
Merge pull request #6040 from german77/toggleKeyboard
Enable toggle buttons for keyboard and mouse
2021-03-11 11:00:44 -08:00
zkitx
4439801c0f
Fix casing on DeallocateAesKeySlot 2021-03-11 02:46:22 -05:00
zkitx
ad653550eb
Update SPL to fit N's service refactor (4.0.0+) which split into new services. 2021-03-11 02:36:48 -05:00
MerryMage
59173ff7a7 fiber: Double default stack size
Stack overflow occurs with some guest applications
2021-03-10 20:37:56 +00:00
Morph
87cfe5b1da time: Fix CalculateSpanBetween implementation
CalculateSpanBetween passes in the ClockSnapshots through 2 input buffers and not as raw arguments. Fix this by reading the 2 input buffers instead of popping raw arguments.

Partially fixes Super Smash Bros. Ultimate's Spirit Board
2021-03-10 11:42:59 -05:00
Morph
2490ffbbce time: Assign the current time point to the ClockSnapshot
Fixes the timer in Super Smash Bros Ultimate's Spirit Board.
2021-03-10 11:40:51 -05:00
Rodrigo Locatti
daf5c5060b
Merge pull request #5891 from ameerj/bgra-ogl
renderer_opengl: Use compute shaders to swizzle BGR textures on copy
2021-03-09 02:47:51 -03:00
bunnei
d1a7b2eca7
Merge pull request #6021 from ReinUsesLisp/skip-cache-heuristic
buffer_cache: Heuristically decide to skip cache on uniform buffers
2021-03-08 17:48:55 -08:00
bunnei
9c4c9f1e7d
Merge pull request #5990 from german77/mousePanningV2
InputCommon: Mouse fixes
2021-03-08 14:50:58 -08:00
bunnei
8f7eb194af common: Fiber: use a reference for YieldTo.
- Fixes another small leak.
2021-03-07 13:46:53 -08:00
Ani
cd7abba1a9 qt: Set DISPLAY env var when not present
Fixes web browser opening (Help > Open Mods Page, Help > Open Quickstart 
Guide)
2021-03-07 15:56:22 +00:00
german77
41e94b7b99 Enable mouse toggle buttons 2021-03-06 13:27:02 -06:00
german
4bcc5bacff Add toggle button option for normal buttons 2021-03-06 07:36:41 -06:00
bunnei
68ffac250a common: fiber: Use weak_ptr when yielding.
- Avoids a memory leak, as taking a strong reference of the fiber here causes a circular reference.
- Supersedes #6006 with a more narrow fix.
2021-03-05 22:10:03 -08:00
german
1f228c51ca Enable button toggle for keyboard in the modifier button 2021-03-05 19:21:04 -06:00
bunnei
4cf5b860bd
Merge pull request #6036 from bunnei/thread-leak
hle: kernel: KThread: Rework dummy threads & fix memory leak.
2021-03-05 17:15:35 -08:00
bunnei
47af34003b hle: kernel: KThread: Rework dummy threads & fix memory leak.
- Dummy threads are created on thread local storage for all host threads.
- Fixes a leak by removing creation of fibers, which are not applicable here.
2021-03-05 17:10:57 -08:00
LC
97415ad07a
Merge pull request #6029 from Morph1984/compile-utf8
CMakeLists: Add /utf-8 compile option for MSVC
2021-03-05 20:09:37 -05:00
bunnei
a5ab85ac37
Revert "core: Switch to unique_ptr for usage of Common::Fiber." 2021-03-05 17:08:17 -08:00
bunnei
9d010be483
Merge pull request #6034 from Morph1984/mbedtls
externals: Update mbedtls to 2.16.9
2021-03-05 15:48:28 -08:00
bunnei
34a3ee1631
Merge pull request #6006 from bunnei/fiber-unique-ptr
core: Switch to unique_ptr for usage of Common::Fiber.
2021-03-04 23:59:06 -08:00
Morph
96c9e67b1b aes_util: Remove malformed mbedtls_cipher_finish function call 2021-03-05 02:05:05 -05:00
Morph
e7038344aa CMakeLists: Add /utf-8 compile option for MSVC
Ensures that the source and execution character sets are in UTF-8
2021-03-05 01:46:56 -05:00
ameerj
5213f70230 texture_cache: Blacklist BGRA8 copies and views on OpenGL
In order to force the BGRA8 conversion on Nvidia using OpenGL, we need to forbid texture copies and views with other formats.

This commit also adds a boolean relating to this, as this needs to be done only for the OpenGL api, Vulkan must remain unchanged.
2021-03-04 14:14:49 -05:00
ameerj
0639244d85 renderer_opengl: Swizzle BGR textures on copy
OpenGL does not natively support BGR internal formats, which causes many BGR textures to render incorrectly, with Red and Blue channels swapped.

This commit aims to address this by swizzling the blue and red channels on texture copies when a BGR format is encountered.
2021-03-04 14:14:19 -05:00
bunnei
b8b5891585
Merge pull request #5989 from ReinUsesLisp/cmdpool
vk_command_pool: Reduce the command pool size from 4096 to 4
2021-03-04 11:07:31 -08:00