Commit graph

1024 commits

Author SHA1 Message Date
Wunkolo
57ee0a3db9 Fix display drawing
Disable depth-testing, the display vertex-shader, and the
viewport/scissor positioning of the bottom screen.

We have visual!
2023-08-24 11:31:55 -07:00
Wunkolo
e4195d4d4d Implement color-buffer clears 2023-08-24 11:27:49 -07:00
Wunkolo
d781802eb0 Fix render-texture cache lookups
`[32bit loc | 32bit attributes]`
Use `std::map::lower_bound(loc << 32)` to find the first address that matches the key in O(logn) time, finer grained searchs can happen after the fact in O(n) time.

Fixes render-texture cache lookups
2023-08-24 10:40:02 -07:00
Wunkolo
be5ebeefed Default all texture layouts to eShaderReadOnlyOptimal
By default, a texture sitting somewhere and ignored should be in a shader-read-only state, and transitioned into other layouts in exception to this passive state.

This allows all shaders to be ready to be interpreted by shaders by default.
2023-08-24 09:47:11 -07:00
wheremyfoodat
46ce2c14cd Initial UserSaveData impl 2023-08-24 17:58:16 +03:00
wheremyfoodat
bd169f9274
Merge pull request #234 from wheremyfoodat/mii_selector
More FRD stuffs
2023-08-24 16:04:44 +03:00
wheremyfoodat
45593b3eab
[APT] Revert accidental switch from panicDev to panic 2023-08-24 15:51:13 +03:00
wheremyfoodat
52304763bb Merge branch 'master' into mii_selector 2023-08-24 15:45:38 +03:00
wheremyfoodat
f3042672fb More FRD stuffs 2023-08-24 15:35:44 +03:00
wheremyfoodat
3908900bca
Merge pull request #158 from wheremyfoodat/mii_selector
Initial work on HLE applets
2023-08-24 01:54:21 +03:00
wheremyfoodat
150cac89a4 [APT] Check for resume event before signalling 2023-08-24 01:35:40 +03:00
wheremyfoodat
467ab161ff Applets: Warn instead of panic 2023-08-24 01:32:57 +03:00
wheremyfoodat
74f7aeedbb Proper applet manager class 2023-08-23 18:07:24 +03:00
wheremyfoodat
9e337603d0 derp 2023-08-23 17:22:11 +03:00
wheremyfoodat
7fb3cf1236 Implement more of AC 2023-08-23 17:20:51 +03:00
wheremyfoodat
f099cc12fa Add swkbd applet 2023-08-23 01:16:27 +03:00
wheremyfoodat
865e8e299f Add FRD::GetFriendProfile and FRD::GetFriendAttributeFlags 2023-08-22 23:43:56 +03:00
wheremyfoodat
0bd3729417 Stub APT::PrepareLibraryApplet 2023-08-22 23:11:14 +03:00
wheremyfoodat
21658c6b32 More microphone stuff 2023-08-22 17:28:09 +03:00
Wunkolo
84e0d58d9e Add initial render-target layout transition, depth-stencil aspect fix
Fixes a lot of the render-target validation error messages.
We "might" change the default layout for render-targets to shader-read-only and only use attachment-optimal layouts when they are armed for a render-pass. Render-Textures more often need to be ready for shaders than they need to be ready for render-passes.
2023-08-21 22:52:51 -07:00
Wunkolo
d35c803ad6 Fix RenderTexture usage/image-aspect
All color textures need to be sampled due to how we are transposing the image when writing to the render-texture.

Depth-Stencil render-textures need to designate if it wants _either_ depth or stencil when creating an image-view.
2023-08-21 22:40:40 -07:00
Wunkolo
cfd02f936e Fix swapchain/screenTexture layout synchronization issues
Been deving with a headless machine for too long.
Fixes some presentation issues.
2023-08-21 22:34:31 -07:00
wheremyfoodat
1d601e41ba Merge branch 'master' into timerz 2023-08-21 18:57:18 +03:00
wheremyfoodat
3b22f15e67 Merge branch 'master' into mii_selector 2023-08-21 18:53:36 +03:00
wheremyfoodat
92ceb0f05f Merge branch 'master' into sd-card 2023-08-21 18:41:29 +03:00
wheremyfoodat
d3d426985a Add news:u 2023-08-21 16:45:35 +03:00
wheremyfoodat
3f2a546915 NFC stuffs 2023-08-21 15:39:55 +03:00
wheremyfoodat
3c7b9bb512 Fonts in fonts directory 2023-08-21 15:16:23 +03:00
wheremyfoodat
fb4b3ca7ab NFCC::StartCommunication: Fix response header 2023-08-21 15:13:00 +03:00
wheremyfoodat
5abfe5255f Add NFC::StartCommunication 2023-08-21 15:11:32 +03:00
wheremyfoodat
dd6508eb26 Migrate shared font to cmrc 2023-08-21 14:53:50 +03:00
Wunkolo
b3812548fe Fix bottom screen detection 2023-08-20 23:42:34 -07: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
89f3eb3a87 Add simple graphics pipeline creation
This will eventually need to move into a cache, but this is introducing
some foundational patterns so that we know how to properly design a
pipeline cache. Currently does not provide a `DescriptorSetLayout`
argument. Causing validation errors. This will be a general-case cache
right from the get-go.
2023-08-20 23:01:43 -07:00
Wunkolo
13e52ac047 Add shader-module loading
Loads spirv files from the embedded virtual file system and loads them
into vulkan shader-modules.
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
6052abe551 Fix swapchain synchronization issues
While we wait on the CPU-side fence for these command buffers, we must
also wait on the GPU-side semaphore to be compliant to validation
layers synchronization. We still get an error on the very first frame
since it will wait for a semaphore that has nothing signaling it.
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
cb8c53e0b8 Map RGB8 to RGBA8
RGB8 is not supported by drivers like RADV. Instead, we map it to RGBA8.
RGBA8 is mandated to be supported by the vulkan spec.
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
97b6b7f122 Add Vulkan Host-Shader compilation
Compiles Vulkan Host shaders into spirv binary files and embeds them
into the application's virtual file-system.
2023-08-20 23:01:43 -07:00
Wunkolo
f62f1bf9b2 Fix ambiguous extension name conversion 2023-08-20 23:01:43 -07:00
Wunkolo
cb64c52d2f Use inline rotl/ror
Fixes apple-clang builds, which do not implement a lot of the `bit`
header.
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