Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The pfnLock2Cb function locks an allocation and obtains a pointer to the allocation from the display miniport driver or video memory manager.
Syntax
PFND3DDDI_LOCK2CB Pfnd3dddiLock2cb;
HRESULT Pfnd3dddiLock2cb(
HANDLE hDevice,
D3DDDICB_LOCK2 *unnamedParam2
)
{...}
Parameters
hDevice
A handle to the display device (graphics context).
unnamedParam2
pData [in, out]
A pointer to a D3DDDICB_LOCK2 structure that describes the allocation to lock.
Return value
If this callback function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
With the Windows Display Driver Model (WDDM) v2 it is now the user mode driver's responsibility to handle the following tasks:
- Support no-overwrite and discard semantics. The video memory manager no longer supports renaming so it is up to the driver to implement renaming itself.
-
Synchronization of other lock types (not no-overwrite or discard)
- Must return WasStillDrawing if the user attempts to lock an allocation while specifying the D3D1X_MAP_FLAG_DO_NOT_WAIT flag.
- The user mode driver must block if synchronization is required (ex. hardware is accessing the allocation). This must be implemented as a non-polling wait and make use of the new monitored fence synchronization objects.
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Windows 10 |
| Minimum supported server | Windows Server 2016 |
| Target Platform | Desktop |
| Header | d3dumddi.h (include D3dumddi.h) |