Commit Graph

9458 Commits

Author SHA1 Message Date
f1e09c1ea1 renderer_vulkan: Fix broken sync without timeline semaphores 2022-10-28 23:04:37 +03:00
2423e645f1 renderer_vulkan: Allocate descriptor sets during reinterpretation 2022-10-28 23:04:37 +03:00
0eaae31f9f renderer_vulkan: Enable logic ops and fix swapchain resizing 2022-10-28 23:04:37 +03:00
4f9b545296 renderer_vulkan: Clear stencil with renderpass
* Fixes outline retension in pokemon games
2022-10-28 23:04:37 +03:00
628d70e112 renderer_vulkan: Fix pipeline cache crashes 2022-10-28 23:04:37 +03:00
9991b9b12b 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-28 23:04:37 +03:00
e4bcf73c5a renderer_opengl: Fix broken texture copy
* Resolves graphical bugs in Professor Layton vs Ace Attorney when using OpenGL
2022-10-28 23:04:37 +03:00
b693d205e4 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-28 23:04:37 +03:00
91621ec202 video_core: Fix renderpass cache bug and introduce RGBA -> BGR converter 2022-10-28 23:04:37 +03:00
948f72d320 renderer_opengl: Specify precision in compute shader and add RGB5A1 converter
* Fixes OpenGLES crash
2022-10-28 23:04:37 +03:00
8c5b417486 renderer_vulkan: Complete hardware shader support
* With these changes all commercial games I tested work fine and get a massive performance boost
2022-10-28 23:04:37 +03:00
51685ee2db renderer_vulkan: Begin hardware shader support
* Still experimental and works only with homebrew
2022-10-28 23:04:37 +03:00
079e4aa205 citra: Fix build issues with MinGW and MSVC 2022-10-28 23:04:37 +03:00
48edfb891b renderer_vulkan: Fix warnings and cleanup 2022-10-28 23:04:37 +03:00
915406354c code: Run clang-format 2022-10-28 23:04:31 +03:00
6f3fc32a93 code: Address build issues 2022-10-28 23:03:18 +03:00
ebfa98d31d 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-28 23:03:18 +03:00
3095ee91a8 citra_qt: Add physical device selection dialog 2022-10-28 23:03:18 +03:00
fadeecfe6d code: Resolve unused variable warnings 2022-10-28 23:03:16 +03:00
2a1598036e renderer_opengl: Unbind unused framebuffer targets
* Fixes graphical glitches in many games for some reason
2022-10-28 23:02:23 +03:00
58f01112c5 renderer_opengl: Emulate texture copy with blit for now 2022-10-28 23:02:23 +03:00
7e7b3dc18c renderer_opengl: Address buffer overflow 2022-10-28 23:02:23 +03:00
d4a3f60575 video_core: Small code improvements 2022-10-28 23:02:23 +03:00
f8cbf783cb renderer_vulkan: Don't sample from mipmaps when using texture cubes
* Mipmaps for texture cubes are unimplemented in the rasterizer cache, so sampling from mipmaps will return nothing
2022-10-28 23:02:23 +03:00
dc0cddb7de citra_qt: Switch all strings to multiarg 2022-10-28 23:02:23 +03:00
9cef9d4c58 code: Address more compiler warnings 2022-10-28 23:02:23 +03:00
dada05801f citra_qt: Fix more warnings/deprecated functions 2022-10-28 23:02:23 +03:00
9bc71a3307 input_common: Small fix 2022-10-28 23:02:23 +03:00
98274273b1 citra_qt: Improve graphics API intergration
* Add renderer debug option which toggles debug output in OpenGL/validation layers in Vulkan

