Commit Graph

9724 Commits

Author SHA1 Message Date
GPUCode
e54a92c252 code: Address build issues 2022-12-25 22:18:04 +02:00
GPUCode
9145d4cec8 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-12-25 22:18:04 +02:00
GPUCode
c611592db6 citra_qt: Add physical device selection dialog 2022-12-25 22:18:04 +02:00
GPUCode
6aba809da8 renderer_opengl: Unbind unused framebuffer targets
* Fixes graphical glitches in many games for some reason
2022-12-25 22:12:42 +02:00
GPUCode
f0449d79fd renderer_opengl: Emulate texture copy with blit for now 2022-12-25 22:12:42 +02:00
GPUCode
33481ada7f renderer_opengl: Address buffer overflow 2022-12-25 22:12:42 +02:00
GPUCode
67195974e7 video_core: Small code improvements 2022-12-25 22:12:42 +02:00
GPUCode
70c2376fd0 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-12-25 22:12:42 +02:00
GPUCode
177c7de4f9 input_common: Small fix 2022-12-25 22:12:42 +02:00
GPUCode
eea914ba84 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-12-25 22:12:41 +02:00
GPUCode
62e88fbeb3 rasterizer_cache: Code cleanup
* Merge utils and types to a single header
2022-12-25 22:07:46 +02:00
GPUCode
5ce27d8341 texture_decode: Prefer std::memcpy where possible 2022-12-25 22:07:46 +02:00
GPUCode
eaf62eb635 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-12-25 22:07:46 +02:00
emufan4568
9675811bbe renderer_vulkan: Add experimental Vulkan renderer 2022-12-25 22:07:46 +02:00
emufan4568
945faf8e92 externals: Add vulkan headers and vma 2022-12-25 22:02:59 +02:00
emufan4568
9403049671 rasterizer_cache: Refactor texture cube interface
* Reuse our Surface class instead of having a separate one, to avoid reimplementing stuff in the backend
2022-12-25 22:02:59 +02:00
emufan4568
40159d9779 gl_texture_runtime: Clean up texture upload/download code
* Improve readability and code clarity
2022-12-25 22:02:59 +02:00
emufan4568
f63653a5b9 rasterizer_cache: Use Common::Rectangle everywhere
* Make a nice alias for it and use it instead of having Rect2D/Region2D. Makes the new design less intrusive to the current cache
2022-12-25 22:02:59 +02:00
emufan4568
c71dbb5d19 rasterizer_cache: Make into template
* This is the final step, now RasterizerCache is compltely decoupled from OpenGL (technically not yet, but that's talking details). For now texture filtering and some GLES paths have been disabled and will be reimplemented in the following commits
2022-12-25 22:02:59 +02:00
emufan4568
0f4df2c012 rasterizer_cache: Use PBO staging buffer cache for texture uploads/downloads 2022-12-25 22:02:11 +02:00
emufan4568
c6fc4f5a87 rasterizer_cache: Reorder methods 2022-12-25 22:02:11 +02:00
emufan4568
916afa194d rasterizer_cache: Remove remnants of cached_pages 2022-12-25 22:02:11 +02:00
emufan4568
6f2cd11a85 rasterizer_cache: Fix texture cube blitting
* The target was GL_TEXTURE_2D instead of GL_TEXTURE_CUBE_MAP_*
2022-12-25 22:02:11 +02:00
emufan4568
14652d52bc morton_swizzle: Implement texture formats in UNSWIZZLE_TABLE
* I can now remove that loop that has been messing with my OCD
2022-12-25 22:02:11 +02:00
emufan4568
a57ee7cdf2 morton_swizzle: Use tiled_buffer instead of reading data from g_memory
* It's much safer and removes hardcoded global state usage
2022-12-25 22:02:11 +02:00
emufan4568
dbd3e6c29b rasterizer_accelerated: Zero intialize cached_pages
* Resolves random crashes because count takes random values
2022-12-25 22:02:11 +02:00
emufan4568
665cbca17c texture_runtime: Add staging buffer lock mechanism 2022-12-25 22:02:11 +02:00
emufan4568
efb9e9f40f cached_surface: Remove custom texture logic
* Makes things more complicated and is in the way. It's probably already
broken by recent changes, so I'll need to reimplement it anyway
2022-12-25 22:02:11 +02:00
emufan4568
8d35118f63 renderer_opengl: Add driver class to report info/bugs 2022-12-25 22:02:11 +02:00
emufan4568
553c85456e rasterizer_cache: Add staging buffer cache for uploads/downloads
*  In addition bump context version to 4.4 to enforce ARB_buffer_storage and use EXT_buffer_storage for GLES which is support on many mobile devices
2022-12-25 22:02:11 +02:00
emufan4568
68ca206d53 rasterizer_cache: Improve TextureRuntime API
* This makes every operation more explicit and mimics more the Vulkan API
2022-12-25 22:02:11 +02:00
emufan4568
e30e977140 renderer_opengl: Encapsulate sync objects in OGLSync 2022-12-25 22:02:10 +02:00
emufan4568
f13738d252 morton_swizzle: Optimize and use std::span 2022-12-25 22:02:10 +02:00
emufan4568
04b927ab7f morton_swizzle: Avoid buffer underflow
* Check the y coordinate before decrementing linear_buffer
2022-12-25 22:02:10 +02:00
emufan4568
993d172de9 morton_swizzle: Move out of bounds texture check out of the decode loop
* Running relative expensive checks like this on a hot path causes small but measurable performance loss. Tested SMD wit this and it doesn't crash
2022-12-25 22:02:10 +02:00
emufan4568
695447611e rasterizer_cache: Use SurfaceType instead of Aspect
* It was doing pointless enum conversions when both enums described the same thing
2022-12-25 22:02:10 +02:00
emufan4568
06bacfbd72 rasterizer_cache: Separate texture swizzling to utils 2022-12-25 22:02:10 +02:00
emufan4568
cf8bc35d46 rasterizer_cache: Remove OpenGL references from morton_swizzle 2022-12-25 22:02:10 +02:00
emufan4568
ef859bab84 citra_qt: Forbid renderer change during runtime
* It's an endless source of problems and isn't usefull
2022-12-25 22:02:10 +02:00
emufan4568
a2d0669562 rasterizer_cache: Touch up MatchFlags comments 2022-12-25 22:02:10 +02:00
emufan4568
95365ad6ba rasterizer_cache: Drop OpenGL postfix 2022-12-25 22:02:10 +02:00
emufan4568
1963b649e8 rasterizer_cache: Shorten filenames and general cleanup
* AllocateSurfaceTexture now takes the PixelFormat directly as FormatTuple is an OpenGL struct and will be moved there
2022-12-25 22:02:10 +02:00
emufan4568
db7cdb741c video_core: Move UpdatePagesCachedCount to RasterizerAccelerated 2022-12-25 22:02:10 +02:00
emufan4568
0fe61ba040 citra_qt: Prepare GUI for Vulkan support 2022-12-25 22:02:06 +02:00
liushuyu
b588d6181b qt_multimedia_camera: fix image handling in Qt 5.15+ ... (#6231)
... In Qt 5.15+ the QImage will not accept non-natively handled pixel
formats anymore. We can however use the newly added conversion method
provided in `QVideoFrame` to convert it to `QImage` instead
2022-12-24 11:45:31 +05:30
Vitor K
c8ff1d744a Change Monoscopic Render mode to a dropdown (#6215) 2022-12-24 03:17:49 +01:00
Tobias
ae3d50f71f Port yuzu-emu/yuzu#2968: configure_input: Fix input handling for ZL and ZR from controllers with analog triggers (#4984)
Co-authored-by: Frederic L. <freddyfunk@users.noreply.github.com>
2022-12-17 16:11:49 +01:00
Tobias
ccb50e7f2c Port yuzu-emu/yuzu#9300: "CMake: Use precompiled headers to improve compile times" (#6213)
Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com>
2022-12-17 16:06:38 +01:00
Vitor K
51e252c7ed Hide mouse: fix for secondary window and single window mode (#6220) 2022-12-17 16:05:51 +01:00
Vitor K
517e0bc342 Camera fixes (#6181) 2022-12-17 16:05:04 +01:00