Commit Graph

27308 Commits

Author SHA1 Message Date
Zephyron 777111dfb4 feat(video_core): Fix Linux compilation issues in Hybrid Memory Manager
- Added missing <thread> header for std::thread usage
- Added <fcntl.h> for O_CLOEXEC and O_NONBLOCK definitions
- Fixed struct initialization order in uffdio_copy to match declaration order

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-04-12 23:42:39 -03:00
Zephyron 34693001aa Add Windows support to Hybrid Memory Manager
This commit adds Windows-specific implementation of the fault-managed memory
system, providing similar functionality to the existing Linux/Android implementation.

Key changes:
- Added Windows-specific memory management using VirtualAlloc/VirtualFree
- Implemented Windows vectored exception handler for page fault handling
- Added proper memory protection and page fault handling on Windows
- Updated memory snapshot functionality to work on Windows
- Added proper cleanup of Windows-specific resources
- Fixed type conversion issues in memory management code
- Added proper error handling for Windows memory operations
- Fixed VRAM Memory Layout Mode to allow up to 12Gb

The implementation uses Windows-specific APIs:
- VirtualAlloc/VirtualFree for memory management
- AddVectoredExceptionHandler for page fault handling
- VirtualProtect for memory protection management

This change maintains feature parity with the Linux/Android implementation
while using Windows-native APIs for better performance and reliability.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-04-12 23:42:24 -03:00
Zephyron 9615e910f9 feat(video_core): Implement HybridMemory for advanced Vulkan memory management
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>
2025-04-12 23:41:26 -03:00
Zephyron 0c5659a198 video_core: Enhance Vulkan shader compilation with async threading system
Implement a robust asynchronous shader compilation system inspired by commit
1fd5fefcb17fe7fe65faed1c991fb41db782ab0f. This enhancement provides:

- True multi-threaded shader compilation with atomic status tracking
- Persistent disk caching for faster shader loading
- Command queue system for background processing
- Integration with Citron's scheduler for better resource management
- Parallel shader loading to reduce startup times
- Improved error handling and recovery mechanisms

These changes significantly reduce shader compilation stuttering and improve
overall performance when using asynchronous shaders. The implementation
maintains compatibility with Citron's existing architecture while adding
more robust threading capabilities.

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>
2025-04-12 23:39:24 -03:00
Zephyron b550c6e3cc feat(vulkan): implement enhanced texture and shader management
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>
2025-04-12 23:39:19 -03:00
Zephyron 991770b84f build: fix linux compilation
- Removes unnecessary \ from Copyright Line Causing Linux Builds To Fail

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-04-12 23:37:27 -03:00
Zephyron c57a5fef92 WIP: Enhance shader compilation performance and control
This commit adds new settings and optimizations for shader compilation:

- Add new settings:
  - use_enhanced_shader_building: Enable enhanced shader compilation
  - shader_compilation_priority: Control shader compilation priority

- Improve shader compilation performance:
  - Optimize worker thread allocation based on CPU cores
  - Add smarter async shader compilation heuristics
  - Prioritize vertex and fragment shader compilation
  - Add performance tracking and logging

- Add performance monitoring:
  - Track shader compilation times
  - Log slow shader compilations
  - Monitor async shader compilation statistics

