共用方式為


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