Commit graph

902 commits

Author SHA1 Message Date
wheremyfoodat
dd6508eb26 Migrate shared font to cmrc 2023-08-21 14:53:50 +03:00
Wunkolo
0258640da9 Add cached sampler creation
Using the sampler cache we can maintain a pool of reusable samplers. The
`sampler2D` utility function can help make some trivial samplers.
2023-08-20 23:40:51 -07:00
Wunkolo
7a86595a1b Add vulkan sampler cache 2023-08-20 23:35:52 -07:00
Wunkolo
14b1d7d8a8 Add display-shader presentation
Uses the graphics pipeline to both blit and transpose the 3ds-formatted
textures. Does not read from the actual texture just yet since we dont
write to the descriptor just yet. Some other patterns need to line up
before then.
2023-08-20 23:01:43 -07:00
Wunkolo
4b7bd9df3d Add Vulkan Descriptor-Update batching
Allows multiple descriptor operations to be batched up and dispatched in
one API call rather than scattered through out the code base.
2023-08-20 23:01:43 -07:00
Wunkolo
72c77e41b4 Draft Vulkan DescriptorHeap
A utility class from a personal project for managing a heap of
descriptors of a particular layout.

Allows the display graphics pipeline to be successfully created,
satisfying its descriptor layout issues.
2023-08-20 23:01:43 -07:00
Wunkolo
6ebbd80286 Add Display-pipeline as member variables 2023-08-20 23:01:43 -07:00
Wunkolo
4b193c8d6b Add general purpose vulkan render cache
Takes in a general `vk::Format` rather than PICA-types
2023-08-20 23:01:43 -07:00
Wunkolo
d4b75deaf8 Remove separate presentation/graphics command buffers
Now there is just one primary command buffer where all work is enqueued
into. At the end of the frame, the next frame's CPU-side fence is waited
on before resetting and beginning its command buffer again for
recording. This command buffer must always be in the RECORDING state.
2023-08-20 23:01:43 -07:00
Wunkolo
52ddaae221 Add getCurrentCommandBuffer for all frame workloads
Rather than allocating new command buffers for each small task, schedule
all work onto the frame's main command buffer to be dispatched at
display-time. Fixes all layout transition and synchronization issues.
2023-08-20 23:01:43 -07:00
Wunkolo
9e2781e874 Refactor render-texture cache
Implement `displayTransfer` in parity with the OpenGL renderer. Allow
arguments to `get{Color,Depth}RenderTexture`.
2023-08-20 23:01:43 -07:00
Wunkolo
c778c34433 Separate present/graphics workloads
Separate the "Display" texture from the cache of framebuffer textures,
move present/graphics into separate command buffers.
2023-08-20 23:01:43 -07:00
Wunkolo
6dcd09af3e Implement basic color/depth render-texture cache 2023-08-20 23:01:43 -07:00
Wunkolo
37902cd9d6 Implement a renderpass cache.
Technically we can generate every possible render-pass up-front based on
the possible combinations of ColorFmt and DepthFmt, but we should only
allocate what the game asks for. Save that pattern for pipelines.
2023-08-20 23:01:43 -07:00
Wunkolo
bf8bb5d459 Add vk_pica translation unit
Intended for conversions and utils between PICA definitions and Vulkan.
2023-08-20 23:01:43 -07:00
Wunkolo
d19b8cf364 Separate frame-work from presentation 2023-08-20 23:01:43 -07:00
Wunkolo
4976671ef0 Rename vulkan_api.hpp to vk_api.hpp
Consistant with other vulkan header patterns.
This header in particular is to configure our Vulkan API usage.
2023-08-20 23:01:43 -07:00
Wunkolo
e87db99a97 Remove ownership of SDL's vulkan-surface
This surface is managed by SDL itself, so there is no need to keep it in
a Unique handle for us to delete.  Fixes the bug where vulkan crashes
during shutdown.
2023-08-20 23:01:43 -07:00
Wunkolo
e3699fe8f8 Allocate and present separate top/bottom screen framebuffer images
Instead of operating directly on the swapchain images, we have our own
top/bottom framebuffer images that will be rendered to independent of
having an available swapchain. The images are blitted into the swapchain
images, allowing for resizing too!
2023-08-20 23:01:43 -07:00
Wunkolo
d0832ca558 Fix support for headless vulkan context 2023-08-20 23:01:43 -07:00
wheremyfoodat
706503974c [Touchscreen] Properly handle "dragging" stylus across screen 2023-08-20 23:42:55 +03:00
wheremyfoodat
41ef4ad540 [HTTP] Stub some certificate stuff 2023-08-20 17:50:53 +03:00
wheremyfoodat
82ded962d0 Add PTM::GetBatteryChargeState 2023-08-20 17:06:32 +03:00
wheremyfoodat
8e00da1d0b Merge branch 'master' into sd-card 2023-08-20 15:55:20 +03:00
wheremyfoodat
197bc93eec Add BOSS:GetErrorCode 2023-08-20 15:07:19 +03:00
wheremyfoodat
eaccc627b9 Merge branch 'master' into sd-card 2023-08-20 14:42:01 +03:00
wheremyfoodat
8aa35d2099 Implement HID::GetSoundVolume 2023-08-20 14:18:30 +03:00
wheremyfoodat
9ee7543f9a Moar SDMC 2023-08-20 13:55:38 +03:00
wheremyfoodat
7ada8da8a8 Start adding SD card support 2023-08-20 13:22:48 +03:00
wheremyfoodat
434827e11e Add svcGetThreadIdealProcessor 2023-08-20 03:43:26 +03:00
wheremyfoodat
415a5bb8de Add AM::RegisterDisconnectEvent 2023-08-20 03:27:10 +03:00
wheremyfoodat
977cb0403c Stub DLC::GetPatchTitleInfo to fail 2023-08-20 03:08:34 +03:00
wheremyfoodat
6895a1d9d6 Implement svcGetCurrentProcessorNumber 2023-08-20 01:51:24 +03:00
wheremyfoodat
fc2747a3d3 Stub NDM::ClearHalfAwakeMacFilter 2023-08-20 00:48:07 +03:00
wheremyfoodat
48b19b2588 Add SD card configs 2023-08-19 19:31:40 +03:00
wheremyfoodat
6d7ab14480 Add MCU::HWC::GetBatteryLevel 2023-08-19 17:50:55 +03:00
wheremyfoodat
c544dd1567 Add MCU::HWC 2023-08-19 17:44:28 +03:00
wheremyfoodat
3f61283251 Implement FRD::Logout and FRD::HasLoggedIn 2023-08-19 17:12:58 +03:00
wheremyfoodat
bd750f010d AC::CloseAsync 2023-08-19 16:35:37 +03:00
wheremyfoodat
6e4b2b672e AC stubs (CancelConnectAsync, CreateDefaultConfig) 2023-08-19 03:24:44 +03:00
wheremyfoodat
05f535be7c More BOSS suffering 2023-08-19 02:31:20 +03:00
wheremyfoodat
02632afb75 [BOSS] Stub SendProperty 2023-08-19 02:02:11 +03:00
wheremyfoodat
5b24006046 Fix discrepancy between ConfigMem::BatteryLevel and PTM 2023-08-18 22:30:50 +03:00
wheremyfoodat
51b2b8eee5 Make battery stuff configurable 2023-08-18 22:17:33 +03:00
wheremyfoodat
80f1de728c Implement NFC::GetTagState 2023-08-18 17:42:05 +03:00
wheremyfoodat
ceb3f05c7e NFC::StopCommunication 2023-08-18 17:21:01 +03:00
wheremyfoodat
59649b27a0 Implement NFC::CommunicationGetStatus 2023-08-18 17:13:15 +03:00
wheremyfoodat
7bbf37bb63 Implement reading texture from NULL 2023-08-18 16:19:54 +03:00
wheremyfoodat
7a6572716f Add FRD::UpdateGameModeDescription 2023-08-18 00:28:28 +03:00
wheremyfoodat
9bf7a9f486 Stub CECD::OpenAndRead 2023-08-17 23:57:18 +03:00