Commit Graph

14 Commits

Author SHA1 Message Date
Zephyron
99073c8e19 renderer_vulkan: Add conditional rendering control setting
Adds user option to disable Vulkan conditional rendering, which can fix
flickering objects in some games caused by rapidly toggled draw calls.

Changes:
- Add use_conditional_rendering setting (default: enabled)
- Guard conditional rendering functions with setting check using [[unlikely]]
- Early exit in Pause/Resume and Compare functions when disabled

Disabling this in Graphics (Advanced) fixes flickering at cost of performance.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-10-17 16:47:57 +10:00
Zephyron
568ab699f6 feat(renderer): Add ScaleFX pixel art upscaling filter
Implements ScaleFX algorithm for pixel art upscaling with edge
preservation. Supports both OpenGL and Vulkan with FP16/FP32
variants for hardware optimization.

ScaleFX is designed to reduce pixelation while preserving sharp
edges, ideal for low-resolution and pixel art games.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-10-11 13:35:19 +10:00
Zephyron
0c5c1bbf7f feat(graphics): add 0.25X quarter resolution downscaling
- Add Res1_4X resolution setup with down_shift=2
- Mark as EXPERIMENTAL in UI labels
- Support on both Qt and Android frontends

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-10-11 13:32:27 +10:00
collecting
7a751408a6 feat: Add Lanczos 2025-10-06 02:04:38 +00:00
Zephyron
9090a24c2e feat: add Low GPU Accuracy setting for maximum performance
Implements a new "Low" GPU accuracy level that prioritizes performance
over accuracy by aggressively cutting corners in GPU emulation.

Changes:
- Add GpuAccuracy::Low enum and setting infrastructure
- Implement IsGPULevelNormal() helper function
- Skip texture cache checks and query operations
- Use unsafe memory reads for DMA operations
- Disable fence delays and query precision
- Add UI support for desktop (Qt) and Android

Performance optimizations:
- Skips texture cache coherency checks (vk/gl_rasterizer.cpp)
- Non-blocking query synchronization (query_cache.h)
- Unsafe memory operations (dma_pusher.cpp)
- No macro parameter refresh (maxwell_3d.cpp)
- Immediate fence signaling (fence_manager.h)
- Non-precise Vulkan queries (vk_query_cache.cpp)

Ideal for lower-end hardware and users prioritizing FPS over accuracy.
Works on both desktop and Android platforms.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-10-01 21:45:23 +10:00
Zephyron
274b027668 fix: allow Insane VRAM mode persistence
- Update VRAM setting max value from HighEnd to Insane
- Add TAA translation for UI
- Fixes issue where Insane VRAM reverts to HighEnd

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-09-27 11:48:01 +10:00
Zephyron
6e6b2f438e feat: add High-End and Insane VRAM modes with leak prevention
- Add HighEnd and Insane VRAM usage modes for RTX 4090/4080+ users
- Implement VRAM limits: HighEnd (12GB), Insane (22GB) with scaling
- Optimize buffer allocation with larger chunks for high-end GPUs
- Add VRAM leak detection and aggressive cleanup for Insane mode
- Increase shader compilation buffer sizes for better performance
- Add VRAM monitoring functions to Vulkan rasterizer
- Implement memory usage tracking for staging buffers

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-09-14 16:05:31 +10:00
Zephyron
e27fc65d11 feat: remove frame generation options from all platforms
Frame generation was marked as WIP and not ready for production use.
This commit removes all frame generation related code and UI elements
to prevent users from enabling an incomplete feature.

