Skip to content

Integrate osu-framework/veldrid fork features: D3D12, low-latency provider, Vulkan optimizations - #207

Merged
winnerspiros merged 8 commits into
masterfrom
copilot/fix-game-crash-on-startup-again
Apr 19, 2026
Merged

Integrate osu-framework/veldrid fork features: D3D12, low-latency provider, Vulkan optimizations#207
winnerspiros merged 8 commits into
masterfrom
copilot/fix-game-crash-on-startup-again

Conversation

Copilot AI commented Apr 19, 2026

Copy link
Copy Markdown

Updates osu-framework submodule to latest master, pulling in the full D3D12 backend, low-latency provider API, and comprehensive Vulkan/OpenGL optimizations from both the framework and veldrid forks. Exposes the new LatencyMode setting in the renderer settings UI.

Submodule updates

  • osu-framework 5c10d7d394ecf5d1
  • veldrid 2202b40db70f1b (transitive via framework)

What's now active

Veldrid Vulkan

  • VK_KHR_push_descriptor — eliminates descriptor pool allocation per draw
  • VK_KHR_dynamic_rendering — drops VkRenderPass/VkFramebuffer overhead on 1.3+
  • VK_EXT_host_image_copy — direct CPU→GPU texture upload, bypasses staging buffers
  • VkPipelineCache — driver-side pipeline caching
  • VK_EXT_memory_budget, VK_EXT_descriptor_indexing, VK_KHR_fragment_shading_rate, VK_EXT_mesh_shader

Veldrid D3D12

  • Full backend via Vortice 3.8.3 — enhanced barriers, VRS, mesh shaders, raytracing capability detection

Framework

  • ILowLatencyProvider + LatencyMode (Off/On/Boost) — generic Reflex/LatencyFlex plumbing with FrameSleep() and latency markers around sim/render/present
  • FrameSync.UVSync — draw+update at refresh rate (unbuffered vsync)
  • FrameSync.Custom — user-defined draw limit
  • SDL3 raw keyboard + async key event bypass when text input inactive
  • EGL_ANDROID_front_buffer_auto_refresh on Android GL path
  • OpenGL pipeline state caching in OpenGLCommandExecutor

osu changes

  • Added LatencyMode dropdown to RendererSettings with localisation string
  • No other osu-layer changes needed — D3D12 renderer selection, UVSync/Custom frame sync modes, and raw keyboard are handled entirely by the framework
// New setting in RendererSettings.cs
new SettingsItemV2(new FormEnumDropdown<LatencyMode>
{
    Caption = GraphicsSettingsStrings.LowLatency,
    Current = config.GetBindable<LatencyMode>(FrameworkSetting.LatencyMode),
})

Copilot AI and others added 8 commits April 19, 2026 08:47
…rary to fix DllNotFoundException crash

Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/b8dfe841-5326-4fdd-953c-03ffbded559c

Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
… fixes

Updates submodule pointer from 13df6c9cb to 5c10d7dfd which includes:
- Remove EnableLLVM=true (causes plt_entry crash with profiled AOT)
- Set AndroidStripILAfterAOT=false (keeps IL fallback for un-AOT'd methods)
- Bump SupportedOSPlatformVersion to 33.0 (matches minSdkVersion)
- Update AndroidManifest minSdkVersion to 33
- Remove obsolete READ_EXTERNAL_STORAGE permission

Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
…e config

- Clamp framesRead to [0, numFrames] in onAudioReady to prevent buffer
  overrun when provider returns negative values
- Pin Oboe dependency to v1.10.0 stable release instead of `main` branch
  for reproducible builds
- Switch from full LTO (-flto) to thin LTO (-flto=thin) for faster native
  link times with equivalent binary quality
- Add REQUIRED to find_library calls for clearer CMake error diagnostics

Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/93c72c6f-5cbd-4c16-9016-6f040b2bea62

Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
Oboe main has 79 commits since v1.10.0 including workload management
APIs, spatialization, PCM offload, and API 36 compatibility that are
valuable for a low-latency rhythm game. Releases are infrequent (~yearly)
so main is the better choice.

Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/93c72c6f-5cbd-4c16-9016-6f040b2bea62

Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
…d spatialization and capture policy

- Replace deprecated setFramesPerCallback() with setFramesPerDataCallback()
- Replace deprecated raw pointer setCallback() with shared_ptr setDataCallback()
  and setErrorCallback() (non-owning aliasing shared_ptr for error callback)
- Change StabilizedCallback from unique_ptr to shared_ptr to match new API
- Add setIsContentSpatialized(true) — BASS pre-mixes audio, prevent double processing
- Add setAllowedCapturePolicy(AllowNone) — competitive integrity for rhythm game

Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/23c3ea85-9888-4a55-b8a7-1e5e11dc2e74

Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
…ing, add Vk1.4/hostImageCopy/pushDescriptors detection, harmonize log tags

Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/39a59ff0-542b-46df-a078-ea21135c349b

Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
…UVSync, raw keyboard, EGL front buffer, Vulkan optimizations); add latency mode setting to UI

Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/0f2ef327-b878-4bcc-9ad5-0e1acfca5018

Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
@gitar-bot

