Skip to content

fix(video): default to GPU and stabilize software presentation - #351

Merged
ReenigneArcher merged 4 commits into
masterfrom
codex/fix-software-presentation
Nov 19, 2026
Merged

ReenigneArcher merged 4 commits into
masterfrom
codex/fix-software-presentation

Conversation

@ReenigneArcher

@ReenigneArcher ReenigneArcher commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Description

Software presentation was drawing video and overlays directly into the displayed framebuffer, which could flash as the overlay was repainted. At 720p, switching to a second scanout address could also make xemu display a cached Xbox boot surface over the stream.

  • Default to GPU presentation when no preference is saved. Honor saved Software selections and fall back to software when NV2A presentation is unavailable.
  • Compose the complete video frame and overlay before publishing either.
  • Flip between two pages for SD output and wait for vertical blank after submitting the new address before reusing the old page.
  • Keep the primary framebuffer address fixed for HD output and copy the completed frame at vertical blank.
  • Present the complete SDL frame when buffered software presentation is unavailable.

Screenshot

Issues Fixed or Closed

Roadmap Issues

Testing

  • Ran ctest --test-dir cmake-build-release --output-on-failure. All 477 native tests passed. Tests cover the GPU default, saved Software selections, page retirement, fixed-address HD presentation, allocation failure and retrace timeouts.
  • Built the release Xbox ISO and the strict Dockle API documentation. Clang-format, CMake lint and git diff --check passed.
  • Exercised the GPU default and an explicit Software selection with prerecorded 480p60 and 720p60 video in xemu, including repeated transitions through the stream controls.
  • In the software scanout regression test, ran a live 720p60 Sunshine stream in xemu for 68 seconds, opened the controls, disconnected and returned to the menu. The trace showed zero boot-surface uploads during playback. The software path averaged about 15 rendered FPS in that run.
  • Physical Xbox playback remains unverified.

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Tests have been added or updated for new or modified functionality, including regression tests for bug fixes

AI Usage

See our AI usage policy.

  • AI tools were used while preparing this PR

@codecov

codecov Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.41975% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.99%. Comparing base (36e97a9) to head (6a00870).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/streaming/software_scanout.cpp 84.93% 6 Missing and 5 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #351      +/-   ##
==========================================
+ Coverage   73.87%   73.99%   +0.12%     
==========================================
  Files          69       71       +2     
  Lines        7950     8029      +79     
  Branches     3469     3487      +18     
==========================================
+ Hits         5873     5941      +68     
- Misses       1091     1097       +6     
- Partials      986      991       +5     
Flag Coverage Δ
Linux 73.25% <85.71%> (+0.11%) ⬆️
macOS 62.54% <83.95%> (+0.21%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/app/client_state.h 98.66% <100.00%> (ø)
src/app/settings_storage.h 100.00% <100.00%> (ø)
src/streaming/software_scanout.h 100.00% <100.00%> (ø)
src/streaming/software_scanout.cpp 84.93% <84.93%> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 36e97a9...6a00870. Read the comment docs.

@ReenigneArcher ReenigneArcher changed the title fix(video): stabilize software presentation fix(video): default to GPU and stabilize software presentation Nov 19, 2026
@sonarqubecloud

Copy link
Copy Markdown

@ReenigneArcher
ReenigneArcher merged commit cacc3e5 into master Nov 19, 2026
17 checks passed
@ReenigneArcher
ReenigneArcher deleted the codex/fix-software-presentation branch November 19, 2026 02:41
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.

1 participant