Integrate osu-framework/veldrid fork features: D3D12, low-latency provider, Vulkan optimizations - #207
Conversation
…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>
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>
There was a problem hiding this comment.
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
LatencyModedropdown 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) |
There was a problem hiding this comment.
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.
| if (VK_VERSION_MINOR(deviceInfo_.apiVersion) >= 4) | |
| if (deviceInfo_.apiVersion >= VK_MAKE_VERSION(1, 4, 0)) |
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
LatencyModesetting in the renderer settings UI.Submodule updates
5c10d7d→394ecf5d12202b40→db70f1b(transitive via framework)What's now active
Veldrid Vulkan
VK_KHR_push_descriptor— eliminates descriptor pool allocation per drawVK_KHR_dynamic_rendering— drops VkRenderPass/VkFramebuffer overhead on 1.3+VK_EXT_host_image_copy— direct CPU→GPU texture upload, bypasses staging buffersVkPipelineCache— driver-side pipeline cachingVK_EXT_memory_budget,VK_EXT_descriptor_indexing,VK_KHR_fragment_shading_rate,VK_EXT_mesh_shaderVeldrid D3D12
Framework
ILowLatencyProvider+LatencyMode(Off/On/Boost) — generic Reflex/LatencyFlex plumbing withFrameSleep()and latency markers around sim/render/presentFrameSync.UVSync— draw+update at refresh rate (unbuffered vsync)FrameSync.Custom— user-defined draw limitEGL_ANDROID_front_buffer_auto_refreshon Android GL pathOpenGLCommandExecutorosu changes
LatencyModedropdown toRendererSettingswith localisation string