D3D12: Log warning if missing SDK layers

Log warning (vs ASSERT) if SDK layers are not installed.

Bug: dawn:460
Change-Id: Idd5266b3d0781b09bda903fa0bc843f6600b2447
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/40580
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
This commit is contained in:
Bryan Bernhart 2021-02-06 03:23:05 +00:00 committed by Commit Bot service account
parent 7fe5aa2eac
commit 2831f05840
2 changed files with 4 additions and 2 deletions

View File

@ -188,7 +188,8 @@ namespace dawn_native { namespace d3d12 {
filter.DenyList.pIDList = denyIds;
ComPtr<ID3D12InfoQueue> infoQueue;
ASSERT_SUCCESS(mD3d12Device.As(&infoQueue));
DAWN_TRY(CheckHRESULT(mD3d12Device.As(&infoQueue),
"D3D12 QueryInterface ID3D12Device to ID3D12InfoQueue"));
// To avoid flooding the console, a storage-filter is also used to
// prevent messages from getting logged.

View File

@ -558,7 +558,8 @@ namespace dawn_native { namespace d3d12 {
}
ComPtr<ID3D12InfoQueue> infoQueue;
ASSERT_SUCCESS(mD3d12Device.As(&infoQueue));
DAWN_TRY(CheckHRESULT(mD3d12Device.As(&infoQueue),
"D3D12 QueryInterface ID3D12Device to ID3D12InfoQueue"));
uint64_t totalErrors = infoQueue->GetNumStoredMessagesAllowedByRetrievalFilter();
// Check if any errors have occurred otherwise we would be creating an empty error. Note