Commit Graph

27915 Commits

Author SHA1 Message Date
Zephyron
f5b9abc77c Merge pull request 'audio_core: Add Audio Renderer REV12 and REV13 support' (#85) from feature/audio-renderer-rev12-rev13 into main
Reviewed-on: https://git.citron-emu.org/Citron/Emulator/pulls/85
2026-01-03 05:35:02 +00:00
Zephyron
ee95621b47 Merge pull request 'fix(hotkey): unlock framerate hotkey during gameplay' (#84) from fix/ctrl+u into main
Reviewed-on: https://git.citron-emu.org/Citron/Emulator/pulls/84
2026-01-03 05:24:44 +00:00
Collecting
11711f92d9 fix(hotkey): unlock framerate hotkey during gameplay
Signed-off-by: Collecting <collecting@noreply.localhost>
2026-01-03 05:21:08 +00:00
Collecting
0fffc5ced8 fix(hotkey): unlock framerate hotkey during gameplay
Signed-off-by: Collecting <collecting@noreply.localhost>
2026-01-03 05:20:01 +00:00
Collecting
23eb437f5a fix(hotkey): unlock framerate hotkey during gameplay
Signed-off-by: Collecting <collecting@noreply.localhost>
2026-01-03 05:19:13 +00:00
Zephyron
f1dce2578e audio_core: Add Audio Renderer REV12 and REV13 support
Implements support for Audio Renderer revisions 12 and 13, adding:
- REV12: Splitter biquad filter support with fixed-point coefficients
- REV13: Explicit splitter previous volume reset and compressor statistics

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2026-01-03 15:14:44 +10:00
Collecting
d8c343d5ec Merge pull request 'fix(fs): race condition in save mirroring during config changes' (#83) from fix/mirroring into main
Reviewed-on: https://git.citron-emu.org/Citron/Emulator/pulls/83
2026-01-03 04:39:43 +00:00
Collecting
3136d2b782 fix(fs): race condition in save mirroring during config changes
Signed-off-by: Collecting <collecting@noreply.localhost>
2026-01-03 04:38:12 +00:00
Collecting
0b92148362 fix(fs): race condition in save mirroring during config changes
Signed-off-by: Collecting <collecting@noreply.localhost>
2026-01-03 04:36:21 +00:00
Collecting
8d881b6822 fix(fs): race condition in save mirroring during config changes
Signed-off-by: Collecting <collecting@noreply.localhost>
2026-01-03 04:32:44 +00:00
Zephyron
2c398023ea chore: update Vulkan submodules
- Vulkan-Headers: 80207f9da -> 450bd2232
- Vulkan-Utility-Libraries: 524f8910d -> 9a3f4105c
- VulkanMemoryAllocator: 2f382df21 -> e722e57c8

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2026-01-02 17:34:19 +10:00
Collecting
f6b8535bef fix(fs): prevent stack exhaustion in save mirroring recursion
- Moved the copy buffer to the heap via std::make_unique.

- Added explicit null-safety and system shutdown checks to mirroring logic.

- Hardened recursion guards during directory traversal to ensure stability.

Signed-off-by: Collecting <collecting@noreply.localhost>
2026-01-01 21:44:31 +00:00
Zephyron
29e5a963ba revert 1274fcec3b
revert Merge pull request 'feature/texture-component-type-support' (#81) from feature/texture-component-type-support into main

Reviewed-on: https://git.citron-emu.org/Citron/Emulator/pulls/81
2026-01-01 21:33:19 +00:00
Zephyron
bf139d1e7f Merge pull request 'feat(renderer): add CRT shader filter with configurable effects' (#82) from feature/renderer/crt-shader into main
Reviewed-on: https://git.citron-emu.org/Citron/Emulator/pulls/82
2026-01-01 08:23:31 +00:00
Zephyron
efef746299 feat(renderer): add CRT shader filter with configurable effects
Add CRT (Cathode Ray Tube) shader implementation as scaling filter
options (CRT EasyMode and CRT Royale) in the Window Adapting Filter
dropdown. Provides classic TV effects including scanlines, phosphor
masks, curvature distortion, gamma correction, bloom, brightness, and
alpha transparency.

- Add CRTEasyMode and CRTRoyale to ScalingFilter enum
- Implement vulkan_crt_easymode.frag shader with single-pass effects
- Integrate CRT filter into WindowAdaptPass rendering pipeline
- Add configurable CRT parameters to settings with user-friendly labels
- Add UI translations for desktop and Android platforms
- Support CRT push constants in present pipeline

The CRT filter appears alongside other scaling filters like FSR and
FSR 2.0. CRT parameter settings are only active when a CRT filter
is selected.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2026-01-01 18:18:05 +10:00
Zephyron
d8c1cad245 fix(service/nvnflinger): implement GetBufferHistory to prevent game hangs
Return empty buffer history list instead of stubbing to allow games to
proceed past loading screens.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-12-31 16:58:05 +10:00
Zephyron
1274fcec3b Merge pull request 'feature/texture-component-type-support' (#81) from feature/texture-component-type-support into main
Reviewed-on: https://git.citron-emu.org/Citron/Emulator/pulls/81
2025-12-31 06:13:40 +00:00
Zephyron
aaa565203c feat(renderer): add BCn unswizzle shader and build improvements
- Add block_linear_unswizzle_3d_bcn.comp compute shader for BCn format support
- Update host shaders CMakeLists to include new shader

This adds a new compute shader for BCn format handling.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-12-31 16:12:36 +10:00
Zephyron
65daba6179 feat(shader): integrate component type into texture pass optimization
- Update texture descriptor comparison to include component_type
- Add ReadTextureComponentType helper in texture_pass.cpp
- Use component type when creating texture descriptors

This ensures texture descriptors are properly differentiated by component type.

Co-Authored-By: ForrestMarkX <forrestmarkx@outlook.com>
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-12-31 16:10:48 +10:00
Zephyron
f09951331b feat(video-core): update shader environment to support texture component types
- Add ConvertSamplerComponentType conversion function
- Implement ReadTextureComponentType for Graphics/Compute/File environments
- Update Serialize/Deserialize to include texture_component_types
- Cache component types alongside texture types

This enables proper component type caching and serialization.

Co-Authored-By: ForrestMarkX <forrestmarkx@outlook.com>
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-12-31 16:10:06 +10:00
Zephyron
a53408a758 feat(shader): implement texture component type handling in SPIR-V backend
- Add ComponentScalarType helper function
- Update ImageType to use component-specific sampled types
- Add TextureColorResultType and TextureSampleResultToFloat helpers
- Update all texture sampling functions to handle component types correctly
- Add proper type conversions for integer and stencil textures
- Add Flat decorations for integer inputs in fragment shaders
- Add NonWritable decoration for read-only storage buffers

This ensures textures are sampled with the correct component types,
improving accuracy for integer and depth/stencil textures.

Co-Authored-By: ForrestMarkX <forrestmarkx@outlook.com>
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-12-31 16:09:26 +10:00
Zephyron
00421f4ace feat(shader): add SamplerComponentType enum and infrastructure
- Add SamplerComponentType enum to shader_info.h
- Add ReadTextureComponentType to Environment interface
- Add texture_component_types cache to shader environments
- Update texture descriptor to include component_type field

This is the foundation for proper texture component type handling.

Co-Authored-By: ForrestMarkX <forrestmarkx@outlook.com>
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-12-31 16:08:12 +10:00
Zephyron
e166c4aba9 Merge pull request 'video_core: Add ETC2 texture compression format support' (#80) from feature/etc2-texture-compression-support into main
Reviewed-on: https://git.citron-emu.org/Citron/Emulator/pulls/80
2025-12-31 04:57:54 +00:00
Zephyron
db213082e0 Merge pull request 'feat(fs): Cross-Compatible Emulator Save Pathing w/ Custom Save Paths' (#79) from feat/cross-compatible-saves into main
Reviewed-on: https://git.citron-emu.org/Citron/Emulator/pulls/79
2025-12-31 04:36:39 +00:00
Collecting
8aba08322e feat(fs): Cross-Compatible Emulator Save Pathing w/ Custom Save Paths
Signed-off-by: Collecting <collecting@noreply.localhost>
2025-12-31 04:01:30 +00:00
Collecting
43319bde2d feat(fs): Cross-Compatible Emulator Save Pathing w/ Custom Save Paths
Signed-off-by: Collecting <collecting@noreply.localhost>
2025-12-31 04:00:32 +00:00
Collecting
678d6c095f feat(fs): Cross-Compatible Emulator Save Pathing w/ Custom Save Paths
Signed-off-by: Collecting <collecting@noreply.localhost>
2025-12-31 03:59:31 +00:00
Collecting
1ca62a0302 feat(fs): Cross-Compatible Emulator Save Pathing w/ Custom Save Paths
Signed-off-by: Collecting <collecting@noreply.localhost>
2025-12-31 03:58:49 +00:00
Collecting
bbd74891fd feat(fs): Cross-Compatible Emulator Save Pathing w/ Custom Save Paths
Signed-off-by: Collecting <collecting@noreply.localhost>
2025-12-31 03:58:00 +00:00
Collecting
63e48d9191 feat(fs): Cross-Compatible Emulator Save Pathing w/ Custom Save Paths
Signed-off-by: Collecting <collecting@noreply.localhost>
2025-12-31 03:57:15 +00:00
Collecting
4a81f4ff83 feat(fs): Cross-Compatible Emulator Save Pathing w/ Custom Save Paths
Signed-off-by: Collecting <collecting@noreply.localhost>
2025-12-31 03:56:04 +00:00
Collecting
dee84bd8a3 feat(fs): Cross-Compatible Emulator Save Pathing w/ Custom Save Paths
Signed-off-by: Collecting <collecting@noreply.localhost>
2025-12-31 03:55:03 +00:00
Collecting
c377c0c407 feat(fs): Cross-Compatible Emulator Save Pathing w/ Custom Save Paths
Signed-off-by: Collecting <collecting@noreply.localhost>
2025-12-31 03:53:38 +00:00
Collecting
70926d388d feat(fs): Cross-Compatible Emulator Save Pathing w/ Custom Save Paths
Signed-off-by: Collecting <collecting@noreply.localhost>
2025-12-31 03:52:44 +00:00
Collecting
4f4b3a9360 feat(fs): Cross-Compatible Emulator Save Pathing w/ Custom Save Paths
Signed-off-by: Collecting <collecting@noreply.localhost>
2025-12-31 03:51:44 +00:00
Collecting
1820ed7815 feat(fs): Cross-Compatible Emulator Save Pathing w/ Custom Save Paths
Signed-off-by: Collecting <collecting@noreply.localhost>
2025-12-31 03:50:58 +00:00
Collecting
8fbd4661a2 feat(fs): Cross-Compatible Emulator Save Pathing w/ Custom Save Paths
Signed-off-by: Collecting <collecting@noreply.localhost>
2025-12-31 03:49:14 +00:00
Collecting
cc51cc6a12 feat(fs): Cross-Compatible Emulator Save Pathing w/ Custom Save Paths
Signed-off-by: Collecting <collecting@noreply.localhost>
2025-12-31 03:45:23 +00:00
Collecting
de02349e67 feat(fs): Implement Global Custom Save Path
Added a "Global Custom Save Path" configuration option in the Filesystem settings.

Implemented a prioritized save-loading hierarchy: Global Path (if enabled) > Per-Game Custom Path > Default NAND.

Introduced a non-destructive migration tool that allows users to consolidate their existing saves into the new global location.

The migration tool specifically prioritizes per-game custom saves over NAND saves to ensure the most up-to-date data is preserved during consolidation.

The migration process is copy-only; no data is deleted from the source directories, ensuring absolute user data safety.

Maintained compatibility with the existing "Backup Saves to NAND" feature, ensuring saves continue to be mirrored internally if configured.

Signed-off-by: Collecting <collecting@noreply.localhost>
2025-12-29 01:27:19 +00:00
Collecting
2e8d5992a2 feat(fs): Implement Global Custom Save Path
Added a "Global Custom Save Path" configuration option in the Filesystem settings.

Implemented a prioritized save-loading hierarchy: Global Path (if enabled) > Per-Game Custom Path > Default NAND.

Introduced a non-destructive migration tool that allows users to consolidate their existing saves into the new global location.

The migration tool specifically prioritizes per-game custom saves over NAND saves to ensure the most up-to-date data is preserved during consolidation.

The migration process is copy-only; no data is deleted from the source directories, ensuring absolute user data safety.

Maintained compatibility with the existing "Backup Saves to NAND" feature, ensuring saves continue to be mirrored internally if configured.

Signed-off-by: Collecting <collecting@noreply.localhost>
2025-12-29 01:12:50 +00:00
Collecting
e7d0bf1af5 feat(fs): Implement Global Custom Save Path
Added a "Global Custom Save Path" configuration option in the Filesystem settings.

Implemented a prioritized save-loading hierarchy: Global Path (if enabled) > Per-Game Custom Path > Default NAND.

Introduced a non-destructive migration tool that allows users to consolidate their existing saves into the new global location.

The migration tool specifically prioritizes per-game custom saves over NAND saves to ensure the most up-to-date data is preserved during consolidation.

The migration process is copy-only; no data is deleted from the source directories, ensuring absolute user data safety.

Maintained compatibility with the existing "Backup Saves to NAND" feature, ensuring saves continue to be mirrored internally if configured.

Signed-off-by: Collecting <collecting@noreply.localhost>
2025-12-29 01:11:29 +00:00
Collecting
7b0c92f621 feat(fs): Implement Global Custom Save Path
Added a "Global Custom Save Path" configuration option in the Filesystem settings.

Implemented a prioritized save-loading hierarchy: Global Path (if enabled) > Per-Game Custom Path > Default NAND.

Introduced a non-destructive migration tool that allows users to consolidate their existing saves into the new global location.

The migration tool specifically prioritizes per-game custom saves over NAND saves to ensure the most up-to-date data is preserved during consolidation.

The migration process is copy-only; no data is deleted from the source directories, ensuring absolute user data safety.

Maintained compatibility with the existing "Backup Saves to NAND" feature, ensuring saves continue to be mirrored internally if configured.

Signed-off-by: Collecting <collecting@noreply.localhost>
2025-12-29 01:10:51 +00:00
Collecting
3cc5277295 feat(fs): Implement Global Custom Save Path
Added a "Global Custom Save Path" configuration option in the Filesystem settings.

Implemented a prioritized save-loading hierarchy: Global Path (if enabled) > Per-Game Custom Path > Default NAND.

Introduced a non-destructive migration tool that allows users to consolidate their existing saves into the new global location.

The migration tool specifically prioritizes per-game custom saves over NAND saves to ensure the most up-to-date data is preserved during consolidation.

The migration process is copy-only; no data is deleted from the source directories, ensuring absolute user data safety.

Maintained compatibility with the existing "Backup Saves to NAND" feature, ensuring saves continue to be mirrored internally if configured.

Signed-off-by: Collecting <collecting@noreply.localhost>
2025-12-29 01:10:07 +00:00
Collecting
9c6572e0cc feat(fs): Implement Global Custom Save Path
Added a "Global Custom Save Path" configuration option in the Filesystem settings.

Implemented a prioritized save-loading hierarchy: Global Path (if enabled) > Per-Game Custom Path > Default NAND.

Introduced a non-destructive migration tool that allows users to consolidate their existing saves into the new global location.

The migration tool specifically prioritizes per-game custom saves over NAND saves to ensure the most up-to-date data is preserved during consolidation.

The migration process is copy-only; no data is deleted from the source directories, ensuring absolute user data safety.

Maintained compatibility with the existing "Backup Saves to NAND" feature, ensuring saves continue to be mirrored internally if configured.

Signed-off-by: Collecting <collecting@noreply.localhost>
2025-12-29 01:09:20 +00:00
Collecting
a38074c89c revert 989049df07
needs a branch with more work to be done, partial inlining that is invisible to performance (5kb which is nothing), PGO + BOLT optimization path yielding better results regardless
2025-12-28 22:33:24 +00:00
Collecting
b8424f9057 revert 9ea0a36fc6
needs a branch with more work to be done, partial inlining that is invisible to performance (5kb which is nothing), PGO + BOLT optimization path yielding better results regardless
2025-12-28 22:32:56 +00:00
Collecting
989049df07 video_core: Optimize CDmaPusher command execution and logging
Force inlining of the ExecuteCommand function to reduce CPU overhead in the GPU command processing hot path. Additionally, silence debug logging metadata within the function to prevent string-processing logic from blocking compiler optimizations. Includes safe guards for multi-compiler and cross-platform compatibility.

Signed-off-by: Collecting <collecting@noreply.localhost>
2025-12-28 19:09:08 +00:00
Collecting
9ea0a36fc6 video_core: Force inlining of BCn decoder functions
Apply aggressive inlining attributes to BCn decoding logic to eliminate function call overhead during texture decompression. This allows the compiler to better analyze loops for vectorization. Includes portability guards to ensure compatibility across Clang, GCC, and MSVC.

Signed-off-by: Collecting <collecting@noreply.localhost>
2025-12-28 19:07:41 +00:00
Zephyron
c5f35b0712 fix(video_core/vulkan): remove alpha_to_coverage_enabled to fix black square artifacts
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-12-28 15:32:01 +10:00
Zephyron
855a38ee97 video_core: Add ETC2 texture compression format support
Adds comprehensive support for ETC2 compressed texture formats (ETC2_RGB,
ETC2_RGBA, ETC2_RGB_PTA) in both UNORM and SRGB variants. This addresses
rendering issues in games like Hogwarts Legacy that use these formats.

Changes:
- Add ETC2 texture format enums (TextureFormat::ETC2_RGB_SRGB,
  ETC2_RGBA_SRGB) and component types (SNORM_FORCE_FP16, UNORM_FORCE_FP16)
- Implement format lookup mappings for all ETC2 variants in
  format_lookup_table.cpp
- Add PixelFormat enum values and block size tables for ETC2 formats
- Integrate ETC2 support into Vulkan backend with proper VkFormat mappings
- Add IsOptimalEtc2Supported() device capability check
- Update texture cache to handle ETC2 format conversion when needed
- Add ETC2 format cases to PixelFormat formatter for logging
- Improve shader environment texture handle validation with graceful
  fallback for invalid handles

Fixes assertion failures for texture formats 90 and 99, enabling proper
rendering of ETC2 compressed textures using native Vulkan support.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-12-28 11:57:18 +10:00