This project has moved and is read-only. For the latest updates, please go here.

D3D11 WARNING: ID3D11Texture2D::SetPrivateData

Nov 30, 2012 at 5:28 AM


I'm trying to load a texture before I render it in a SpriteBatch.  But I'm getting this warning printed in the output window. I never seen this in other DirectX examples, so I must be doing something wrong. Does anyone know what's wrong? (I can continue running my game, but I don't know if this is the reason why my sprite that is suppose to use this texture is completely transparent.) Thanks for any help you can provide.

D3D11 WARNING: ID3D11Texture2D::SetPrivateData: Existing private data of same name with different size found! [ STATE_SETTING WARNING #55: SETPRIVATEDATA_CHANGINGPARAMS]

Microsoft::WRL::ComPtr<ID3D11Texture2D>          m_texture;
Microsoft::WRL::ComPtr<ID3D11ShaderResourceView> m_textureView;

 BasicLoader^ loader = ref new BasicLoader(m_d3dDevice.Get());


Nov 30, 2012 at 8:28 PM
Edited Nov 30, 2012 at 8:33 PM

The standard Windows Store samples are not setting the debug name of resources which really helps when looking at the SDK Debug Layer output or when using the VS 2012 graphics debugger.

That is a harmless debug warning. Ideally the SDK Debug Layer would automatically suppress this warning whenever using WKPDID_D3DDebugObjectName.

You can either ignore it, or explicitly filter out that warning.

        ComPtr<ID3D11Debug> d3dDebug;
        if ( SUCCEEDED( d3dDevice.As(&d3dDebug) ) )
            ComPtr<ID3D11InfoQueue> d3dInfoQueue;
            if ( SUCCEEDED( d3dDebug.As(&d3dInfoQueue) ) )
                D3D11_MESSAGE_ID hide[] =

                D3D11_INFO_QUEUE_FILTER filter;
                memset( &filter, 0, sizeof(filter) );
                filter.DenyList.NumIDs = _countof(hide);
                filter.DenyList.pIDList = hide;
                d3dInfoQueue->AddStorageFilterEntries( &filter );