Changes:
- Remove frame generation settings from Android UI (Kotlin/XML)
- Remove frame generation settings from Desktop UI (Qt/C++)
- Remove frame generation enums and settings from core (C++)
- Remove frame generation Vulkan renderer implementation
- Remove frame generation shader files
- Update CMake build configuration

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-08-17 16:09:05 +10:00
Zephyron
117c467ff3 feat: Add frame generation and enhance UE4 game compatibility
- Add frame generation settings (enabled/disabled, interpolation/extrapolation modes)
- Add frame skipping settings (enabled/disabled, adaptive/fixed modes)
- Implement frame skipping logic with adaptive and fixed modes
- Enhance UE4 crash handling with recovery mechanisms
- Add support for signed and float 32-bit image formats across shader backends
- Update Vulkan Validation Layers to v1.4.321.0
- Fix duplicate frame skipping options in Qt UI
- Improve memory handling for UE4 games (Hogwarts Legacy compatibility)
- Add enhanced bindless texture handling with fallback approach
- Update Android build configuration and dependencies

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-08-05 19:32:28 +10:00
Zephyron
568999fd59 feat: Improve FSR2 UI with dropdown quality mode and conditional FSR sharpness
- Convert FSR2 quality mode from number input to dropdown with 4 options
- Disable and grey out FSR sharpness slider when FSR2 is selected
- Add proper enum-based settings for FSR2 quality modes
- Update both Vulkan and OpenGL FSR2 implementations
- Connect UI state changes automatically

Provides better UX by using appropriate controls and preventing confusion
between FSR 1.0 and FSR 2.0 sharpening options.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-07-29 15:49:05 +10:00
Zephyron
3b8da3d80a feat: Add FSR 2.0 scaling filter option
- Add FSR2 to ScalingFilter enum alongside existing FSR
- Implement FSR2 classes for both Vulkan and OpenGL renderers
- Add fsr2_quality_mode setting with 4 quality levels (Quality, Balanced, Performance, Ultra Performance)
- Integrate FSR2 into present pipeline for both renderers
- Add UI support for FSR2 option in scaling filter dropdown
- Add FSR2 quality mode setting with dropdown selection
- Update translations and Android strings for new options
- Default to Performance mode for optimal balance

This provides users with FSR 2.0 as a scaling option, offering different
quality/performance characteristics compared to FSR 1.0. The implementation
uses quality-based sharpening values and integrates seamlessly with the
existing rendering pipeline.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-07-29 15:21:36 +10:00
Zephyron
fdf1bfc06a feat: Add 10GB, 12GB, 14GB, and 16GB DRAM configuration options
- Extended MemoryLayout enum with new memory size options
- Added corresponding SMC memory size and arrangement constants
- Updated system control functions to handle new memory configurations
- Added appropriate application pool sizes for higher memory modes
- Updated UI translations to display new DRAM options as "Unsafe"
- Increased maximum memory layout setting from 8GB to 16GB

This allows users to configure higher memory amounts for games and
texture mods that require more than the standard 4-8GB configurations.
All new options are marked as "Unsafe" in the UI to indicate they
are experimental features beyond Nintendo's official specifications.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-05-24 17:10:19 +10:00
Zephyron
c5604ced4f feat: Implement 32:9 aspect ratio
This commit introduces support for a 32:9 aspect ratio throughout Citron.

Key changes include:

-   **Enum Updates**: Added `R32_9` to `Settings::AspectRatio` and `Layout::AspectRatio` enums, ensuring consistent integer mapping for casting between them.
-   **Core Logic**:
    -   Modified `UISettings::CalculateWidth` to correctly compute width for the 32:9 ratio.
    -   Updated `Layout::EmulationAspectRatio` to handle the new `R32_9` case and return the appropriate float value (9.0f / 32.0f).
-   **Android Integration**:
    -   Updated `EmulationFragment.kt` and `EmulationActivity.kt` (for Picture-in-Picture) to recognize and apply the 32:9 aspect ratio (mapping setting value `4` to `Rational(32, 9)`).
-   **UI Configuration**:
    -   Added "Force 32:9" to the aspect ratio selection in the graphics settings UI via `shared_translation.cpp`. This string is translatable.

This enhancement allows users to utilize ultra-widescreen 32:9 displays for a more immersive experience.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-05-18 15:10:47 +10:00
Zephyron
bfb82e577c chore: update project branding to citron
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-05-06 16:06:48 +10:00