WICTextureLoader - cleaned up debug sdk layer name setting
This commit is contained in:
parent
505949d763
commit
8834749b02
@ -526,7 +526,7 @@ static HRESULT CreateTextureFromWIC( _In_ ID3D11Device* d3dDevice,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#if defined(DEBUG) || defined(PROFILE)
|
#if defined(_DEBUG) || defined(PROFILE)
|
||||||
tex->SetPrivateData( WKPDID_D3DDebugObjectName,
|
tex->SetPrivateData( WKPDID_D3DDebugObjectName,
|
||||||
sizeof("WICTextureLoader")-1,
|
sizeof("WICTextureLoader")-1,
|
||||||
"WICTextureLoader"
|
"WICTextureLoader"
|
||||||
@ -593,7 +593,7 @@ HRESULT CreateWICTextureFromMemory( _In_ ID3D11Device* d3dDevice,
|
|||||||
if ( FAILED(hr))
|
if ( FAILED(hr))
|
||||||
return hr;
|
return hr;
|
||||||
|
|
||||||
#if defined(DEBUG) || defined(PROFILE)
|
#if defined(_DEBUG) || defined(PROFILE)
|
||||||
if (texture != 0 && *texture != 0)
|
if (texture != 0 && *texture != 0)
|
||||||
{
|
{
|
||||||
(*texture)->SetPrivateData( WKPDID_D3DDebugObjectName,
|
(*texture)->SetPrivateData( WKPDID_D3DDebugObjectName,
|
||||||
@ -646,7 +646,7 @@ HRESULT CreateWICTextureFromFile( _In_ ID3D11Device* d3dDevice,
|
|||||||
if ( FAILED(hr))
|
if ( FAILED(hr))
|
||||||
return hr;
|
return hr;
|
||||||
|
|
||||||
#if defined(DEBUG) || defined(PROFILE)
|
#if defined(_DEBUG) || defined(PROFILE)
|
||||||
if (texture != 0 || textureView != 0)
|
if (texture != 0 || textureView != 0)
|
||||||
{
|
{
|
||||||
CHAR strFileA[MAX_PATH];
|
CHAR strFileA[MAX_PATH];
|
||||||
@ -672,7 +672,7 @@ HRESULT CreateWICTextureFromFile( _In_ ID3D11Device* d3dDevice,
|
|||||||
if (texture != 0 && *texture != 0)
|
if (texture != 0 && *texture != 0)
|
||||||
{
|
{
|
||||||
(*texture)->SetPrivateData( WKPDID_D3DDebugObjectName,
|
(*texture)->SetPrivateData( WKPDID_D3DDebugObjectName,
|
||||||
lstrlenA(pstrName),
|
static_cast<UINT>( strnlen_s(pstrName, MAX_PATH) ),
|
||||||
pstrName
|
pstrName
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -680,7 +680,7 @@ HRESULT CreateWICTextureFromFile( _In_ ID3D11Device* d3dDevice,
|
|||||||
if (textureView != 0 && *textureView != 0 )
|
if (textureView != 0 && *textureView != 0 )
|
||||||
{
|
{
|
||||||
(*textureView)->SetPrivateData( WKPDID_D3DDebugObjectName,
|
(*textureView)->SetPrivateData( WKPDID_D3DDebugObjectName,
|
||||||
lstrlenA(pstrName),
|
static_cast<UINT>( strnlen_s(pstrName, MAX_PATH) ),
|
||||||
pstrName
|
pstrName
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user