Skip to content

obs-gpu-status: Move the frame-time window into Rust and flag API-name adapters (#943) - #960

Merged
zackees merged 2 commits into
masterfrom
test/943-frame-window
Oct 16, 2026
Merged

zackees merged 2 commits into
masterfrom
test/943-frame-window

Conversation

@zackees

@zackees zackees commented Oct 16, 2026

Copy link
Copy Markdown
Member

Fixes #943 (part of #939).

The frontend half of the GPU light had no automated tests. That is how llvmpipe showed green (#929).

Change

  • FrameWindow (Rust, Tier 1 tested): the last 15 non-zero one-second samples, and stats() gives their median. It replaces the frontend's std::deque + mutex.
  • C ABI: obs_gpu_status_sample(frame_ns) is called once a second, and obs_gpu_status_report(adapter, interval_ns, state) reads the window. GpuStatus.cpp shrinks to adapter reading plus these two calls.
  • adapterIsApiName in GetStats.gpuAcceleration: true when the adapter is OpenGL, Direct3D 11 or Metal (the frontend failed to read the real one). The Tier 4 GPU check (ci: Run the Tier 4 GPU acceleration check against the Rust libobs Ubuntu build #940) now requires it to be false. ci: Smoke-test the GPU status light on Windows and macOS runners #941's packaged smoke tests reject API names on Windows and macOS.

RED → GREEN

  • RED (Add failing tests for FrameWindow and the API-name flag): 4 tests fail on todo!(), covering keeping the last 15, skipping 0, the 5-sample minimum, and the API-name flag.
  • GREEN: all obs-gpu-status tests pass, including a C-ABI test that samples a sustained overrun (red) and then one slow second among fast ones (green). Clippy is clean.
  • Frontend: GpuStatus.cpp compiles cleanly (g++ -fsyntax-only -Wall against Qt 6.11). The full app build runs in the release gate. I did not add ci-full, to keep PR CI light while the queue is busy.

…ag (RED)

The one-second sampler lived only in frontend C++ with no test, and a
frontend that passes "OpenGL" as the adapter went unnoticed (#929).

Refs #943
…e adapters (GREEN)

FrameWindow keeps the last 15 non-zero one-second samples; the frontend
only calls obs_gpu_status_sample() each second, and
obs_gpu_status_report() reads the window. The JSON's adapterIsApiName
is true when the frontend passed gs_get_device_name()'s API name, and
the Tier 4 GPU check requires it to be false.

Fixes #943
@zackees
zackees force-pushed the test/943-frame-window branch from fb84f0c to 1058a4e Compare October 16, 2026 02:21
@zackees
zackees added this pull request to the merge queue Oct 16, 2026
Merged via the queue into master with commit 7437e2f Oct 16, 2026
23 checks passed
@zackees
zackees deleted the test/943-frame-window branch October 26, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

test: Automated coverage for the GPU light's frontend half

1 participant