Export (0) Print
Expand All

Handling Multiple Locks

With the Direct3D runtime, you can allow vertex and index buffers to have more than one lock outstanding. User-mode display drivers must handle multiple locks the same way as the runtime in the Windows 2000 Display Driver Model.

A user-mode display driver must not fail a call to its LockAsync function for a resource that is already locked. That is, the driver cannot fail any calls to its LockAsync function for a particular resource after the first call to its LockAsync function succeeds in locking that resource. Similarly, the driver cannot fail any calls to its Lock function for a particular resource after the first call to its Lock function succeeds in locking that resource. The runtime matches each call that it makes to the driver's LockAsync function with a call to the driver's UnlockAsync function. The runtime also matches each call that it makes to the driver's Lock function with a call to the driver's Unlock function.

The user-mode display driver cannot fail a call to its UnlockAsync function unless the resource that the D3DDDIARG_UNLOCKASYNC structure describes was not actually locked by a previous call to the driver's LockAsync function. Similarly, the driver cannot fail a call to its Unlock function unless the resource that the D3DDDIARG_UNLOCK structure describes was not actually locked by a previous call to the driver's Lock function. In situations in which the resources were not previously locked, UnlockAsync and Unlock return E_INVALIDARG.

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft