aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/renderer_vulkan/renderer_vulkan.h
Commit message (Collapse)AuthorAgeFilesLines
* video_core: NVIDIA DLSS through NVIDIA Streamline in place of a game's DLSSDuck91210 hours1-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a Graphics setting, "Use NVIDIA DLSS in place of a game's DLSS" (nvidia_dlss, off by default). When it is on, in Windows builds configured with EGLANTINE_STREAMLINE_SDK, the evaluation Eglantine already replaces with FSR 3.1 goes to NVIDIA DLSS on GeForce RTX cards, with the same inputs (colour, depth, motion vectors, jitter). When DLSS can't run, FSR 3.1 runs as before. Only Streamline's MIT-licensed headers are compiled in; nothing of NVIDIA's is linked or shipped. At run time Eglantine looks for sl.interposer.dll in the user folder's "streamline" folder (or EDEN_STREAMLINE_DIR, or "streamline" next to the executable), checks its Streamline signature and starts Streamline with manual hooking. Streamline's plugins come from that folder or the NVIDIA app's downloads. DLSS itself is nvngx_dlss.dll in the same folder, else the newest DLSS 310 or later that the NVIDIA app has downloaded, checked for NVIDIA's Authenticode signature and copied as streamline/nvidia-app/nvngx_dlss.dll. Like other tools that call DLSS outside a game, it uses its own fixed project id with the custom engine type. - Preset K for all modes (EDEN_NX2_DLSS_PRESET overrides it): the default Performance model (M) and L draw thin dark horizontal lines in some frames at 2x resolution scale; K doesn't. - HDR input with auto exposure; the mode follows the render/output ratio. - Buffer device address stays enabled when DLSS needs it, for DLSS only. - The upscaler waits for the device instead of submitting when it is destroyed: by then the game's channels are released, and a submit read the state tracker's stale flags (a crash when stopping a game). With the setting off, or in builds without the SDK path (the setting is hidden there), nothing changes. Testing: Windows 11, RTX 5080, Fire Emblem: Fortune's Weave docked at 1x (720p -> 1440p) and 2x (1440p -> 2880p), CLI runs and GUI play, stopping and restarting games with DLSS on. Not tested on other GPUs or games. Assisted-by: Claude Opus 5.5 (implementation, debugging) Signed-off-by: Duck912 <350528965+Duck912@users.noreply.github.com>
* [core, hle, video_core, memory] Improve multi-process, display layers, ↵Maufeat2026-08-291-0/+3
| | | | | | | | | | | | | | | | | | | | | dynamic shader cache and rework overlay (#4238) - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md) - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- - Dynamic shader cache reloading capability for qlaunch - Multi-process improvements (thanks to @frank1734), instead of just using the main application we now respect caller process (also did it for HID devices while I was at it) - Layer stack masks & shared buffer screenshot for video core, added different masks (screenshot, recording, etc.) this was discovered as an issue due to how in qlaunch the transition was not right between applications. May not be perfect but also fixes screenshots while using qlaunch - Reworked overlay display management (input and visibility) - instead of random numbers as I've previously did, I decided to add an AppletZIndex enum for better readability. Also split capability of input by touch and gamepad. - etc. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4238 Reviewed-by: Samuel <lizzie@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
* [vulkan, android] Initial implementation of LSFG-VK (#4263)CamilleLaVey2026-08-171-1/+7
| | | | | | | | | | | | | Pretty much self explanatory, own implementation based on LSFG-VK available with some additional reverse engineer work for the actual use of shaders inside Lossless.dll, we don't store/ bundle any tools that bypass security and self ownership: to use this feature is required to own your own copy of Lossless Scaling and I encourage to support developers behind this work. Special thanks: 1.- THS - Original developer behind Lossless Scaling 2.- PancakeTAS - Developer behind LSFG-VK 3.- The Big Smolio The Sleeper (@gidoly) Co-authored-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4263
* [vk] Unify RAII in Vulkan (#2679)Ribbit2025-10-081-7/+3
| | | | | | | | | | | This PR consolidates Vulkan RAII on video_core/vulkan_common/vulkan_wrapper.h’s vk::Handle and remove the unused duplicate src/video_core/vulkan_common/vulkan_raii.h, reducing confusion and maintenance. Swapchain now uses RAII‑managed per‑image semaphores and clears them in Destroy(), providing correct present synchronization and automatic cleanup. Expected result: simpler lifetimes, fewer leak risks, and more stable presentation with negligible overhead. Co-authored-by: Ribbit <ribbit@placeholder.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2679 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Co-authored-by: Ribbit <ribbit@eden-emu.dev> Co-committed-by: Ribbit <ribbit@eden-emu.dev>
* Revert "THIS NEEDS TO BE CHECKED BEFORE MERGE: RAII fix, initial MSAA, some ↵swurl2025-05-191-16/+11
| | | | | | fixes for memory misallocation (#116)" This reverts commit ce5d5d2aff50f9ce8159d609824eb2391bed9ef2.
* THIS NEEDS TO BE CHECKED BEFORE MERGE: RAII fix, initial MSAA, some fixes ↵MrPurple6662025-05-181-11/+16
| | | | | | | | | | | | | | | | | | | | for memory misallocation (#116) • MSAA Fixes: Fixes upload/download for MSAA textures using temporary non-MSAA images. Ensures compatibility with color formats and adds fallbacks for depth/stencil. • Memory fix misallocation: Adds checks for null/zero-length operations in memory management and improves cleanup to avoid crashes (Related to crash issues due to misallocation, RP5 and 865) • Vulkan Initialization (RAII): this almost rewrites the way vulkan initializes to avoid crashes, using a correct order now (thanks @crueter for the initial fix) •Please check before merging: - Test MSAA workflows (especially color/depth transitions and low memory cases). - Verify memory operations (e.g., unmapping zero-length regions). - Check Vulkan object lifetimes and platform-specific behavior. - Check others plataforms beyond android Why is everything in one PR? Otherwise, this is all a big fix, by checking the points above we can create a branch for each one and check them by themselves. I'm not standing still while I'm away, I'm just out of time for now. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/116 Co-authored-by: MrPurple666 <mrpurple666@noreply.localhost> Co-committed-by: MrPurple666 <mrpurple666@noreply.localhost>
* Readd Revert Problematic Commitsedendev2025-05-041-4/+0
|
* revert Remove problematic commitsedendev2025-05-041-0/+4
| | | | revert Remove problematic commits
* Remove problematic commitsMrPurple6662025-05-031-4/+0
|
* Fix some issues in RAIIMrPurple6662025-04-301-3/+3
|
* Initial RAII implementationMrPurple6662025-04-281-0/+10
|
* Revert some wip changesMrPurple6662025-04-281-15/+0
|
* Based on CamilleLaVey code, fix MSAA and Depth StencilMrPurple6662025-04-131-0/+3
|
* feat(video_core): Implement HybridMemory for advanced Vulkan memory managementZephyron2025-04-121-0/+4
| | | | | | | | | | | | | | | | Adds a new cross-platform memory management system with enhanced capabilities: - Fault-managed memory allocation for Linux/Android platforms - Memory snapshot and differential snapshot support - Predictive memory reuse tracking for optimized access patterns - Vulkan compute buffer integration - User-configurable settings for enabling features The system integrates with the existing Vulkan renderer to provide more efficient memory handling, especially for compute-intensive workloads. Co-authored-by: boss.sfc <boss.sfc@citron-emu.org> Co-committed-by: boss.sfc <boss.sfc@citron-emu.org> Signed-off-by: Zephyron <zephyron@citron-emu.org>
* feat(vulkan): implement enhanced texture and shader managementZephyron2025-04-121-0/+15
| | | | | | | | | | | | | | | | This commit adds improved Vulkan functionality to the Citron emulator: - Add thread-safe texture management with automatic error recovery - Implement shader caching with validation support - Add robust error handling for Vulkan operations - Implement platform-specific initialization for Windows, Linux, and Android These enhancements improve stability when handling texture loading errors and provide better recovery mechanisms for Vulkan failures. Co-authored-by: boss.sfc <boss.sfc@citron-emu.org> Co-committed-by: boss.sfc <boss.sfc@citron-emu.org> Signed-off-by: Zephyron <zephyron@citron-emu.org>
* Android: add FRAME_SKIPPING and FRAME_INTERPOLATIONPavel Barabanov2025-04-121-0/+4
|
* Removed telemetry and anonymized SCM (git) stringsdarktux2025-04-041-7/+1
|
* nvnflinger/gpu: implement applet captureLiam2024-02-091-3/+9
|
* nvnflinger/gpu: implement blendingLiam2024-02-091-0/+3
|
* nvnflinger/gpu: implement layer stack compositionLiam2024-01-311-2/+2
|
* renderer_vulkan: implement layer stack compositionLiam2024-01-311-1/+1
|
* renderer_vulkan: split up blit screen resources into separate antialias and ↵Liam2024-01-311-1/+2
| | | | window adapt passes
* video_core: simplify accelerated surface fetch and crop handling between APIsLiam2024-01-311-3/+1
|
* Core: Clang format and other small issues.Fernando Sahmkow2024-01-181-3/+2
|
* SMMU: Initial adaptation to video_core.Fernando Sahmkow2024-01-181-2/+3
|
* vk_present_manager: recreate surface on any surface lossLiam2023-10-021-4/+0
|
* renderer_vulkan: Remove debug reportGPUCode2023-09-081-3/+1
| | | | * VVL has implemented the more modern alternative, thus we don't need to support it anymore
* vulkan: centralize configAlexandre Bouvier2023-08-021-1/+2
|
* renderer_vulkan: Add suport for debug report callbackGPUCode2023-06-271-1/+4
|
* android: renderer_vulkan: Fix crash with surface recreation.bunnei2023-06-031-0/+4
|
* android: native: Add support for custom Vulkan driver loading.bunnei2023-06-031-1/+1
|
* renderer_vulkan: Async presentationGPUCode2023-05-011-0/+2
|
* vulkan: implement 'turbo mode' clock boosterLiam2023-01-041-0/+5
|
* video_core: Replace VKSwapchain with Swapchaingerman772022-06-261-1/+1
|
* video_core: Replace VKScheduler with Schedulergerman772022-06-261-2/+2
|
* video_core: Replace VKBlitScreen with BlitScreengerman772022-06-261-1/+1
|
* general: Convert source file copyright comments over to SPDXMorph2022-04-231-3/+2
| | | | | This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
* video_core: Reduce unused includesameerj2022-03-191-1/+0
|
* renderer_vulkan: Implement screenshotsameerj2021-07-281-0/+2
|
* video_core: Add GPU vendor name to window title barameerj2021-06-201-0/+4
|
* video_core: Reimplement the buffer cacheReinUsesLisp2021-02-131-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Reimplement the buffer cache using cached bindings and page level granularity for modification tracking. This also drops the usage of shared pointers and virtual functions from the cache. - Bindings are cached, allowing to skip work when the game changes few bits between draws. - OpenGL Assembly shaders no longer copy when a region has been modified from the GPU to emulate constant buffers, instead GL_EXT_memory_object is used to alias sub-buffers within the same allocation. - OpenGL Assembly shaders stream constant buffer data using glProgramBufferParametersIuivNV, from NV_parameter_buffer_object. In theory this should save one hash table resolve inside the driver compared to glBufferSubData. - A new OpenGL stream buffer is implemented based on fences for drivers that are not Nvidia's proprietary, due to their low performance on partial glBufferSubData calls synchronized with 3D rendering (that some games use a lot). - Most optimizations are shared between APIs now, allowing Vulkan to cache more bindings than before, skipping unnecesarry work. This commit adds the necessary infrastructure to use Vulkan object from OpenGL. Overall, it improves performance and fixes some bugs present on the old cache. There are still some edge cases hit by some games that harm performance on some vendors, this are planned to be fixed in later commits.
* gpu: Report renderer errors with exceptionsReinUsesLisp2021-02-131-26/+17
| | | | | | Instead of using a two step initialization to report errors, initialize the GPU renderer and rasterizer on the constructor and report errors through std::runtime_error.
* renderer_vulkan: Rename Vulkan memory manager to memory allocatorReinUsesLisp2021-01-151-2/+2
| | | | | "Memory manager" collides with the guest GPU memory manager, and a memory allocator sounds closer to what the abstraction aims to be.
* renderer_vulkan: Rename VKDevice to DeviceReinUsesLisp2021-01-031-2/+2
| | | | | | | The "VK" prefix predates the "Vulkan" namespace. It was carried around the codebase for consistency. "VKDevice" currently is a bad alias with "VkDevice" (only an upcase character of difference) that can cause confusion. Rename all instances of it.
* vulkan_instance: Allow different Vulkan versions and enforce 1.1ReinUsesLisp2020-12-311-1/+0
| | | | | | | For listing the available physical devices we can use Vulkan 1.0. Now that MoltenVK supports 1.1 we can require it for running games. Add missing documentation.
* renderer_vulkan: Remove two step initialization on VKDeviceReinUsesLisp2020-12-311-1/+1
| | | | | The Vulkan device abstraction either initializes successfully on the constructor or throws a Vulkan exception.
* renderer_vulkan: Initialize surface in separate fileReinUsesLisp2020-12-311-2/+0
| | | | | | Move surface initialization code to a separate file. It's unlikely to use this code outside of Vulkan, but keeping platform-specific code (Win32, Xlib, Wayland) in its own translation unit keeps things cleaner.
* renderer_vulkan: Create debug callback on separate file and throwReinUsesLisp2020-12-311-3/+1
| | | | | | | | Initialize debug callbacks (messenger) from a separate file. This allows sharing code with different backends. Change our Vulkan error handling to use exceptions instead of error codes, simplifying the initialization process.
* vulkan_common: Rename renderer_vulkan/wrapper.h to ↵ReinUsesLisp2020-12-311-1/+1
| | | | | | vulkan_common/vulkan_wrapper.h Allows sharing Vulkan wrapper code between different rendering backends.
* video_core: Rewrite the texture cacheReinUsesLisp2020-12-301-2/+1
| | | | | | | | | | | | | | The current texture cache has several points that hurt maintainability and performance. It's easy to break unrelated parts of the cache when doing minor changes. The cache can easily forget valuable information about the cached textures by CPU writes or simply by its normal usage.The current texture cache has several points that hurt maintainability and performance. It's easy to break unrelated parts of the cache when doing minor changes. The cache can easily forget valuable information about the cached textures by CPU writes or simply by its normal usage. This commit aims to address those issues.