Commit Graph

9416 Commits

Author SHA1 Message Date
177c7de4f9 input_common: Small fix 2022-12-25 22:12:42 +02:00
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
62e88fbeb3 rasterizer_cache: Code cleanup
* Merge utils and types to a single header
2022-12-25 22:07:46 +02:00
5ce27d8341 texture_decode: Prefer std::memcpy where possible 2022-12-25 22:07:46 +02:00
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
9675811bbe renderer_vulkan: Add experimental Vulkan renderer 2022-12-25 22:07:46 +02:00
945faf8e92 externals: Add vulkan headers and vma 2022-12-25 22:02:59 +02:00
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
40159d9779 gl_texture_runtime: Clean up texture upload/download code
* Improve readability and code clarity
2022-12-25 22:02:59 +02:00
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
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
0f4df2c012 rasterizer_cache: Use PBO staging buffer cache for texture uploads/downloads 2022-12-25 22:02:11 +02:00
c6fc4f5a87 rasterizer_cache: Reorder methods 2022-12-25 22:02:11 +02:00
916afa194d rasterizer_cache: Remove remnants of cached_pages 2022-12-25 22:02:11 +02:00
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
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
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
dbd3e6c29b rasterizer_accelerated: Zero intialize cached_pages
* Resolves random crashes because count takes random values
2022-12-25 22:02:11 +02:00
665cbca17c texture_runtime: Add staging buffer lock mechanism 2022-12-25 22:02:11 +02:00
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
8d35118f63 renderer_opengl: Add driver class to report info/bugs 2022-12-25 22:02:11 +02:00
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
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
e30e977140 renderer_opengl: Encapsulate sync objects in OGLSync 2022-12-25 22:02:10 +02:00
f13738d252 morton_swizzle: Optimize and use std::span 2022-12-25 22:02:10 +02:00
04b927ab7f morton_swizzle: Avoid buffer underflow
* Check the y coordinate before decrementing linear_buffer
2022-12-25 22:02:10 +02:00
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
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
06bacfbd72 rasterizer_cache: Separate texture swizzling to utils 2022-12-25 22:02:10 +02:00
cf8bc35d46 rasterizer_cache: Remove OpenGL references from morton_swizzle 2022-12-25 22:02:10 +02:00
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
a2d0669562 rasterizer_cache: Touch up MatchFlags comments 2022-12-25 22:02:10 +02:00
95365ad6ba rasterizer_cache: Drop OpenGL postfix 2022-12-25 22:02:10 +02:00
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
db7cdb741c video_core: Move UpdatePagesCachedCount to RasterizerAccelerated 2022-12-25 22:02:10 +02:00
0fe61ba040 citra_qt: Prepare GUI for Vulkan support 2022-12-25 22:02:06 +02:00
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
c8ff1d744a Change Monoscopic Render mode to a dropdown (#6215) 2022-12-24 03:17:49 +01:00
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
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
51e252c7ed Hide mouse: fix for secondary window and single window mode (#6220) 2022-12-17 16:05:51 +01:00
517e0bc342 Camera fixes (#6181) 2022-12-17 16:05:04 +01:00
812c4fa059 Per-Game Settings: options to reset game settings (#6219) 2022-12-17 16:04:31 +01:00
cb82ffbe20 code: Small cleanups and fixes to lambda captures (#6191)
Co-authored-by: v1993 <v19930312@gmail.com>
Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com>
2022-12-17 16:04:10 +01:00
9d5ae8e1c2 service/nwm_uds: Add NetworkStatusChangeReason (#5377)
fixes https://github.com/citra-emu/citra/issues/3975
2022-12-17 16:03:59 +01:00
06a9f69d88 hle/service/cfg: Add Config block enums documented by 3dbrew... (#6206) 2022-12-14 01:48:41 +01:00
84eada8c50 Fix "auto" resolution factor (#6218) 2022-12-13 01:05:08 +01:00
016ce6c286 Add 3GX plugin loader (#6172)
* Initial plugin loader support

* More plugin loader progress

* Organize code and more plugin features

* Fix clang-format

* Fix compilation and add android gui

* Fix clang-format

* Fix macos build

* Fix copy-paste bug and clang-format

* More merge fixes

* Make suggestions

* Move global variable to static member

* Fix typo

* Apply suggestions

* Proper initialization order

* Allocate plugin memory from SYSTEM instead of APPLICATION

* Do not mark free pages as RWX

* Fix plugins in old 3DS mode.

* Implement KernelSetState and notif 0x203

* Apply changes

* Remove unused variable

* Fix dynarmic commit

* Sublicense files with MIT License

* Remove non-ascii characters from license
2022-12-11 10:08:58 +02:00
48ee112ceb Add per game configuration options (#6187)
* common: Move settings to common from core.

- Removes a dependency on core and input_common from common.

* code: Wrap settings values

* Port from yuzu to allow per game settings

* citra_qt: Initial per-game settings dialog

* citra_qt: Use new API for read/save of config values

* citra_qt: Per game audio settings

* citra_qt: Per game graphics settings

* citra_qt: Per game system settings

* citra_qt: Per game general settings

* citra_qt: Document and run clang format

* citra_qt: Make icon smaller and centered

* citra_qt: Remove version number

* Not sure how to extract that, can always add it back later

* citra_qt: Wrap UISettings

* citra_qt: Fix unthottled fps setting

* citra_qt: Remove margin in emulation tab

* citra_qt: Implement some suggestions

* Bring back speed switch hotkey

* Allow configuration when game is running

* Rename/adjust UI stuff

* citra_qt: Fix build with separate windows

* citra_qt: Address feedback

* citra_qt: Log per-game settings before launching games

* citra_qt: Add shader cache options

* Also fix android build

* citra_qt: Add DLC menu option

* citra_qt: Run clang-format

* citra_qt: Adjust for time offset

* citra_qt: Implement suggestions

* Run clang-format

Co-authored-by: bunnei <bunneidev@gmail.com>
2022-12-08 13:27:25 +02:00
f261daf2fa Attempt to hotfix Android CI (assume /usr/bin/apksigner is no longer a jar) (#6210) 2022-12-08 07:25:11 +05:30