Commit Graph

9428 Commits

Author SHA1 Message Date
Vitor Kiguchi
b5d4473bbb citra_qt: Include unordered_map to fix macOS compilation 2022-10-19 20:42:33 +03:00
Vitor Kiguchi
97455ae5f8 renderer_vulkan: Fix shader hash type 2022-10-19 20:41:18 +03:00
emufan4568
69cfff9022 code: Remove usages of std::ranges
* MacOS is still runining my C++ 20 fun
2022-10-19 20:39:33 +03:00
emufan4568
7dd5049ae1 renderer_vulkan: Prefer immediate over mailbox present mode 2022-10-19 20:37:42 +03:00
emufan4568
1396d39cf7 renderer_vulkan: Bump vertex buffer size
* So software shaders don't crash
2022-10-19 20:05:13 +03:00
emufan4568
55220d70df renderer_vulkan: Add more microprofile targets 2022-10-18 22:27:12 +03:00
emufan4568
aebb7f2d06 renderer_vulkan: Improve StreamBuffer API and use it in TextureRuntime
* Also use separate upload and download buffers optimized for write and readback respectively. This gives a huge 20+ FPS boost in most games which were bottlenecked by slow reads
2022-10-18 22:17:30 +03:00
emufan4568
c3956ee207 renderer_vulkan: Fix allocation caching bug 2022-10-17 23:15:06 +03:00
emufan4568
9b582f2ba5 renderer_opengl: Port scaled upload/download code from vulkan 2022-10-17 21:30:32 +03:00
emufan4568
1f16ecad1a renderer_vulkan: Include algorithm in vk_common
* Appears to be a bug in vulkan-hpp
2022-10-17 20:06:36 +03:00
emufan4568
2d5e588d89 renderer_vulkan: Use linear filtering when possible
* Fixes blocky artifacts in Samus Returns
2022-10-17 19:44:27 +03:00
emufan4568
d551e2adc3 renderer_vulkan: Abstract descriptor management
* The pipeline cache was starting to get cluttered
2022-10-17 19:36:03 +03:00
emufan4568
561398bbcd renderer_vulkan: Bump descriptor set allocation limit 2022-10-17 17:41:43 +03:00
emufan4568
23cff45251 renderer_vulkan: Fix storage descriptor binding and respect color mask
* RGBA8 surfaces now expose an additional R32Uint view used for storage descriptors. The format is guaranteed by the spec to support atomic loads/stores. This requires the mutable flag which incurs a performance cost, but might be better than breaking the current renderpass each draw when rendering shadows, especially on mobile

* Color mask is also implemented which fixes Street Fighter and Monster Hunter Stories
2022-10-17 14:51:47 +03:00
emufan4568
0223fa756c renderer_vulkan: Implement depth uploads with blit 2022-10-16 18:06:12 +03:00
emufan4568
b7fa091db0 renderer_vulkan: Use intermediate copy when framebuffer is used both as attachment and shader input 2022-10-16 17:41:22 +03:00
emufan4568
46ae192c05 renderer_vulkan: Respect disk shader option 2022-10-16 15:04:54 +03:00
emufan4568
e059fc5f4f renderer_vulkan: Fix staging buffer size 2022-10-16 14:47:03 +03:00
emufan4568
0fe4225b22 renderer_vulkan: Catch and log more runtime errors
* Also add the ability to enable command buffer dumping which is very useful
2022-10-16 13:09:51 +03:00
emufan4568
3a60a6687d renderer_vulkan: Batch allocate descriptor sets
* Less driver calls should lead to better performance
2022-10-16 11:03:48 +03:00
emufan4568
74b8081114 renderer_vulkan: Emulate border color if possible 2022-10-16 10:14:08 +03:00
emufan4568
69db7d9d0d renderer_vulkan: Implement scaled uploads and downloads
* This commit includes large changes to have textures are handling. Instead of using ImageAlloc, Surface is used instead which provides multiple benefits: automatic recycling on destruction and ability to use the TextureRuntime interface to simplify operations

* Layout tracking is also implemented which allows transitioning of individual mip levels without errors

* This fixes graphical errors in multiple games which relied on framebuffer uploads
2022-10-16 09:47:29 +03:00
emufan4568
caf596e5eb renderer_vulkan: Fix renderpass issues
* The cache didn't take into account the framebuffer and render area used, so if these changed the renderpass wouldn't restart. This caused graphical bugs in Pokemon X/Y
2022-10-15 01:34:26 +03:00
emufan4568
9950e2aab5 renderer_vulkan: Update stencil compare mask 2022-10-15 00:11:05 +03:00
emufan4568
13fe59ae55 renderer_opengl: Fix spotlight in Luigi's Mansion 2022-10-14 23:29:39 +03:00
emufan4568
d700e2c4cc citra_qt: Fix graphics api indicator alignment 2022-10-14 23:25:54 +03:00
emufan4568
59aeeca8ca renderer_opengl: Fix OpenGLES issues
* Always request a 4.4 context until I figure out how to get Qt to cooperate

