Expand Minimize

pfnSignalSynchronizationObjectCb routine

The pfnSignalSynchronizationObjectCb function inserts a signal on the specified synchronization objects in the specified context DMA stream.

Syntax


PFND3DDDI_SIGNALSYNCHRONIZATIONOBJECTCB pfnSignalSynchronizationObjectCb;

__checkResult HRESULT APIENTRY CALLBACK pfnSignalSynchronizationObjectCb(
  _In_  HANDLE                               hDevice,
  _In_  const D3DDDICB_SIGNALSYNCHRONIZATIONOBJECT *pData
)
{ ... }

Parameters

hDevice [in]

A handle to a display device (that is, the graphics context).

pData [in]

A pointer to a D3DDDICB_SIGNALSYNCHRONIZATIONOBJECT structure that describes the synchronization objects and context DMA stream that signaling is set up on.

Return value

pfnSignalSynchronizationObjectCb returns one of the following values:

Return codeDescription
S_OK

The signaling was successfully set up.

E_INVALIDARG

Parameters were validated and determined to be incorrect.

 

This function might also return other HRESULT values.

Remarks

Direct3D Version 11 Note:  For more information about how the driver calls pfnSignalSynchronizationObjectCb, see Changes from Direct3D 10.

Examples

The following code example shows how to insert a signal on synchronization objects.


HRESULT CD3DContext::SyncEngines(DWORD dwEngineReleasingControl, DWORD dwEngineAcquiringControl) {
    HRESULT hr;
    D3DDDICB_WAITFORSYNCHRONIZATIONOBJECT   sWaitObject;
    D3DDDICB_SIGNALSYNCHRONIZATIONOBJECT    sSignalObject;

    sSignalObject.hContext = m_sContexts[dwEngineReleasingControl].hContext;
    sSignalObject.ObjectCount = 1;
    sSignalObject.ObjectHandleArray[0] = m_hEngineSyncObject;
    hr = m_d3dCallbacks.pfnSignalSynchronizationObjectCb(m_hD3D, &sSignalObject);
    if (FAILED(hr)) {
        DBG_BREAK;
        return hr;
    }
    sWaitObject.hContext = m_sContexts[dwEngineAcquiringControl].hContext;
    sWaitObject.ObjectCount = 1;
    sWaitObject.ObjectHandleArray[0] = m_hEngineSyncObject;
    hr = m_d3dCallbacks.pfnWaitForSynchronizationObjectCb(m_hD3D, &sWaitObject);
    if (FAILED(hr)) {
        DBG_BREAK;        
    }
    return hr;
}

Requirements

Target platform

Desktop

Version

Available in Windows Vista and later versions of the Windows operating systems.

Header

D3dumddi.h (include D3dumddi.h)

See also

D3DDDICB_SIGNALSYNCHRONIZATIONOBJECT

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft