Skip to content

Port the v0.5.3 Windows fixes to dev - #462

Merged
mohamedtahaguelzim merged 3 commits into
devfrom
fix/port-422-windows-fixes
Jul 21, 2026
Merged

Port the v0.5.3 Windows fixes to dev#462
mohamedtahaguelzim merged 3 commits into
devfrom
fix/port-422-windows-fixes

Conversation

@mohamedtahaguelzim

Copy link
Copy Markdown
Contributor

Ports the three Windows fixes that shipped in v0.5.3 (cherry-picked from #422, authorship preserved): DirectML execution provider compiled in for Windows builds, Slint's shared wgpu instance follows reco-core's backend policy, and the reco-obs build.rs portability fixes.

RufanMelfor and others added 3 commits July 21, 2026 22:58
…vider on Windows

AI tracking during file export was silently running on CPU instead of
GPU: ort_session.rs tries DirectML first and logs "ORT: DirectML
execution provider enabled" regardless of outcome, masking the real
`ort::ep` warning ("Couldn't register DmlExecutionProvider... its
corresponding Cargo feature is not enabled") logged separately by the
ort crate itself. Root cause: the `ort` dependency never had its
`directml` feature turned on anywhere in the workspace, so the native
DirectML backend was never compiled in - CPU-bound inference every N
frames then stalled the whole stitch/encode pipeline between detections,
which read as "GPU not fully utilized" during export.

Added a `directml` feature through the existing per-backend forwarding
chain (mirrors cuda/tensorrt/coreml): reco-detect -> reco-autocam ->
reco-gui, enabled only for Windows via a target-specific dependency
override so non-Windows builds are unaffected.

Verified with a headless RECO_AUTOLOAD/RECO_AUTOEXPORT test export: log
now shows `ort::ep: Successfully registered 'DmlExecutionProvider'`
(previously a WARN), and nvidia-smi sampling during export went from
bursty 2%<->99% GPU utilization to a sustained 21-60%.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…-core's backend policy

rig-calib crashed on startup on a Windows laptop with a broken/partial
Vulkan loader (`ReadDataFilesInRegistry` layer-manifest failures):
debug builds enable wgpu's DEBUG instance flag, and when Slint's
auto-selected Vulkan backend couldn't resolve
`vkCmdBeginDebugUtilsLabelEXT`, ash panicked across an FFI boundary
that can't unwind, aborting the process.

reco-core's own `GpuContext::select_backends()` already avoids this
class of bug by preferring DX12 on Windows (a prior fix for AMD Vulkan
driver crashes during instance creation), but that policy only applied
to the `wgpu::Instance` reco-core creates itself for headless
consumers - reco-gui and rig-calib instead hand instance creation off
to Slint (`BackendSelector::require_wgpu_28`), which was left to its
own Vulkan-first default. Made `select_backends()` public and pass it
as `WGPUConfiguration::Automatic::backends` in both, so the shared
Slint-owned instance follows the same (still `WGPU_BACKEND`-overridable)
policy.

Verified: rebuilt and ran rig-calib on the affected laptop - no more
Vulkan warnings or panic.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
reco-obs never built on Windows before (only ever exercised on Linux/
macOS), and hit two real bugs once actually tried against libobs 30.0.2
headers with OBS_INCLUDE_DIR set:

- bindgen's clang runs in MSVC-compatibility mode on Windows, which is
  needed for the rest of the libobs/Windows headers to parse, but flips
  `util/util_uint64.h` into a branch calling the MSVC-only `_udiv128`
  intrinsic - not declared by clang's own `intrin.h` shim, so parsing
  failed. Shimmed just that call away via a targeted clang macro rather
  than dropping MSVC-compat mode (which broke clang's own SSE/SSE2
  intrinsic headers when tried).
- `blog_shim.c`'s `#include <obs/util/base.h>` silently relied on
  `/usr/include` being a default compiler search path on Linux/macOS to
  resolve the Debian libobs-dev `.../obs/` layout; Windows has no such
  default. build.rs now also adds the parent of OBS_INCLUDE_DIR to the
  shim's include path when the layout matches that convention.

Both fixes are no-ops on Linux/macOS.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@mohamedtahaguelzim
mohamedtahaguelzim merged commit 55b0a9d into dev Jul 21, 2026
15 checks passed
@mohamedtahaguelzim
mohamedtahaguelzim deleted the fix/port-422-windows-fixes branch July 21, 2026 21:34
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants