Disable two D3D11 warnings that would sometimes spam the output log for certain WebGL content.

These warnings identified when we set a render target that was bound as a shader resource, and were benign. TRAC #22642 Signed-off-by: Nicolas Capens Signed-off-by: Shannon Woods Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1948 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 047dc625
...@@ -39,6 +39,12 @@ ...@@ -39,6 +39,12 @@
#include "libEGL/Display.h" #include "libEGL/Display.h"
#ifdef _DEBUG
// this flag enables suppressing some spurious warnings that pop up in certain WebGL samples
// and conformance tests. to enable all warnings, remove this define.
#define ANGLE_SUPPRESS_D3D11_HAZARD_WARNINGS 1
#endif
namespace rx namespace rx
{ {
static const DXGI_FORMAT RenderTargetFormats[] = static const DXGI_FORMAT RenderTargetFormats[] =
...@@ -203,6 +209,29 @@ EGLint Renderer11::initialize() ...@@ -203,6 +209,29 @@ EGLint Renderer11::initialize()
return EGL_NOT_INITIALIZED; return EGL_NOT_INITIALIZED;
} }
// Disable some spurious D3D11 debug warnings to prevent them from flooding the output log
#if defined(ANGLE_SUPPRESS_D3D11_HAZARD_WARNINGS) && defined(_DEBUG)
ID3D11InfoQueue *infoQueue;
result = mDevice->QueryInterface(__uuidof(ID3D11InfoQueue), (void **)&infoQueue);
if (SUCCEEDED(result))
{
D3D11_MESSAGE_ID hideMessages[] =
{
D3D11_MESSAGE_ID_DEVICE_OMSETRENDERTARGETS_HAZARD,
D3D11_MESSAGE_ID_DEVICE_PSSETSHADERRESOURCES_HAZARD
};
D3D11_INFO_QUEUE_FILTER filter = {0};
filter.DenyList.NumIDs = ArraySize(hideMessages);
filter.DenyList.pIDList = hideMessages;
infoQueue->AddStorageFilterEntries(&filter);
infoQueue->Release();
}
#endif
unsigned int maxSupportedSamples = 0; unsigned int maxSupportedSamples = 0;
unsigned int rtFormatCount = ArraySize(RenderTargetFormats); unsigned int rtFormatCount = ArraySize(RenderTargetFormats);
unsigned int dsFormatCount = ArraySize(DepthStencilFormats); unsigned int dsFormatCount = ArraySize(DepthStencilFormats);
......
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