# D3D11InfoQueue Isn't filtering out messages

I have followed the Coordinator's code advice from this page on how to query and filter the messages in the debug layer but it doesn't seem to be working. You can see from the following code that I try to filter out 2 messages but they still keep zinging by in debug output. Does anyone know how to do this correctly? Here is the code:

void CDebugLayer::CreateD3DDebugLayer(void)
{
{
{
#ifdef _DEBUG
s_spD3DInfoQueue->SetBreakOnSeverity(D3D11_MESSAGE_SEVERITY_CORRUPTION, true);
s_spD3DInfoQueue->SetBreakOnSeverity(D3D11_MESSAGE_SEVERITY_ERROR, true);
//s_spD3DInfoQueue->SetBreakOnSeverity(D3D11_MESSAGE_SEVERITY_WARNING, true);
//s_spD3DInfoQueue->SetBreakOnSeverity(D3D11_MESSAGE_SEVERITY_INFO, true);
//s_spD3DInfoQueue->SetBreakOnSeverity(D3D11_MESSAGE_SEVERITY_MESSAGE, true);
#endif

D3D11_MESSAGE_ID stHide [] =
{
D3D11_MESSAGE_ID_SETPRIVATEDATA_CHANGINGPARAMS,
D3D11_MESSAGE_ID_OFFERRELEASE_NOT_SUPPORTED
// Add more message IDs here as needed
};

D3D11_INFO_QUEUE_FILTER stFilter;
memset(&stFilter, 0, sizeof(stFilter));
stFilter.DenyList.NumIDs  = _countof(stHide);
stFilter.DenyList.pIDList = stHide;
assert(hr == S_OK);

D3D11_INFO_QUEUE_FILTER stFilter2;
memset(&stFilter2, 0, sizeof(stFilter2));
SIZE_T ByteLength;

// Perform debug tracking to confirm what is being stored
uiNumMsgs = s_spD3DInfoQueue->GetNumMessagesAllowedByStorageFilter(); // = 7
hr = s_spD3DInfoQueue->GetStorageFilter(&stFilter2, &ByteLength);
assert(hr == S_OK);
uiNumMsgs = s_spD3DInfoQueue->GetNumMessagesDeniedByStorageFilter();  // = 0

//Pass copy to Application then store in CEngine for global engine access
s_pApplication->m_spEngine->SetDebug(s_spD3DDebug.Get());
}
}
} // CreateD3DDebugLayer


EDIT This is the error message I'm trying to filter out: D3D11 INFO: ID3D11DeviceContext::OfferResources: OfferResources is not supported on operating systems older than Windows 8. It is valid to call OfferResources, and an offerred resource must still be acquired with ReclaimResources before using it, however there is no benefit to calling OfferResources on this operating system besides testing the code path for Windows 8. [ EXECUTION INFO #3146071: OFFERRELEASE_NOT_SUPPORTED]

Caused by:

ID2D1DeviceContext->EndDraw()


on Windows 7 Sp1 x64. Using Windows SDK 8.1.

• I don't want to have to use ID3D11InfoQueue::SetMuteDebugOutput() before and after the culprit code that causes the messages. – Elixir Mar 22 '15 at 21:19
• Can you post the example output you are getting (i.e. the exact message number)? Where is your d3d11sdklayers.h coming from (legacy DirectX SDK, Windows 8.0 SDK, Windows 8.1 SDK)? What version of the OS are you using? – Chuck Walbourn Mar 23 '15 at 20:56