Skip to content

feat: Add method to access DXGI share handle#351

Merged
sagudev merged 2 commits intoservo:mainfrom
burhankhanzada:share_handle
Apr 9, 2026
Merged

feat: Add method to access DXGI share handle#351
sagudev merged 2 commits intoservo:mainfrom
burhankhanzada:share_handle

Conversation

@burhankhanzada
Copy link
Copy Markdown
Contributor

Summary
Add a public share_handle() accessor to Surface on the Windows ANGLE and WGL backends, returning the underlying DXGI shared handle (HANDLE) for generic (pbuffer/texture) surfaces.

Motivation
Consumers that need to share a surfman Surface with other GPU APIs (e.g. importing into a D3D12/wgpu device via OpenSharedHandle) currently have no way to obtain the DXGI share handle through the public API. The handle is already computed and stored internally during surface creation, but it is gated behind pub(crate) fields.

This is needed for DirectX rendering bridge, where ANGLE renders into a surfman surface and the backing D3D11 texture is then shared with wgpu's DX12 backend for compositing.

Copy link
Copy Markdown
Member

@jdm jdm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense!

@jdm jdm added this pull request to the merge queue Apr 9, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 9, 2026
@jdm jdm enabled auto-merge April 9, 2026 02:19
@jdm jdm added this pull request to the merge queue Apr 9, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 9, 2026
@jdm jdm added this pull request to the merge queue Apr 9, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 9, 2026
@jdm jdm added this pull request to the merge queue Apr 9, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 9, 2026
@sagudev sagudev added this pull request to the merge queue Apr 9, 2026
Merged via the queue into servo:main with commit 5493f6d Apr 9, 2026
29 checks passed
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.

3 participants