Export (0) Print
Expand All

ID3D10Asynchronous::GetData method

Get data from the GPU asynchronously.

Syntax


HRESULT GetData(
  [out]  void *pData,
  [in]   UINT DataSize,
  [in]   UINT GetDataFlags
);

Parameters

pData [out]

Type: void*

Address of memory that will receive the data. If NULL, GetData will be used only to check status. The type of data output depends on the type of asynchronous interface. See Remarks.

DataSize [in]

Type: UINT

Size of the data to retrieve or 0. This value can be obtained with ID3D10Asynchronous::GetDataSize. Must be 0 when pData is NULL.

GetDataFlags [in]

Type: UINT

Optional flags. Can be 0 or any combination of the flags enumerated by D3D10_ASYNC_GETDATA_FLAG.

Return value

Type: HRESULT

If this function succeeds, it returns S_OK. Otherwise, possible return values are the following:

  • S_FALSE
  • DXGI_ERROR_DEVICE_REMOVED
  • DXGI_ERROR_INVALID_CALL

Remarks

GetData retrieves the data collected between calls to ID3D10Asynchronous::Begin and ID3D10Asynchronous::End. Certain queries only require a call to ID3D10Asynchronous::End in which case the data returned by GetData is accurate up to the last call to ID3D10Asynchronous::End (See ID3D10Query Interface).

If DataSize is 0, GetData is only used to check status where a return value of S_OK indicates that data is available to give to an application, and a return value of S_FALSE indicates data is not yet available.

It is invalid to invoke this function on a predicate created with the flag D3D10_QUERY_MISCFLAG_PREDICATEHINT.

If the asynchronous interface that calls this function is ID3D10Query Interface, then the following table applies.

Query TypeOutput Data TypeSupports Begin Method
D3D10_QUERY_EVENTBOOLNO
D3D10_QUERY_OCCLUSIONUINT64YES
D3D10_QUERY_TIMESTAMPUINT64NO
D3D10_QUERY_TIMESTAMP_DISJOINTD3D10_QUERY_DATA_TIMESTAMP_DISJOINTYES
D3D10_QUERY_PIPELINE_STATISTICSD3D10_QUERY_DATA_PIPELINE_STATISTICSYES
D3D10_QUERY_OCCLUSION_PREDICATEBOOLYES
D3D10_QUERY_SO_STATISTICSD3D10_QUERY_DATA_SO_STATISTICSYES
D3D10_QUERY_SO_OVERFLOW_PREDICATEBOOLYES

 

If the asynchronous interface that calls this API is ID3D10Counter Interface, then the following applies.

Counter TypeOutput Data TypeUnits
D3D10_COUNTER_GPU_IDLEFLOAT32fraction of time
D3D10_COUNTER_VERTEX_PROCESSINGFLOAT32fraction of time
D3D10_COUNTER_GEOMETRY_PROCESSINGFLOAT32fraction of time
D3D10_COUNTER_PIXEL_PROCESSINGFLOAT32fraction of time
D3D10_COUNTER_OTHER_GPU_PROCESSINGFLOAT32fraction of time
D3D10_COUNTER_HOST_ADAPTER_BANDWIDTH_UTILIZATIONFLOAT32fraction of theoretical maximum
D3D10_COUNTER_LOCAL_VIDMEM_BANDWIDTH_UTILIZATIONFLOAT32fraction of theoretical maximum
D3D10_COUNTER_VERTEX_THROUGHPUT_UTILIZATIONFLOAT32fraction of theoretical maximum
D3D10_COUNTER_TRIANGLE_SETUP_THROUGHPUT_UTILIZATIONFLOAT32fraction of theoretical maximum
D3D10_COUNTER_FILLRATE_THROUGHPUT_UTILIZATIONFLOAT32fraction of theoretical maximum
D3D10_COUNTER_VS_MEMORY_LIMITEDFLOAT32fraction of time
D3D10_COUNTER_VS_COMPUTATION_LIMITEDFLOAT32fraction of time
D3D10_COUNTER_GS_MEMORY_LIMITEDFLOAT32fraction of time
D3D10_COUNTER_GS_COMPUTATION_LIMITEDFLOAT32fraction of time
D3D10_COUNTER_PS_MEMORY_LIMITEDFLOAT32fraction of time
D3D10_COUNTER_PS_COMPUTATION_LIMITEDFLOAT32fraction of time
D3D10_COUNTER_POST_TRANSFORM_CACHE_HIT_RATEFLOAT32fraction
D3D10_COUNTER_TEXTURE_CACHE_HIT_RATEFLOAT32fraction

 

The value returned by a D3D10_COUNTER_GPU_IDLE, D3D10_COUNTER_VERTEX_PROCESSING, D3D10_COUNTER_GEOMETRY_PROCESSING, D3D10_COUNTER_PIXEL_PROCESSING, or D3D10_COUNTER_OTHER_GPU_PROCESSING counter may be different depending on the number of parallel counters that exist on a video card, and those values can be interpreted with the following equation:

Equation to interpret the number of parallel counters

The number of parallel counters that a video card has is available from NumDetectableParallelUnits in D3D10_COUNTER_INFO, and it can be retrieved by calling ID3D10Device::CheckCounterInfo.

Requirements

Header

D3D10.h

Library

D3D10.lib

See also

ID3D10Asynchronous Interface

 

 

Community Additions

ADD
Show:
© 2014 Microsoft