PFND3DDDI_RESOLVESHAREDRESOURCE callback function (d3dumddi.h)
The ResolveSharedResource function informs a user-mode display driver that ownership of a shared surface changed or that a surface is being used for GDI interoperation.
Syntax
PFND3DDDI_RESOLVESHAREDRESOURCE Pfnd3dddiResolvesharedresource;
HRESULT Pfnd3dddiResolvesharedresource(
HANDLE hDevice,
const D3DDDIARG_RESOLVESHAREDRESOURCE *unnamedParam2
)
{...}
Parameters
hDevice
A handle to the display device (that is, the graphics context) that is associated with the shared surface or GDI interoperable surface.
unnamedParam2
pData [in]
A pointer to a D3DDDIARG_RESOLVESHAREDRESOURCE structure that contains a handle to the surface.
Return value
ResolveSharedResource returns one of the following values:
Return code | Description |
---|---|
S_OK | The resource is successfully resolved. |
D3DDDIERR_DEVICEREMOVED | The driver detects that the graphics adapter was removed. Therefore, the driver did not complete the operation. If the driver never notices the adapter-removal condition, the driver is not required to return this error code. |
Remarks
The Direct3D runtime calls ResolveSharedResource when an application calls one of the following functions:
- IDXGIKeyedMutex::ReleaseSynch on a synchronized shared surface
- IDXGISurface1::GetDC for a GDI interoperable surface
The driver implements ResolveSharedResource to appropriately manage resources for multiple GPU scenarios. Each resource might be divided across memory for multiple GPUs to render on. The driver can implement ResolveSharedResource to remerge each resource so that the new resource owner has the merged resource. The driver must flush any partially built command buffers that might modify the resource.
Requirements
Requirement | Value |
---|---|
Minimum supported client | ResolveSharedResource is supported beginning with the Windows 7 operating system. |
Target Platform | Desktop |
Header | d3dumddi.h (include D3dumddi.h) |