Commit graph

15594 commits

Author SHA1 Message Date
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