ID3D12InfoQueue::AddRetrievalFilterEntries 方法 (d3d12sdklayers.h)

将存储筛选器添加到检索筛选器堆栈的顶部。

语法

HRESULT AddRetrievalFilterEntries(
  [in] D3D12_INFO_QUEUE_FILTER *pFilter
);

参数

[in] pFilter

类型: D3D12_INFO_QUEUE_FILTER*

检索筛选器数组。

返回值

类型: HRESULT

此方法返回 Direct3D 12 返回代码之一。

注解

下面的代码示例演示如何使用此方法:

 
D3D12_MESSAGE_CATEGORY cats[] = { ..., ..., ... };
D3D12_MESSAGE_SEVERITY sevs[] = { ..., ..., ... };
D3D12_MESSAGE_ID ids[] = { ..., ..., ... };

D3D12_INFO_QUEUE_FILTER filter;
memset( &filter, 0, sizeof(filter) );

// To set the type of messages to allow, 
// set filter.AllowList as follows:
filter.AllowList.NumCategories = _countof(cats);
filter.AllowList.pCategoryList = cats;
filter.AllowList.NumSeverities = _countof(sevs);
filter.AllowList.pSeverityList = sevs;
filter.AllowList.NumIDs = _countof(ids);
filter.AllowList.pIDList = ids;

// To set the type of messages to deny, set filter.DenyList 
// similarly to the preceding filter.AllowList.

// The following single call sets all of the preceding information.
hr = infoQueue->AddRetrievalFilterEntries( &filter );
 

要求

要求
目标平台 Windows
标头 d3d12sdklayers.h

另请参阅

ID3D12InfoQueue