gitar-bot Bot commented Apr 19, 2026

Copy link
Copy Markdown

Important

You are using the Gitar free plan. Upgrade to unlock code review, CI analysis, auto-apply, custom automations, and more.

Gitar

@winnerspiros
winnerspiros marked this pull request as ready for review April 19, 2026 18:14
Copilot AI review requested due to automatic review settings April 19, 2026 18:14
@winnerspiros
winnerspiros merged commit 1d5d3b5 into master Apr 19, 2026
12 of 16 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

Updates the project to integrate newer osu-framework/veldrid capabilities (notably low-latency mode plumbing and Vulkan/D3D12-related improvements) and surfaces the new low-latency setting in the osu! UI. Also extends the Android native Vulkan probe and Oboe audio bridge to support newer capability reporting and updated Oboe callback APIs.

Changes:

  • Add a LatencyMode dropdown to renderer settings, with a new localisation string.
  • Extend Android Vulkan probe to improve capability detection/reporting (incl. new exported flags) and adjust present-mode assumptions.
  • Update Android native audio bridge to use non-deprecated Oboe callback APIs and add defensive clamping around provider frame counts; adjust native build/link settings.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
osu.Game/Overlays/Settings/Sections/Graphics/RendererSettings.cs Adds UI dropdown for LatencyMode bound to FrameworkSetting.LatencyMode.
osu.Game/Localisation/GraphicsSettingsStrings.cs Adds localisation entry for the “Low latency” setting caption.
osu.Android/Native/vulkan_bridge.h Extends DeviceInfo with additional capability flags (Vulkan 1.4+, host image copy, push descriptors).
osu.Android/Native/vulkan_bridge.cpp Updates Vulkan probing flow/logging, extension detection, vendor quirks, and exports new P/Invoke functions.
osu.Android/Native/VulkanProbe.cs Adds managed accessors/PInvoke declarations for the new native Vulkan probe flags.
osu.Android/AndroidNativeBridgeManager.cs Adjusts Vulkan status string and logging to reflect updated probe fields.
osu.Android/Native/oboe_bridge.h Switches StabilizedCallback ownership to shared_ptr for non-deprecated builder API usage.
osu.Android/Native/oboe_bridge.cpp Migrates to setFramesPerDataCallback + shared_ptr callback APIs; adds safety clamp for provider frame counts.
osu.Android/Native/CMakeLists.txt Tweaks release flags (thin LTO), improves Oboe fetch rationale, and makes find_library fail-fast.
osu.Android.props Ensures framework-provided native .so dependencies are packaged when using a ProjectReference.

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

deviceInfo_.meetsVulkan13 = true;

// Vulkan 1.4 is just a version check — no NDK header support needed.
if (VK_VERSION_MINOR(deviceInfo_.apiVersion) >= 4)

Copilot AI Apr 19, 2026

Copy link

Choose a reason for hiding this comment

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

meetsVulkan14 is computed using only VK_VERSION_MINOR(apiVersion) >= 4, which will incorrectly return false for any future Vulkan major versions (e.g. 2.0) even though they should satisfy the “>= 1.4” check. Consider comparing against VK_MAKE_VERSION(1, 4, 0) (or major > 1 || (major == 1 && minor >= 4)) instead of relying on the minor value alone.

Suggested change
if (VK_VERSION_MINOR(deviceInfo_.apiVersion) >= 4)
if (deviceInfo_.apiVersion >= VK_MAKE_VERSION(1, 4, 0))

Copilot uses AI. Check for mistakes.
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.

3 participants