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 Rename function informs a user-mode display driver to start using the renamed allocation that the LockAsync function previously returned for the specified resource.
Syntax
PFND3DDDI_RENAME Pfnd3dddiRename;
HRESULT Pfnd3dddiRename(
HANDLE hDevice,
const D3DDDIARG_RENAME *unnamedParam2
)
{...}
Parameters
hDevice
A handle to a display device (that is, the graphics context).
unnamedParam2
pData [in]
A pointer to a D3DDDIARG_RENAME structure that describes the resource or surface within a resource to rename with a new allocation.
Return value
Rename returns one of the following values:
| Return code | Description |
|---|---|
| S_OK | The resource is successfully renamed. |
| E_OUTOFMEMORY | Rename could not allocate the required memory for it to complete. |
Remarks
On multiple-processor computers, the Microsoft Direct3D runtime calls the user-mode display driver's Rename function from a worker thread instead of from the main application thread. The runtime calls Rename, at most, once for each successful call to the driver's LockAsync function with the Discard bit-field flag set in the Flags member of the D3DDDIARG_LOCKASYNC structure that the pData parameter of LockAsync points to.
Rename informs the driver to start using the renamed allocation that is specified by the hCookie member of the D3DDDIARG_RENAME structure that the pData parameter of Rename points to. The hCookie handle was previously returned by the LockAsync function if the Discard bit-field flag was set for the locked resource.
After Rename returns successfully (with S_OK), the user-mode display driver should use the allocation that hCookie specifies for all rendering operations that reference the resource that the hResource and SubResourceIndex members of D3DDDIARG_RENAME specify.
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Available in Windows Vista and later versions of the Windows operating systems. |
| Target Platform | Universal |
| Header | d3dumddi.h (include D3dumddi.h) |