Commit Graph

9414 Commits

Author SHA1 Message Date
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
GPUCode
20ccb995b1 code: Resolve unused variable warnings 2022-10-14 21:03:11 +03:00
GPUCode
601aac2a26 renderer_opengl: Unbind unused framebuffer targets
* Fixes graphical glitches in many games for some reason
2022-10-14 21:03:11 +03:00
GPUCode
924257b2cc renderer_opengl: Emulate texture copy with blit for now 2022-10-14 21:03:11 +03:00
GPUCode
9e34ff40ed renderer_opengl: Address buffer overflow 2022-10-14 21:03:11 +03:00
GPUCode
ba3c84168a video_core: Small code improvements 2022-10-14 21:03:11 +03:00
GPUCode
77d6be6bde 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-14 21:03:11 +03:00
GPUCode
a6e2bcd986 citra_qt: Switch all strings to multiarg 2022-10-14 21:03:11 +03:00
GPUCode
2c30889fdc code: Address more compiler warnings 2022-10-14 21:03:11 +03:00
GPUCode
67a76bec5c citra_qt: Fix more warnings/deprecated functions 2022-10-14 21:03:11 +03:00
GPUCode
98b7c33f62 input_common: Small fix 2022-10-14 21:03:11 +03:00
GPUCode
dbfa06c6b1 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-14 21:03:11 +03:00
GPUCode
88d0b7de13 rasterizer_cache: Code cleanup
* Merge utils and types to a single header
2022-10-14 21:03:11 +03:00
GPUCode
de149e3ee9 texture_decode: Prefer std::memcpy where possible 2022-10-14 21:03:11 +03:00
GPUCode
99877f9465 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-14 21:03:11 +03:00