Updates the OpenDisplay function in IApplicationDisplayService to properly
validate display names. Instead of only accepting "Default", now validates
against all known valid display names: "Default", "External", "Edid",
"Internal", and "Null".
- Changes log level from WARNING to DEBUG since this is no longer stubbed
- Adds proper validation for all valid display names
- Returns ResultOperationFailed for invalid display names
- Improves logging by including the requested display name
Enhances the Vulkan memory allocator with better OOM handling and memory
alignment:
* Add memory recovery by cleaning up empty allocations before failing
* Implement proper fallback to non-device-local memory
* Simplify memory alignment handling for different vendors
* Add better error logging for allocation failures
* Add IsEmpty() helper to track unused allocations
* Fix alignment requirements for Adreno (4KB) vs other vendors
These changes improve the robustness of memory allocation, particularly
in low-memory situations, and streamline vendor-specific alignment
requirements.
Add workarounds for Samsung Xclipse GPUs:
- Disable extendedDynamicState3ColorBlendEquation as it is broken in Samsung
drivers, similar to AMD drivers
- Add Samsung's proprietary driver to the validated driver list for clock
boosting
- Fix log message to indicate both AMD and Samsung drivers have broken
color blend equation support
Remove stray logical OR operator from validated_driver condition.
- Add Unknown5000 implementation to create duplicate controller interface
- Add new debug-related command handlers:
* OverrideDefaultTargetForDebug (50001)
* SetForceOverrideExternalDeviceNameForDebug (50003)
* ClearForceOverrideExternalDeviceNameForDebug (50004)
- Add proper debug logging for interface creation
- Update header with new function declaration
- Fix missing commas in function registration array
These changes improve the audio controller implementation by
adding support for interface duplication and debug override
functionality. The implementation maintains proper interface
lifetime management using SharedFrom.
Commit from Suyu, looks like Yuzu devs forgot to initialize memory here.
Comment from darktux: I've changed the use of memset to std::fill.
Co-authored-by: Belal Ashraf <nullequal@noreply.localhost>
Reviewed-on: http://y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion/darktux/torzu/pulls/3
Co-authored-by: darktux <darktux@y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion>
Co-committed-by: darktux <darktux@y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion>
- Now the fps follows theme color set in settings
- Added the ability to toggle stats on and off depending on user preference
- Now you are able to change the fps position and add a background behind it for easier reding
New added stats for the overlay are
FPS
FRAMETIME,
SPEED,
APP_RAM_USAGE,
SYSTEM_RAM_USAGE,
BATTERY_TEMPERATURE,
- 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>
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>
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>
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>
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>
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>
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.