diff --git a/src/dawn_native/d3d12/AdapterD3D12.cpp b/src/dawn_native/d3d12/AdapterD3D12.cpp index 364e6c13e8..f271e7612c 100644 --- a/src/dawn_native/d3d12/AdapterD3D12.cpp +++ b/src/dawn_native/d3d12/AdapterD3D12.cpp @@ -169,6 +169,11 @@ namespace dawn_native { namespace d3d12 { ComPtr infoQueue; ASSERT_SUCCESS(mD3d12Device.As(&infoQueue)); + // To avoid flooding the console, a storage-filter is also used to + // prevent messages from getting logged. + DAWN_TRY(CheckHRESULT(infoQueue->PushStorageFilter(&filter), + "ID3D12InfoQueue::PushStorageFilter")); + DAWN_TRY(CheckHRESULT(infoQueue->PushRetrievalFilter(&filter), "ID3D12InfoQueue::PushRetrievalFilter")); @@ -182,6 +187,7 @@ namespace dawn_native { namespace d3d12 { ComPtr infoQueue; ASSERT_SUCCESS(mD3d12Device.As(&infoQueue)); infoQueue->PopRetrievalFilter(); + infoQueue->PopStorageFilter(); } ResultOrError Adapter::CreateDeviceImpl(const DeviceDescriptor* descriptor) { diff --git a/src/tests/DawnTest.cpp b/src/tests/DawnTest.cpp index 4b9ad15c21..5873da83d2 100644 --- a/src/tests/DawnTest.cpp +++ b/src/tests/DawnTest.cpp @@ -187,6 +187,11 @@ void DawnTestEnvironment::SetEnvironment(DawnTestEnvironment* env) { DawnTestEnvironment::DawnTestEnvironment(int argc, char** argv) { ParseArgs(argc, argv); + if (mEnableBackendValidation) { + mPlatformDebugLogger = + std::unique_ptr(utils::CreatePlatformDebugLogger()); + } + // Create a temporary instance to select available and preferred adapters. This is done before // test instantiation so GetAvailableAdapterTestParamsForBackends can generate test // parameterizations all selected adapters. We drop the instance at the end of this function