This is a work in progress commit. Further optimizations and refinements
will be needed based on testing and feedback.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-04-12 23:37:11 -03:00
JPikachu bc86307ad6 Service: Add AliasRegionExtraSize
Thanks to Briar for finding and testing the Service
Credit: Antique - [Sudachi] Dev (https://sudachi.emuplace.app/)
2025-04-12 22:54:32 -03:00
MrPurple666 be4bc3b477 WIP: DO-NOT-MERGE: NCE experiments: Better Pre-Fetch implementation
should make it more performatic as in use with new lru cache implmentation
2025-04-12 22:54:32 -03:00
MrPurple666 739e5c47ea WIP: DO-NOT-MERGE: NCE experiments: Better LRU cache implementation
It uses a better lru implementation, since initial as basic functions to LRU, use a modern system to it to make performance better
2025-04-12 22:54:32 -03:00
MrPurple666 ce1a1912ae RenderVulkan Experiments: DO-NOT-MERGE: Only recreate when necessary and NEAREST 2025-04-12 22:54:32 -03:00
MrPurple666 2a793d610d RenderVulkan Experiments: DO-NOT-MERGE: Introduce functionality to frame interpolation
The functionality acts much more like a real-time downscale since the FSR1 used by Yuzu is not compatible with a real interpolation and is just upscale and downscale.
2025-04-12 22:54:32 -03:00
Pavel Barabanov 38737f26e5 Optimize SpiriV output 2025-04-12 22:54:32 -03:00
Pavel Barabanov bd2f935c4d delete "enable" in setting.h 2025-04-12 22:54:32 -03:00
Pavel Barabanov be2e838f0d FRAME_SKIPPING and FRAME_INTERPOLATION only android and delete "enable" 2025-04-12 22:54:32 -03:00
Pavel Barabanov 70c2439d8c Add sync core speed 2025-04-12 22:54:32 -03:00
Pavel Barabanov d25bea5762 Android: add FRAME_SKIPPING and FRAME_INTERPOLATION 2025-04-12 22:54:32 -03:00
MrPurple666 f9f311c014 Revert "Merge branch 'pr-12'"
This reverts commit dfe104bbb96b52f47943462c296ecbcb046dffdf, reversing
changes made to 45683a4034.
2025-04-12 22:54:32 -03:00
JPikachu d27d31e042 Add named .svg icons 2025-04-13 01:24:40 +00:00
JPikachu 9490fe4c1a Update README.md
Add named logo and remove Yuzu fully
2025-04-13 01:09:20 +00:00
JPikachu de16da9c9f Merge pull request 'Update names in icons and add more' (#23) from JPikachu/eden:master into master
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/23
2025-04-13 01:04:27 +00:00
JPikachu d4ad6a551d Add eden named icons (.ico and .png)
.svg soon
2025-04-13 01:55:31 +01:00
JPikachu 61d4233228 Rename Yuzu logo to Eden 2025-04-13 01:15:36 +01:00
swurl 0704ae7108 upload-artifact
Signed-off-by: swurl <swurl@swurl.xyz>
2025-04-12 19:27:59 -04:00
swurl 701186c995 actions?
Signed-off-by: swurl <swurl@swurl.xyz>
2025-04-12 19:25:56 -04:00
JPikachu 50ac5e935a Update README.md
(again)
2025-04-12 17:05:56 +00:00
JPikachu d29d7b931c Update README.md 2025-04-12 16:18:43 +00:00
JPikachu d88d690a4e Merge pull request 'Service: Add AliasRegionExtraSize' (#22) from JPikachu/eden:master into master
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/22
2025-04-12 15:33:38 +00:00
JPikachu e0795f2b40 Service: Add AliasRegionExtraSize
Thanks to Briar for finding and testing the Service
Credit: Antique - [Sudachi] Dev (https://sudachi.emuplace.app/)
2025-04-12 16:23:47 +01:00
JPikachu a6c9177ad1 Implement additions to nvdr services
Fixes log error: "[  41.472933] Debug <Critical> core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp:operator():81: Assertion Failed! Unimplemented ioctl=C0084713"

Credit: Antique - Sudachi dev, for the base Implementation and Citron for slight additions.
2025-04-11 17:48:09 -03:00
CamilleLaVey 0d031e2f3f Merge pull request 'switch submodules to our forks' (#21) from crueter/eden:submodules into master
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/21
2025-04-11 20:22:06 +00:00
Zephyron 45683a4034 video_core/vulkan: Improve texture format conversion handling
Refactors and improves the texture format conversion system in the Vulkan
renderer:

- Adds proper sRGB to linear conversion for depth formats
- Improves shader accuracy for ABGR8 SRGB to D24S8 conversion
- Adds gamma correction and proper depth range clamping
- Moves GetSupportedFormat implementation to header
- Cleans up format conversion switch statement
- Removes redundant format conversion paths

The changes improve accuracy when converting between color and depth
formats, particularly for sRGB sources. The shader improvements ensure
proper gamma correction and depth range handling.

Technical changes:
- Improves sRGB to linear conversion in fragment shader
- Adds proper depth value clamping
- Consolidates format conversion logic
- Removes duplicate GetSupportedFormat implementation
2025-04-11 17:05:41 -03:00
Zephyron 3e835ac3aa video_core: Add new shader format conversion pipelines
Adds several new shader-based format conversion pipelines to support additional
texture formats and operations:

- RGBA8 to BGRA8 conversion
- YUV420/RGB conversions
- BC7 to RGBA8 decompression
- ASTC HDR to RGBA16F decompression
- RGBA16F to RGBA8 conversion
- Temporal dithering
- Dynamic resolution scaling

Updates the texture cache runtime to handle these new conversion paths and adds
helper functions to check format compatibility for dithering and scaling
operations.

The changes include:
- New shader files and CMake entries
- Additional conversion pipeline setup in BlitImageHelper
- Extended format conversion logic in TextureCacheRuntime
- New format compatibility check helpers
2025-04-11 17:05:30 -03:00
Zephyron 5cb3153f15 video_core: Add sRGB to D24S8 depth-stencil conversion support
Implements conversion from sRGB color formats to D24S8 depth-stencil format
in the Vulkan renderer. This change includes:

- New fragment shader convert_abgr8_srgb_to_d24s8.frag that handles proper
  sRGB to linear conversion before depth calculation
- Added shader to CMake build system
- Extended BlitImageHelper with new conversion pipeline and methods
- Updated texture cache to handle sRGB to D24S8 format conversion paths

The conversion properly handles sRGB color space by first converting to
linear space before calculating luminance values for the depth component,
while preserving alpha channel data for the stencil component.
2025-04-11 17:05:20 -03:00
MrPurple666 3d43fecece WIP: DO-NOT-MERGE: NCE experiments: Initial LRU 2025-04-11 17:05:06 -03:00
MrPurple666 27ceda2c6c WIP: DO-NOT-MERGE: NCE experiments: Fix build errors 2025-04-11 17:04:55 -03:00
MrPurple666 777b674edf WIP: DO-NOT-MERGE: NCE experiments: Some optimizations on pre-fetch and cache 2025-04-11 17:04:45 -03:00
MrPurple666 d36031849e WIP: DO-NOT-MERGE: NCE experiments: Ensure guest context reflects thread state during unlock 2025-04-11 17:04:34 -03:00
MrPurple666 d621707001 WIP: DO-NOT-MERGE: NCE experiments
botw boots but with poor performance
2025-04-11 17:04:24 -03:00
swurl dbb485b09a switch submodules to our forks
Signed-off-by: swurl <swurl@swurl.xyz>
2025-04-11 14:46:05 -04:00
JPikachu 4957950b55 revert 789bbd7ab5
This needs to be put aside for now, but may be implemented again later
2025-04-10 03:45:51 +00:00
crueter 9278eac8f0 Fix controls config dialog
Signed-off-by: swurl <swurl@swurl.xyz>
2025-04-10 02:38:34 +02:00
crueter 9cef9f5dce Update fmt to allow for v11
Signed-off-by: swurl <swurl@swurl.xyz>
2025-04-10 01:11:22 +02:00
Briar 216ded6997 android: Improve network gateway handling 2025-04-10 00:40:07 +02:00
PabloMK7 5f0542c2bf Pre alpha watermark
* android: Add pre-alpha warning dialog and banner

* qt: android: Add pre-alpha warning banner
2025-04-10 00:18:18 +02:00
Briar 077592903e core: Add support for game settings overrides (#6)
* core: Add support for game settings overrides
---------

Co-authored-by: Gamer64 <76565986+Gamer64ytb@users.noreply.github.com>
Co-authored-by: zhang wei <zwdreams@gmail.com>
2025-04-09 23:44:33 +02:00
Briar 8ef4da686c Refactor Android Game Screen UI
* Port SearchFragment functionality to GameFragment @kleidis

Co-authored-by: Briar <205427297+icybriarr@users.noreply.github.com>

* Remove the bottom navigation bar and SearchFragment remaining code @ishan09811

* Add 2 new game view types `Grid & `List` to GameAdapter @kleidis

* Fix padding on header

* Change app name to uppercase

---------

Co-authored-by: Kleidis <167202775+kleidis@users.noreply.github.com>
Co-authored-by: Briar <205427297+icybriarr@users.noreply.github.com>
Co-authored-by: Ishan09811 <156402647+Ishan09811@users.noreply.github.com>
2025-04-09 00:01:32 +02:00
JPikachu 52eab40fc8 Implement LogicOP Workaround for Vulkan on AMD GPUs
This fixes black sewers in Paper Mario: TTYD
Credit: Antique - [Sudachi] Dev (https://sudachi.emuplace.app/)
2025-04-08 19:17:28 +02:00
Briar 6f45ab5344 Revert "Disabled MCO_USE_VMEM_ALLOCATOR because standard stack size seems to suffice"
This reverts commit ada5dcf01a.
2025-04-06 22:52:55 -03:00
Mr_Purple_666 90bda9fee5 Use u32 instead of int
fix windows build error
2025-04-04 03:40:50 +02:00