mirror of
https://github.com/microsoft/DirectXTex.git
synced 2025-07-09 11:40:14 +02:00
DDSTextureLoader - cleaned up debug sdk layer name setting
This commit is contained in:
parent
e85504e967
commit
505949d763
@ -866,7 +866,7 @@ static HRESULT CreateD3DResources( _In_ ID3D11Device* d3dDevice,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#if defined(DEBUG) || defined(PROFILE)
|
#if defined(_DEBUG) || defined(PROFILE)
|
||||||
tex->SetPrivateData( WKPDID_D3DDebugObjectName,
|
tex->SetPrivateData( WKPDID_D3DDebugObjectName,
|
||||||
sizeof("DDSTextureLoader")-1,
|
sizeof("DDSTextureLoader")-1,
|
||||||
"DDSTextureLoader" );
|
"DDSTextureLoader" );
|
||||||
@ -950,7 +950,7 @@ static HRESULT CreateD3DResources( _In_ ID3D11Device* d3dDevice,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#if defined(DEBUG) || defined(PROFILE)
|
#if defined(_DEBUG) || defined(PROFILE)
|
||||||
tex->SetPrivateData( WKPDID_D3DDebugObjectName,
|
tex->SetPrivateData( WKPDID_D3DDebugObjectName,
|
||||||
sizeof("DDSTextureLoader")-1,
|
sizeof("DDSTextureLoader")-1,
|
||||||
"DDSTextureLoader"
|
"DDSTextureLoader"
|
||||||
@ -1007,7 +1007,7 @@ static HRESULT CreateD3DResources( _In_ ID3D11Device* d3dDevice,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#if defined(DEBUG) || defined(PROFILE)
|
#if defined(_DEBUG) || defined(PROFILE)
|
||||||
tex->SetPrivateData( WKPDID_D3DDebugObjectName,
|
tex->SetPrivateData( WKPDID_D3DDebugObjectName,
|
||||||
sizeof("DDSTextureLoader")-1,
|
sizeof("DDSTextureLoader")-1,
|
||||||
"DDSTextureLoader" );
|
"DDSTextureLoader" );
|
||||||
@ -1310,7 +1310,7 @@ HRESULT CreateDDSTextureFromMemory( _In_ ID3D11Device* d3dDevice,
|
|||||||
maxsize
|
maxsize
|
||||||
);
|
);
|
||||||
|
|
||||||
#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,
|
||||||
@ -1368,7 +1368,7 @@ HRESULT CreateDDSTextureFromFile( _In_ ID3D11Device* d3dDevice,
|
|||||||
maxsize
|
maxsize
|
||||||
);
|
);
|
||||||
|
|
||||||
#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];
|
||||||
@ -1394,7 +1394,7 @@ HRESULT CreateDDSTextureFromFile( _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
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -1402,7 +1402,7 @@ HRESULT CreateDDSTextureFromFile( _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…
x
Reference in New Issue
Block a user