Commit Graph

27898 Commits

Author SHA1 Message Date
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
Collecting
2028150ebf fix: Strict Clang Rule
Signed-off-by: Collecting <collecting@noreply.localhost>
2025-12-26 22:47:40 +00:00
Collecting
8506c7c394 fix: Strict Clang Rule
Signed-off-by: Collecting <collecting@noreply.localhost>
2025-12-26 22:46:50 +00:00
Collecting
499a82d3fd fix: Strict Clang Rule
Signed-off-by: Collecting <collecting@noreply.localhost>
2025-12-26 22:45:59 +00:00
Collecting
273e9b18e7 fix: Clang PGO Linux Filepath Naming
Signed-off-by: Collecting <collecting@noreply.localhost>
2025-12-26 18:29:48 +00:00
Zephyron
01c0420481 chore(version): bump to 0.12.25
Signed-off-by: Zephyron <zephyron@citron-emu.org>
0.12.25
2025-12-26 17:03:11 +10:00
Zephyron
cc60303b11 feat(core): Update HOS and NintendoSDK version constants
- Bumps HOS version from 20.1.5 to 21.0.0
- Updates the corresponding `VERSION_HASH`, `DISPLAY_VERSION`, and
  `DISPLAY_TITLE` strings.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-12-26 17:02:15 +10:00
Zephyron
ba7141c8ee Merge pull request 'fix/network-zstd-packet-handling' (#77) from fix/network-zstd-packet-handling into main
Reviewed-on: https://git.citron-emu.org/Citron/Emulator/pulls/77
2025-12-26 06:55:01 +00:00
Zephyron
aad942cf25 fix(network): revert to legacy packet format for emulator compatibility
Remove the 'reliable' boolean field from LDNPacket and ProxyPacket
structs and all associated serialization/deserialization logic.
All packets now use reliable delivery by default via ENet layer,
matching the legacy format for full backward compatibility.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-12-26 16:54:31 +10:00
Zephyron
14c97aebb7 fix(ldn): improve packet validation and debug logging
- Add size validation before memcpy for Connect/Disconnect packets
- Allow empty data for Scan packets (Type 0) which have no payload
- Add debug logging for ScanResp packets including BSSID and results
- Fix MacAddress indexing to use .raw[] instead of [] operator

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-12-26 16:53:26 +10:00
Zephyron
499b3c1a59 fix(fatal): handle unknown error module 359 gracefully
Handle error 2359-2618 (module 359, description 2618) gracefully
by logging a warning instead of crashing, similar to module 56.
This allows games like SSBU to continue execution when encountering
this error code.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-12-26 16:52:33 +10:00
Zephyron
38d4152021 fix(network): improve ZSTD compression/decompression error handling
- Add error checking after decompression to drop corrupted packets
- Add error checking after compression to prevent sending empty packets
- Allow ZSTD_CONTENTSIZE_UNKNOWN and use streaming decompression
- Only reject ZSTD_CONTENTSIZE_ERROR as a fatal error

Fixes network connectivity issues where corrupted/empty packets were
being processed, breaking the network protocol.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-12-26 16:51:33 +10:00
Zephyron
ab4d2a7f32 Merge pull request 'feat(ui): RGB Mode' (#75) from feat/rgb-mode into main
Reviewed-on: https://git.citron-emu.org/Citron/Emulator/pulls/75
2025-12-23 21:25:55 +00:00
Collecting
9bb2cf9c30 feat(ui): RGB Mode
Signed-off-by: Collecting <collecting@noreply.localhost>
2025-12-23 19:38:46 +00:00
Collecting
36c915f2b7 feat(ui): RGB Mode
Signed-off-by: Collecting <collecting@noreply.localhost>
2025-12-23 19:38:17 +00:00
Collecting
8aa2783c2f feat(ui): RGB Mode
Signed-off-by: Collecting <collecting@noreply.localhost>
2025-12-23 19:37:39 +00:00
Collecting
55adf62c86 feat(ui): RGB Mode
Signed-off-by: Collecting <collecting@noreply.localhost>
2025-12-23 19:37:13 +00:00
Collecting
64dbf5ad67 feat(ui): RGB Mode
Signed-off-by: Collecting <collecting@noreply.localhost>
2025-12-23 19:36:32 +00:00