* Fix many warnings and replace deprecated Qt functionailty with newer alternatives
2022-10-28 23:02:23 +03:00
269db2bfb8 rasterizer_cache: Code cleanup
* Merge utils and types to a single header
2022-10-28 23:02:23 +03:00
d27c1c8606 texture_decode: Prefer std::memcpy where possible 2022-10-28 23:02:23 +03:00
891b4bff18 renderer_vulkan: Rework format handling
* This is a pretty large commit that aims to solve some issues with the current format system
* The instance now builds at application initialization an array of format traits for each pixel format
  that includes information such as blit/attachment/storage support and fallback formats
* The runtime doesn't ask the instance for formats but receives these traits and can dedice on its own what to build
  For now we do the same as before, we require both blit and attachment support

* Morton swizzling also sees many bug fixes. The previous code was very hacky and didn't work for partial
  texture updates. It was also inconsistent, as it would take a tiled_buffer and write to the middle of linear
* Now the functions have been greatly simplified and adjusted to work better with std::span. This fixes out of bounds
  errors and texture glitches (like the display in Mario Kart 7)
2022-10-28 23:02:23 +03:00
eeccdc02fc renderer_vulkan: Handle scheduler switches properly 2022-10-28 23:02:23 +03:00
29ee94c3f5 vk_platform: Fix wayland build 2022-10-28 23:02:23 +03:00
8936641841 renderer_vulkan: Rewrite stream buffer + other fixes
* Emulate blend color and clip planes correctly

* Don't hack the depth in the vertex shader, use VK_EXT_depth_clip_control for now to set the range to -1, 1

* Rewrite the stream buffer to remove flickering problems. The new implementation doesn't try to be smart about holding memory. It divides the allocation in SCHEDULER_COMMAND_COUNT buckets and automatically switches between them based on the current slot index
2022-10-28 23:02:23 +03:00
e1f6b88e7b vk_rasterizer: Bump vertex buffer size
* Helps with the stuttering, indicating the issue is with the vertex buffer somehow
2022-10-28 23:02:23 +03:00
64d809f06a pica_to_vk: Set cull mode correctly 2022-10-28 23:02:23 +03:00
ebd23026a0 renderer_vulkan: Minimize state changes
* Store current renderpass/pipelines and only rebind when they change

* Enable extended dynamic state support and only apply them when they change
2022-10-28 23:02:23 +03:00
6e1bfe9949 rasterizer_cache: Explicitely pass end_offset to swizzle functions
* This addresses overflow issues
2022-10-28 23:02:23 +03:00
854092ce4f renderer_vulkan: Implement partial color/depth clears 2022-10-28 23:02:23 +03:00
90d24caaf8 renderer_vulkan: Add second screen and remove renderpass breakage 2022-10-28 23:02:23 +03:00
65400936c7 renderer_vulkan: Improve task scheduler synchronization
* Use multiple semaphores for swapchain sync and improve the Submit API
2022-10-28 23:02:23 +03:00
3f9e5a2b42 renderer_vulkan: Use timeline semaphores if available 2022-10-28 23:02:23 +03:00
34ba320c3d renderer_vulkan: Pipeline cache fixes 2022-10-28 23:02:23 +03:00
ec9f1902f5 renderer_vulkan: Isolate surface creation to vk_platform.cpp
* Also cleanup the init code somewhat
2022-10-28 23:02:23 +03:00
c72a365d78 renderer_vulkan: Add ABGR -> RGBA byteswap
* Vulkan doesn't support VK_FORMAT_R8G8B8A8_UNORM_PACK32 unfortunately. Fixes graphical issues on the gpusprites demo
2022-10-28 23:02:23 +03:00
8f211613a3 externals: Trim down glslang build
* When the install option is turned on, glslang will override the install dir which causes SDL2 to fail
2022-10-28 23:02:23 +03:00
30885b72be common: math_util: Include <compare> 2022-10-28 23:02:23 +03:00
beb078a71b cmake: Lower cmake requirement to 3.14 2022-10-28 23:02:23 +03:00
a65f9ea5a8 renderer_vulkan: Address more validation errors and stop memory leakage
* The transition settings are temporary until I write a proper layout tracking system
2022-10-28 23:02:23 +03:00