Closed Bug 1861605 Opened 1 year ago Closed 1 year ago

Use IDXGIResource1::CreateSharedHandle() instead of IDXGIResource::GetSharedHandle()

Categories

(Core :: Graphics, enhancement)

Unspecified
Windows
enhancement

Tracking

()

RESOLVED FIXED
123 Branch
Tracking Status
firefox123 --- fixed

People

(Reporter: sotaro, Assigned: sotaro)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

gecko uses IDXGIResource::GetSharedHandle(). It seems better to use IDXGIResource1::CreateSharedHandle() instead.

chromium always use the CreateSharedHandle().

The CreateSharedHandle() uses NT handle (needs D3D11_RESOURCE_MISC_SHARED_NTHANDLE flag).

OS: Unspecified → Windows

From https://learn.microsoft.com/en-us/windows/win32/api/d3d11/ne-d3d11-d3d11_resource_misc_flag


D3D11_RESOURCE_MISC_SHARED_NTHANDLE
Value: 0x800L
Set this flag to enable the use of NT HANDLE values when you create a shared resource. By enabling this flag, you deprecate the use of existing HANDLE values.

The value specifies a new shared resource type that directs the runtime to use NT HANDLE values for the shared resource. The runtime then must confirm that the shared resource works on all hardware at the specified feature level.

Without this flag set, the runtime does not strictly validate shared resource parameters (that is, formats, flags, usage, and so on). When the runtime does not validate shared resource parameters, behavior of much of the Direct3D API might be undefined and might vary from driver to driver.

Direct3D 11 and earlier: This value is not supported until Direct3D 11.1.

:jrmuizel, don't we need to use the CreateSharedHandle() instead of the GetSharedHandle()?

Flags: needinfo?(jmuizelaar)

I think switching would be good to do.

Flags: needinfo?(jmuizelaar)
Assignee: nobody → sotaro.ikeda.g

NT HANDLE needs to be delivered by using ipc::FileDescriptor.

Depends on: 1863241
Depends on: 1865282
Depends on: 1865991
Depends on: 1866412
Attachment #9360916 - Attachment description: WIP: Bug 1861605 - Use IDXGIResource1::CreateSharedHandle() instead of IDXGIResource::GetSharedHandle() → Bug 1861605 - Use IDXGIResource1::CreateSharedHandle() instead of IDXGIResource::GetSharedHandle()
Pushed by sikeda.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2721b6999583 Use IDXGIResource1::CreateSharedHandle() instead of IDXGIResource::GetSharedHandle() r=gfx-reviewers,lsalzman
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 123 Branch
Blocks: 1847453
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: