Skip to content

VMSVGA: coalesce DX11 readbacks and skip unchanged updates#744

Draft
moreaki wants to merge 1 commit into
VirtualBox:mainfrom
moreaki:agent/vmsvga-dx11-readback-coalesce
Draft

VMSVGA: coalesce DX11 readbacks and skip unchanged updates#744
moreaki wants to merge 1 commit into
VirtualBox:mainfrom
moreaki:agent/vmsvga-dx11-readback-coalesce

Conversation

@moreaki

@moreaki moreaki commented Jul 8, 2026

Copy link
Copy Markdown

Summary

Reduce VMSVGA DX11 output readback and repaint overhead.

The change:

  • coalesces pending output update rectangles,
  • copies only the dirty rectangle from the screen texture to the staging texture,
  • skips host-visible update sequence bumps when readback bytes are unchanged,
  • adds STAM counters/profiles used for measurement.

Scope

This is a performance improvement, not part of the minimal functional Retina/HiDPI enablement tracked by #742.

The intended validation baseline for this PR is the functional/stability stack needed to run a Windows 11 ARM guest reliably on macOS/Arm with VMSVGA 3D and high-resolution modes enabled. That includes the functional HiDPI prerequisites from #742 and the runtime stability fixes needed to make the benchmark path reliable.

Why

On macOS/Arm with Windows 11 ARM and VMSVGA 3D enabled, simple desktop activity produced high host CPU usage. A large part of the cost came from repeated readback/frontend update work even when the visible output did not materially change.

Benchmark source

The reproducible benchmark suite used for final throughput validation is:

https://github.com/moreaki/dxmtbench

The suite runs browser-based WebGL/D3D-backed workloads inside the Windows guest, captures visual-output evidence, records throughput metrics, and exports machine-readable results. I will update this PR with isolated before/after dxmtbench results before treating it as a final performance submission.

Validation

  • Applied independently to origin/main.
  • git diff --check passes.
  • Rebuilt locally as part of the VBoxDD/VirtualBoxVM graphics test build.
  • Earlier manual Explorer open/close measurements showed a large improvement for the combined local patch stack, but those numbers are not claimed here as isolated proof for this PR.

Refs #742.

Signed-off-by: Roberto Nibali <rnibali@gmail.com>
@oracle-contributor-agreement

Copy link
Copy Markdown

Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
The following contributors of this PR have not signed the OCA:

To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application.

When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated.

If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public.

@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Required At least one contributor does not have an approved Oracle Contributor Agreement. label Jul 8, 2026
@moreaki moreaki marked this pull request as ready for review July 8, 2026 08:09
@moreaki moreaki marked this pull request as draft July 9, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Required At least one contributor does not have an approved Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant