Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ID3D11Device::CreateCounter method

Create a counter object for measuring GPU performance.

Syntax


HRESULT CreateCounter(
  [in]            const D3D11_COUNTER_DESC *pCounterDesc,
  [out, optional]       ID3D11Counter      **ppCounter
);

Parameters

pCounterDesc [in]

Type: const D3D11_COUNTER_DESC*

Pointer to a counter description (see D3D11_COUNTER_DESC).

ppCounter [out, optional]

Type: ID3D11Counter**

Address of a pointer to a counter (see ID3D11Counter).

Return value

Type: HRESULT

If this function succeeds, it will return S_OK. If it fails, possible return values are: S_FALSE, E_OUTOFMEMORY, DXGI_ERROR_UNSUPPORTED, DXGI_ERROR_NONEXCLUSIVE, or E_INVALIDARG.

DXGI_ERROR_UNSUPPORTED is returned whenever the application requests to create a well-known counter, but the current device does not support it.

DXGI_ERROR_NONEXCLUSIVE indicates that another device object is currently using the counters, so they cannot be used by this device at the moment.

E_INVALIDARG is returned whenever an out-of-range well-known or device-dependent counter is requested, or when the simulataneously active counters have been exhausted.

Requirements

Header

D3D11.h

Library

D3D11.lib

See also

ID3D11Device

 

 

Show:
© 2017 Microsoft