Added a utility function to set the debug name on D3D11 resources.

TRAC #22231 Signed-off-by: Jamie Madill Signed-off-by: Daniel Koch Author: Geoff Lang git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1694 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent b1154551
......@@ -534,4 +534,13 @@ size_t ComputeBlockSizeBits(DXGI_FORMAT format)
}
}
HRESULT SetDebugName(ID3D11DeviceChild *resource, const char *name)
{
#if defined(_DEBUG)
return resource->SetPrivateData(WKPDID_D3DDebugObjectName, strlen(name), name);
#else
return S_OK;
#endif
}
}
......@@ -51,6 +51,8 @@ namespace d3d11
{
size_t ComputePixelSizeBits(DXGI_FORMAT format);
size_t ComputeBlockSizeBits(DXGI_FORMAT format);
HRESULT SetDebugName(ID3D11DeviceChild *resource, const char *name);
}
inline bool isDeviceLostError(HRESULT errorCode)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment