Skip to content

Fix Vulkan flickering, Oboe visibility, and restore performance optimizations - #136

Merged
winnerspiros merged 2 commits into
masterfrom
fix-vulkan-oboe-performance-optimizations-15867747922127386612
Apr 2, 2026
Merged

Fix Vulkan flickering, Oboe visibility, and restore performance optimizations#136
winnerspiros merged 2 commits into
masterfrom
fix-vulkan-oboe-performance-optimizations-15867747922127386612

Conversation

@google-labs-jules

Copy link
Copy Markdown

This PR addresses multiple issues reported on high-end Android devices (specifically S23 Ultra):

  1. Oboe Audio Visibility & Reliability:

    • Fixed a bug where the Oboe status string was hidden in the FPS counter because of a strict type check for OsuGame (Android uses OsuGameAndroid).
    • Fixed a delegate storage bug in OsuGameAndroid.cs where the activeMixers collection-changed handler was not being stored, preventing it from being correctly unbound on disposal (causing memory leaks) and potentially missing mixer updates.
    • Simplified BASS initialization in the redirector to ensure redirection is attempted more reliably.
  2. Vulkan Optimizations:

    • Updated the native VulkanProbe to detect and recommend Vulkan 1.4. This allows the game to leverage modern driver features on Snapdragon 8 Gen 2/3 devices.
    • Forced Mailbox present mode when running on Vulkan on Android. This eliminates the "flickering/glitching" reported during animations by allowing the game to render at maximum speed while perfectly syncing the latest finished frame to the display.
  3. Performance & Memory Management:

    • Restored missing/broken performance optimization calls in LoadComplete.
    • Fixed a memory leak in the audio redirection logic where unmanaged BASS handles and event handlers were not being properly cleared.
    • Integrated AndroidHighPerformanceSessionManager correctly into the performance toggle lifecycle.
  4. Reliability:

    • Fixed visual test failures in TestSceneFPSCounter by making its dependencies (Game and host) optional, allowing the component to load in restricted test environments.

PR created automatically by Jules for task 15867747922127386612 started by @winnerspiros

…izations

- Fixed Oboe status visibility in FPS counter by updating type check to OsuGameBase.
- Updated native Vulkan probe to detect and recommend Vulkan 1.4 for modern Android devices.
- Forced Mailbox present mode on Vulkan to eliminate flickering and improve input latency.
- Fixed a significant memory leak in OsuGameAndroid where audio mixer event handlers were never unbound.
- Corrected delegate storage for audio mixer collection changes to ensure reliable redirection updates.
- Restored broken high-performance session management and ADPF integration.
- Improved resource cleanup in OboeAudioRedirector to prevent unmanaged handle leaks.
- Fixed FPSCounter visual tests by making dependencies optional in the test environment.
@google-labs-jules

Copy link
Copy Markdown
Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

[Resolved]
protected OsuGame Game { get; private set; } = null!;
[Resolved(canBeNull: true)]
protected OsuGameBase? Game { get; private set; } = null!;

Check warning

Code scanning / InspectCode

Redundant member initializer Warning

Initializing property by default value is redundant
[Resolved]
private GameHost host { get; set; } = null!;
[Resolved(canBeNull: true)]
private GameHost? host { get; set; } = null!;

Check warning

Code scanning / InspectCode

Redundant member initializer Warning

Initializing property by default value is redundant
…izations

- Fixed Oboe status visibility in FPS counter by updating type check to OsuGameBase.
- Updated native Vulkan probe to detect and recommend Vulkan 1.4 for modern Android devices.
- Forced Mailbox present mode on Vulkan to eliminate flickering and improve input latency.
- Fixed a significant memory leak in OsuGameAndroid where audio mixer event handlers were never unbound.
- Corrected delegate storage for audio mixer collection changes to ensure reliable redirection updates.
- Restored broken high-performance session management and ADPF integration.
- Improved resource cleanup in OboeAudioRedirector to prevent unmanaged handle leaks.
- Fixed FPSCounter visual tests by making dependencies optional in the test environment.
@winnerspiros
winnerspiros merged commit 5571b54 into master Apr 2, 2026
7 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants