Adds missing include for common/logging/log.h in gpu.h which was causing
compilation failures on Android. This header is needed for logging
functionality used in GPU-related operations.
The include was previously indirectly available through other headers,
but making it explicit improves code clarity and prevents potential
future compilation issues.
Reverts overly restrictive storage buffer validation and size calculation
that was causing rendering issues in The Legend of Zelda: Tears of the
Kingdom, particularly in underground/depth areas. The simplified approach:
- Uses GetMemoryLayoutSize() instead of manual page probing
- Removes unnecessary 4GB memory bounds validation
- Streamlines address translation and alignment handling
This fixes numerous reported cases of missing or corrupted rendering in
TOTK's underground areas where storage buffer operations are heavily used
for depth-related effects.
Relaxes validation checks in the NVDRV GPU service and improves error notifier
handling to prevent potential hangs. Key changes:
- Remove strict size validation in SetErrorNotifier
- Relax GPFIFO entry count validation to only check for non-zero values
- Add proper error notifier state tracking in GPU class
- Improve debug logging messages
The previous strict validation was causing issues with some games like ACNH.
These changes maintain necessary checks while being more permissive with
edge cases that don't impact functionality.
Technical changes:
- Store error notifier state in GPU class for future implementation
- Remove upper bound check on GPFIFO entries
- Simplify error notifier setup flow
This should resolve hanging issues while maintaining core functionality.
Implements several previously stubbed functions in the NVDRV service:
- Initialize proper transfer memory handling
- Add error notifier configuration
- Implement channel timeout and timeslice management
- Add object context allocation and tracking
- Add GPU interface stubs for new functionality
The changes improve the accuracy of GPU-related operations while maintaining
compatibility with the existing codebase. All functions now properly validate
parameters and handle endianness correctly using _le types.
Two main changes in this commit:
1. Replace NVIDIA-specific GL_NV_gpu_shader5 extension with the more widely
supported GL_EXT_shader_explicit_arithmetic_types_float16 in the scaleforce
shader. This improves compatibility across different GPU vendors.
2. Refactor ARM32 exception handling:
- Restructure exception cases for better readability
- Update exception handling to match current Dynarmic API
- Fix indentation in switch statement
- Remove AccessViolation case as it's no longer supported in current API
These changes improve shader compatibility and align the exception handling
with the current Dynarmic implementation.
- In commit b3facaa6bb, the copyright header was
updated to include "Citron Homebrew Project" across multiple files, regardless
of whether any contributions were made.
- This commit removes the incorrect attribution and reverts the copyright header
to its previous state.
- Copyright attribution should only be added when meaningful contributions have
been made to the file.
- This commit ensures proper compliance with copyright standards and maintains
correct attribution to the respective contributors.
- Special thanks to Tachi for pointing out the need for these corrections and
ensuring that proper attribution practices are followed.
- Update Gradle from 8.1 to 8.10.2
- Update Android Gradle Plugin from 8.1.2 to 8.8.0
- Update Kotlin from 1.9.20 to 2.1.20-Beta1
- Update various AndroidX dependencies to latest versions
- Update NDK from 26.1 to 27.2 (with RC1/RC2 options commented)
- Update Java target from 17 to 21
- Update Android target SDK from 34 to 35
- Enable additional optimizations in release builds:
- Enable shrinkResources
- Use proguard-android-optimize.txt
- Disable JNI debugging
- Replace vector drawables with PNG for ic_citron
- Comment out unused ComputeInline constant in dma_pusher.cpp
- Update Gradle wrapper and configuration files
This updates the Android build system and dependencies to their latest
versions while enabling additional optimizations for release builds.
The ic_citron icon was converted from vector to PNG format for better
compatibility.
Previously, the code would unconditionally add a constant buffer descriptor
at index 0 whenever storage buffers were present, which could cause conflicts
and crashes. This change:
- Adds validation to check if constant buffer 0 already exists
- Only adds the descriptor if it's not already present
- Prevents potential descriptor conflicts in shaders
This should resolve crashes in Vulkan games related to invalid descriptor
layouts and resource binding conflicts.
Add support for bindless texture constant buffers in the compute pipeline
creation process. When storage buffer descriptors are present, create a
constant buffer descriptor to handle bindless textures. This fixes the
"Failed to track bindless texture constant buffer" error.
Changes:
- Add constant buffer descriptor with index 0 and count 1 when storage
buffers are present
- Place descriptor creation before SPIR-V code generation to ensure proper
shader compilation
This resolves issues with bindless texture access in compute shaders.
Fixes the StorageBufferBinding function to properly handle memory validation
and size detection. Key changes include:
- Fix ReadBlock usage to properly handle void return values
- Implement safer memory validation using byte-level reads
- Improve size detection logic for storage buffers
- Fix NVN buffer size reading
- Add proper bounds checking for device memory addresses
- Add better error logging for invalid conditions
This addresses the "Failed to find storage buffer for cbuf index 0" errors
by implementing more robust memory validation and size detection. The changes
ensure proper handling of invalid memory addresses and prevent crashes from
accessing out-of-bounds memory.
- Modify DmaPusher to use safe memory reads when handling compute
operations at High GPU accuracy
- Prevent potential memory corruption issues that could lead to
invalid dispatch parameters
- Previously, unsafe reads could result in corrupted launch_description
data in KeplerCompute::ProcessLaunch, causing invalid vkCmdDispatch
calls
- By enforcing safe reads specifically for compute operations, we
maintain performance for other GPU tasks while ensuring compute
dispatch stability
This change requires >= High GPU accuracy level to take effect.