Use IDXGIResource1::CreateSharedHandle() instead of IDXGIResource::GetSharedHandle()
Categories
(Core :: Graphics, enhancement)
Tracking
()
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().
- https://learn.microsoft.com/en-us/windows/win32/api/dxgi/nf-dxgi-idxgiresource-getsharedhandle
- https://learn.microsoft.com/en-us/windows/win32/api/dxgi1_2/nf-dxgi1_2-idxgiresource1-createsharedhandle
The CreateSharedHandle() uses NT handle (needs D3D11_RESOURCE_MISC_SHARED_NTHANDLE flag).
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 1•1 year ago
|
||
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.
Assignee | ||
Comment 2•1 year ago
|
||
:jrmuizel, don't we need to use the CreateSharedHandle() instead of the GetSharedHandle()?
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 4•1 year ago
|
||
Assignee | ||
Comment 5•1 year ago
|
||
NT HANDLE needs to be delivered by using ipc::FileDescriptor.
Updated•1 year ago
|
Comment 7•1 year ago
|
||
bugherder |
Description
•