ID3D11DeviceContextX::ConfigureQuery Method

Configures the counters used in an occlusion query.

Syntax

public:
void ConfigureQuery(
         D3D11_QUERY QueryType,
         const void *pConfiguration,
         UINT ConfigurationSize
)  

Parameters

QueryType
Type: D3D11_QUERY 

[in] Type of query to configure. Only D3D11_QUERY_OCCLUSION is currently supported.

pConfiguration
Type: void *

[in] Pointer to a set of configuration parameters. The D3D11_QUERY_OCCLUSION type is associated with parameters of the D3D11X_QUERY_CONFIG_OCCLUSION structure. Specify NULL to apply the default configuration.

ConfigurationSize
Type: UINT 

[in] Size in bytes of the configuration parameters.

Return value

None.

Remarks

While ConfigureQuery may be used with legacy semantics contexts, it operates as though fast semantics has been declared. Query configurations set on an immediate context are inherited by executed command lists, and configurations recorded into a command list will be inherited by the immediate context after execution. The one exception to command list inheritance is that a fixed sample rate (configuration Samples > 0) set on an immediate context cannot be inherited by a command list created by a deferred context assuming a non-fixed sample rate (Samples = 0).

The default configuration applied to occlusion queries is as follows:

D3D11X_QUERY_CONFIG_OCCLUSION Configuration;
Configuration.Samples = 0;
Configuration.DisableOptimizationsForCountAccuracy = FALSE;
Configuration.Counter[0].EnableEvenTargets = TRUE;
Configuration.Counter[0].EnableOddTargets = TRUE;
Configuration.Counter[0].Flags = D3D11X_QUERY_CONFIG_OCCLUSION_COUNT_DEPTH_PASS;
Configuration.Counter[1].EnableEvenTargets = FALSE;
Configuration.Counter[1].EnableOddTargets = FALSE;
Configuration.Counter[1].Flags = D3D11X_QUERY_CONFIG_OCCLUSION_COUNT_DEPTH_PASS;  

Requirements

Header: Declared in d3d11_x.h.

Library: Use d3d11_x.lib.

See also

Reference

ID3D11DeviceContextX Interface

ID3D11DeviceContextX Members