DirectX11 CreateSharedHandle - 这是跨设备的吗?
DirectX11 CreateSharedHandle - is this cross-device?
我正在使用 CreateShaderHandle
创建 IDXGIResource1
键控共享资源的句柄。目标是在一个线程中获取这个资源,并在另一个线程中使用它。
现在我正在两个线程上创建一个 D3D11 设备 在同一个适配器上
hr = D3D11CreateDevice(dxgi_adapter, ...);
并且共享此句柄有效。
如果在消费者线程上,我在 另一个 适配器上创建设备,它似乎不起作用。
所以我的问题是:D3D11 中的 CreateShaderHandle
句柄是否仅适用于相同的适配器 (gpu)?
关于跨设备共享和使用 DXGI 键控互斥体的 MSDN 文章没有明确给出答案,但是 MSDN 仍然有它,在 IDXGIFactory2::GetSharedResourceAdapterLuid
:
You cannot share resources across adapters. Therefore, you cannot open a shared resource on an adapter other than the adapter on which the resource was created.
[...] ...before you open a shared resource to ensure that the resource was created on the appropriate adapter.
即"same adapter only"资源共享
我正在使用 CreateShaderHandle
创建 IDXGIResource1
键控共享资源的句柄。目标是在一个线程中获取这个资源,并在另一个线程中使用它。
现在我正在两个线程上创建一个 D3D11 设备 在同一个适配器上
hr = D3D11CreateDevice(dxgi_adapter, ...);
并且共享此句柄有效。
如果在消费者线程上,我在 另一个 适配器上创建设备,它似乎不起作用。
所以我的问题是:D3D11 中的 CreateShaderHandle
句柄是否仅适用于相同的适配器 (gpu)?
关于跨设备共享和使用 DXGI 键控互斥体的 MSDN 文章没有明确给出答案,但是 MSDN 仍然有它,在 IDXGIFactory2::GetSharedResourceAdapterLuid
:
You cannot share resources across adapters. Therefore, you cannot open a shared resource on an adapter other than the adapter on which the resource was created. [...] ...before you open a shared resource to ensure that the resource was created on the appropriate adapter.
即"same adapter only"资源共享