Commit Graph

9737 Commits

Author SHA1 Message Date
ad4339464a renderer_vulkan: Submit present frames from the EmuThread
* This commit also reworks scheduler synchronization somewhat to be more reliable. Flush is given an atomic_bool is signal when the submit is done
2023-03-04 22:24:56 +02:00
32cb44d2b9 vk_descriptor_manager: Cache descriptor sets 2023-03-03 23:06:16 +02:00
39edca2cf7 vk_texture_runtime: Disable anisotropic filtering if unsupported 2023-03-03 22:47:27 +02:00
0a3acc25d2 ci: Bump macOS target to 11 (Big Sur) (#6325) 2023-03-03 22:47:27 +02:00
3f0bcf5913 Revert "ci: Disable uploading final macOS artifacts until ready to resume producing." 2023-03-03 22:47:27 +02:00
2384c8f811 vk_texture_runtime: Bring back FramebufferView
* Also move the usage hint flags to the allocation. If an allocation is used as framebuffer there's a high chance it will be used again as such. In addition is helps keeping pipeline barriers correct even when the surface is destoyed and recreated (happens often with framebuffers)
2023-03-03 16:28:01 +02:00
c26cb68a0c vk_renderpass_cache: Commonize setup between renderpass and dynamic rendering implementations
* Also fix small issue that caused broken rendering on the latter
2023-03-03 16:24:10 +02:00
c34bc45bf1 custom_tex_manager: Fix a race with async decoding 2023-03-02 16:20:32 +02:00
19617f32c8 custom_tex_manager: Multithread custom texture loading and decode
* Each texture has an atomic flag to signal to the backend when decoding is finished

* Don't store the file data as well to conserve RAM.
2023-03-02 16:20:32 +02:00
8396ce0b47 rasterizer_cache: Improve debugging
* Give surfaces an object label viewable in renderdoc with useful information

* Break up the Cache Mgmt microprofile scope and commonize it
2023-03-02 16:20:32 +02:00
07f85cf639 vk_shader_gen_spv: Emulate fog
* Fixes the intro of MM3D
2023-03-02 16:20:32 +02:00
dfd8ded206 vk_pipeline_cache: Improve async pipeline android fallback
* When VK_EXT_pipeline_creation_feedback is unavailable don't synchronously compile the pipeline, this is slow

* Compile the pipeline asynchrounsly instead and have the record thread wait for it. This way we can have multiple pipelines compiling at once
2023-03-02 16:20:32 +02:00
06caa535d6 rasterizer_cache: Remove usage of shared_ptr 2023-03-02 16:20:32 +02:00
42bed30b98 custom_tex_manager: Fix dumping issues
* Use the proper hash for dumping

* Add the mipmap as a postfix to help pack creators
2023-03-02 16:20:32 +02:00
74e75f1996 rasterizer_cache: More texture pack nonsense
* Some packs turn out have mipmaps but not the base level of a texture. Handle this to avoid black textures at a distance
2023-03-02 16:20:32 +02:00
f04a6a4d83 vk_rasterizer: Reduce stream buffer size
* 64MB is more than enough, any higher and it fills up the 256MB device local-host visible heap
2023-03-02 16:20:32 +02:00
33be1b744b rasterizer_cache: Limit mipmap skip to custom surfaces
* Fixes missing mipmaps when custom textures is enabled but the game does not have any pack

* Also fixes black textures in cases where a custom texture was not provided
2023-03-02 16:20:32 +02:00
2c9e0ec723 video_core: Add more ASTC formats 2023-03-02 16:20:32 +02:00
d1ac33b18b Revert "Revert "vk_scheduler: wait for command processing to complete""
* No longer needed after async present and causes sync issues during swapchain recreation

This reverts commit 0381081c5d.
2023-03-02 16:20:32 +02:00
c00bdc4214 gl_texture_runtime: Generate all mipmaps 2023-03-02 16:20:32 +02:00
74be64b60a vk_stream_buffer: Fix synchronization during buffer overflow
* Especially with custom textures the bufer would fill up but didn't wait any watchers on overflow overriding some textures
2023-03-02 16:20:32 +02:00
11ca327951 renderer_vulkan: Optimize stream buffer usage
* Use vma for allocating the memory. In addition place upload/download buffers on the cpu, they don't need to be device local
2023-03-02 16:20:32 +02:00
631da59392 renderer_vulkan: Allow vsync change during gameplay 2023-03-02 16:20:32 +02:00
e861c456c9 custom_tex: Fix hash read on windows 2023-03-02 16:20:31 +02:00
c3ab060576 externals: Trim down zlib-ng build 2023-03-02 16:20:31 +02:00
94ee7c68fc video_core: Clear runtime on rasterizer cache flush
* When changing res scale or custom textures a large number of textures will be replaced so better not keep the old ones
2023-03-02 16:20:31 +02:00
8e8097e7c0 renderer_vulkan: Use combined image samplers
* Less descriptors = good
2023-03-02 16:20:31 +02:00
52683adedd video_core: Rewrite custom textures 2023-03-02 16:20:31 +02:00
e47c47245f rasterizer_cache: Add support for texture dumping 2023-03-02 16:20:31 +02:00
004b83c978 rasterizer_cache: Fix surface validation
* Sometimes the copy interval might be larger than the validation interval
2023-03-02 16:20:31 +02:00
4bff44c9a9 common: Move image decoders to common
* Replace the various image interfaces with spng which is very lightweight and fast. Also add a dds header which will be useful when support for that format is implemented
2023-03-02 16:20:31 +02:00
18ff007ff2 rasterizer_cache: Remove expanded surface immediately
* Since allocations are recycled under the hood there's not risk of a texture being in use
2023-03-02 16:20:31 +02:00
e41ceb3c88 rasterizer_cache: Explicit type in traits 2023-03-02 16:20:31 +02:00
14880862bc video_core: Cleanup surface interface
* Remove unused FramebufferView and make the opengl handles private
2023-03-02 16:20:31 +02:00
e651bb41bc video_core: Cleanup microprofiles
* Remove upload/download targets these are covered by the rasterizer cache
2023-03-02 16:20:31 +02:00
8e93039ef9 rasterizer_cache: Support multi-level surfaces
* With this commit the cache can now directly upload and use mipmaps
  without needing to sync them with watchers. By using native mimaps
  directly this also adds support for mipmap for cube

* Since watchers have been removed texture cubes still work but are uncached
  so slower as well. Will be fixed soon.
2023-03-02 16:20:31 +02:00
65b02f35c7 rasterizer_cache: Cleanup texture clears 2023-03-02 16:20:31 +02:00
d42ccb387a rasterizer_cache: Wrap common draw operation in FramebufferBase
* Makes the rasterizer draw method much cleaner
2023-03-02 16:20:31 +02:00
ee0a7476b3 rasterizer_cache: Simplify SurfaceBase
* The casts are bit ugly but will be refactored soon
2023-03-02 16:20:30 +02:00
45ffc56733 video_core: Manage samplers in the rasterizer cache 2023-03-02 16:20:30 +02:00
be8ee3d706 rasterizer_cache: Remove BlitSurfaces
* Choose copy or blit based on the caller instead
2023-03-02 16:20:30 +02:00
ab688170f0 rasterizer_cache: Commonize texture acceleration functions
* They don't contain any backend specific code so don't duplicate them
2023-03-02 16:20:30 +02:00
274f6093f3 rasterizer_cache: Move microprofile to the top 2023-03-02 16:20:30 +02:00
9662425337 rasterizer_cache: Remove Invalid match flags
* It was specified in every FindMatch. Only copy did not specify it, but copy surfaces ignore the flag regardless making it superflous
2023-03-02 16:20:30 +02:00
6fde9b3354 rasterizer_cache: Switch to page table
* Should be more efficient for surface storage than the interval map
2023-03-02 16:20:30 +02:00
e5907f0979 Merge branch 'master' of https://github.com/GPUCode/citra into vulkan-2 2023-03-02 16:19:54 +02:00
8f2a5374c3 ci: Build macOS architectures separately and combine (#6321)
* ci: Build macOS for different architectures separately.

* ci: Combine macOS builds into universal binary.

* ci: Disable uploading final macOS artifacts until ready to resume producing.
2023-03-01 19:58:09 +02:00
c961ecb9a4 jni\native.cpp: Log g_build_fullname on Android (#6318) 2023-02-28 21:59:30 +05:30
c6f9fd3b65 qt: Remove status bar 3D controls due to issues. (#6317)
The 3D toggle does not behave correctly as it does not have some
special logic from the enhancements configuration UI that determines
the post-processing shader defaults to use. Because of that, plus
an uptick in people seemingly accidentally enabling 3D options and
not being sure why Citra is rendering differently, just remove the
new UI components for now until better ideas for 3D control can
be worked out.
2023-02-28 14:10:14 +02:00
3c15398f9e apt: Implement additional applet state management. (#6303)
* apt: Implement additional library applet state management.

* kernel: Clear process handle table on exit.

* apt: Implement system applet commands.

* apt: Pop MediaType from command buffers with correct size.

* apt: Improve accuracy of parameters and HLE applet lifecycle.

* apt: General cleanup.

* file_sys: Make system save data open error code more correct.

Not sure if this is the exact right error code, but it's at least
more correct than before as Game Notes will now create its system
save data instead of throwing a fatal error.

* apt: Fix launching New 3DS Internet Browser.

* frd: Correct fix to GetMyScreenName response.
2023-02-28 14:09:54 +02:00