* Use RGBA for BGR since the converted table will do that conversion
2022-10-14 21:03:11 +03:00
emufan4568
54414d5a8f renderer_vulkan: Report perf stats 2022-10-14 21:03:11 +03:00
emufan4568
6086bfabca renderer_vulkan: Better error handling 2022-10-14 21:03:11 +03:00
emufan4568
069df7741d renderer_vulkan: Allow direct allocation of images 2022-10-14 21:03:11 +03:00
emufan4568
8ec86d07d7 renderer_vulkan: Fix incorrect depth format detection
* Intel iGPUs don't support blit on all depth/stencil formats which caused issues since the runtime checks for this while the renderpass cache does not
2022-10-14 21:03:11 +03:00
emufan4568
c625a5a0b4 renderer_vulkan: Actually minize state changes
* Keep track of the current state and only update it when needed. Previously games would set the same state over and over cluttering renderdoc logs
2022-10-14 21:03:11 +03:00
emufan4568
04a188c96d renderer_vulkan: Fix broken sync without timeline semaphores 2022-10-14 21:03:11 +03:00
emufan4568
8152881f06 renderer_vulkan: Allocate descriptor sets during reinterpretation 2022-10-14 21:03:11 +03:00
emufan4568
0f4dc90acc renderer_vulkan: Enable logic ops and fix swapchain resizing 2022-10-14 21:03:11 +03:00
emufan4568
d77574100d renderer_vulkan: Clear stencil with renderpass
* Fixes outline retension in pokemon games
2022-10-14 21:03:11 +03:00
emufan4568
c10cf4414f renderer_vulkan: Fix pipeline cache crashes 2022-10-14 21:03:11 +03:00
GPUCode
4d7a00f324 renderer_vulkan: Optimize tiled format convertion + fix vertex buffer alignment
* Integrate format convertion to the morton copy function, removing the need for an intermediate copy and convertion pass. This should be beneficial for performance especially since most games use tiled textures

* Also bump vertex buffer size to avoid crashes with hardware shaders and provide correct offset on normal draws which fixes glitches in pokemon Y

* Reduce the local group size to 8 in the D24S8 compute shader which fixes graphical issues in the afformentioned pokemon games at native resolution

* Set LOD to 0 instead of 0.25 to fix another glitch in pokemon y
2022-10-14 21:03:11 +03:00
GPUCode
e56d069ed5 renderer_opengl: Fix broken texture copy
* Resolves graphical bugs in Professor Layton vs Ace Attorney when using OpenGL
2022-10-14 21:03:11 +03:00
GPUCode
e33adc1b11 renderer_vulkan: Pipeline cache fixes
* Delete cache file if found invalid

* Name it after the vendor/device ids so each physical devices gets a separate cache
2022-10-14 21:03:11 +03:00
GPUCode
11de7700aa video_core: Fix renderpass cache bug and introduce RGBA -> BGR converter 2022-10-14 21:03:11 +03:00
GPUCode
b0fc94f155 renderer_opengl: Specify precision in compute shader and add RGB5A1 converter
* Fixes OpenGLES crash
2022-10-14 21:03:11 +03:00
GPUCode
0d4e530805 renderer_vulkan: Complete hardware shader support
* With these changes all commercial games I tested work fine and get a massive performance boost
2022-10-14 21:03:11 +03:00
GPUCode
9a1cf869f9 renderer_vulkan: Begin hardware shader support
* Still experimental and works only with homebrew
2022-10-14 21:03:11 +03:00
GPUCode
523120e03d citra: Fix build issues with MinGW and MSVC 2022-10-14 21:03:11 +03:00
GPUCode
7f26562dce renderer_vulkan: Fix warnings and cleanup 2022-10-14 21:03:11 +03:00
GPUCode
f750da1508 code: Run clang-format 2022-10-14 21:03:11 +03:00
GPUCode
711b699689 code: Address build issues 2022-10-14 21:03:11 +03:00
GPUCode
7f7408b81e video_core: Re-implement format reinterpretation
* Same as before but D24S8 to RGBA8 is switched to a compute shader which should provide better throughput and is much simpler to implement in Vulkan
2022-10-14 21:03:11 +03:00
GPUCode
2da4c9ca90 citra_qt: Add physical device selection dialog 2022-10-14 21:03:11 +03:00