Skip to content

Merge ppy/master + bump framework to winnerspiros 2026.527.1 - #359

Merged
winnerspiros merged 4 commits into
masterfrom
copilot/fix-vulkan-black-screen-another-one
May 27, 2026
Merged

Merge ppy/master + bump framework to winnerspiros 2026.527.1#359
winnerspiros merged 4 commits into
masterfrom
copilot/fix-vulkan-black-screen-another-one

Conversation

Copilot AI commented May 27, 2026

Copy link
Copy Markdown

Catches up with ppy/master (1 commit: "Update framework") and upgrades to the latest winnerspiros framework build from pack run #60.

Changes

  • Merge ppy/master — true 2-parent merge; our fork's versions take priority over ppy's 2026.527.0 official build
  • Framework bump 2026.526.12026.527.1 across osu.Game.csproj, osu.Android.props, osu.iOS.props
  • ppy.Veldrid.SPIRV unchanged1.0.15-gb268bf39ea; pack Exclude Native/build artifacts from osu.Android compilation #60 logs confirm same SPIRV hash

What's in pack run #60 (commit f47338d3)

  • Veldrid: deferred AllowTearing swapchain recreation (gates behind Renderer.IsInitialised to avoid first-frame recreate on Android)
  • Veldrid: Adreno sync2 error logging
  • TrackBass: re-initialize syncs on device update
  • InspectCode: RectangleF/RectangleI.Empty get-only auto-property warnings resolved

Copilot AI and others added 4 commits May 26, 2026 21:56
On Adreno 7xx (SD8G2/G3), applying VK_PRESENT_MODE_IMMEDIATE_KHR during
the cold-start texture-upload burst causes vkQueuePresentKHR to stall
indefinitely, producing a black screen + ANR.

Fix: Before the framework reads framework.ini, temporarily force
FrameSync=VSync (FIFO present mode) so the swapchain is created safely.
After the Draw thread presents its first frame (renderer confirmed
healthy), restore the original ActualUnlimited value via the framework
config manager, switching to IMMEDIATE mode gracefully.

Components:
- AndroidStartupFlags: new FLAG_VULKAN_COLD_START_FRAME_SYNC_RESTORE
- LogManagement.ForceVSyncDuringVulkanColdStart(): pre-framework-init
  override of FrameSync in framework.ini when Vulkan + IMMEDIATE
- OsuGameActivity.OnCreate: call the new method after safe-mode logic
- OsuGameAndroid draw-thread heartbeat: restore original FrameSync after
  first frame presents
- Merge upstream 'Update framework' commit (ppy/master b55ca84)
- Bump ppy.osu.Framework / Android / iOS from 2026.526.1 → 2026.527.1
  (winnerspiros pack run #60, commit f47338d3, 2026-05-27)
  Includes: veldrid deferred AllowTearing swapchain + Adreno sync2 logging,
  InspectCode RectangleF/RectangleI.Empty fix, TrackBass sync reinit on device update
- ppy.Veldrid.SPIRV unchanged (1.0.15-gb268bf39ea)
- Prioritised fork versions over ppy's 2026.527.0 official build
@winnerspiros
winnerspiros marked this pull request as ready for review May 27, 2026 05:57
Copilot AI review requested due to automatic review settings May 27, 2026 05:57
@winnerspiros
winnerspiros merged commit 517a7af into master May 27, 2026
18 of 23 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates osu! dependencies and adds an Android Vulkan cold-start mitigation by temporarily forcing VSync (FIFO) and restoring the user’s original FrameSync setting after the first frame presents.

Changes:

  • Bumped ppy.osu.Framework package references across iOS/Android/shared projects to 2026.527.1.
  • Added “Vulkan cold-start present-mode deferral” to force FrameSync = VSync at startup and restore the prior value after first frame.
  • Introduced a startup-flag constant to persist the original FrameSync value across process restarts.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
osu.iOS.props Updates iOS framework package version to align with the new framework build.
osu.Game/osu.Game.csproj Updates framework dependency version and adjusts the pinned-compatibility comment accordingly.
osu.Android.props Updates Android framework package version to match the shared bump.
osu.Android/OsuGameActivity.cs Calls the new cold-start mitigation early in OnCreate() (before framework init).
osu.Android/LogManagement.cs Implements ForceVSyncDuringVulkanColdStart() by rewriting framework.ini and persisting the original value via startup flags.
osu.Android/OsuGameAndroid.cs Restores the original FrameSync after the draw thread presents its first frame.
osu.Android/AndroidStartupFlags.cs Adds a new startup-flag constant to store the original FrameSync value for restoration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

/// framework init. After the Draw thread presents its first frame,
/// <see cref="OsuGameAndroid"/> reads this value and restores it via the framework
/// config manager (applying it in-memory AND persisting to <c>framework.ini</c>),
/// then deletes the flag so subsequent launches repeat the same cycle.
Comment on lines +773 to +776
/// <b>Safety:</b> If the process dies before restoration, next launch finds
/// <c>FrameSync = VSync</c> in the ini (safe FIFO cold start) plus the restore
/// flag still on disk, so the same deferred-switch cycle repeats. No user-visible
/// permanent change to the config.
Comment on lines +890 to +904
string? savedFrameSync = AndroidStartupFlags.ReadValue(
AndroidStartupFlags.FLAG_VULKAN_COLD_START_FRAME_SYNC_RESTORE);

if (savedFrameSync != null && cachedFrameworkConfig != null)
{
if (Enum.TryParse<FrameSync>(savedFrameSync, out var originalFrameSync))
{
cachedFrameworkConfig.SetValue(FrameworkSetting.FrameSync, originalFrameSync);
Logger.Log($"[osu!] Vulkan cold-start: restored FrameSync to {originalFrameSync} after first frame", LoggingTarget.Performance);
}

// Delete the flag regardless of parse success so we don't
// re-attempt restoration on the next Draw-thread tick.
AndroidStartupFlags.Set(AndroidStartupFlags.FLAG_VULKAN_COLD_START_FRAME_SYNC_RESTORE, false);
}
Comment on lines +888 to +891
try
{
string? savedFrameSync = AndroidStartupFlags.ReadValue(
AndroidStartupFlags.FLAG_VULKAN_COLD_START_FRAME_SYNC_RESTORE);

if (savedFrameSync != null && cachedFrameworkConfig != null)
{
if (Enum.TryParse<FrameSync>(savedFrameSync, out var originalFrameSync))
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.

4 participants