Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Set a rendering predicate.
void SetPredication(
[in, optional] ID3D11Predicate *pPredicate,
[in] BOOL PredicateValue
);
[in, optional] pPredicate
Type: ID3D11Predicate*
A pointer to the ID3D11Predicate interface that represents the rendering predicate. A NULL value indicates "no" predication; in this case, the value of PredicateValue is irrelevant but will be preserved for ID3D11DeviceContext::GetPredication.
[in] PredicateValue
Type: BOOL
If TRUE, rendering will be affected by when the predicate's conditions are met. If FALSE, rendering will be affected when the conditions are not met.
None
The predicate must be in the "issued" or "signaled" state to be used for predication. While the predicate is set for predication, calls to ID3D11DeviceContext::Begin and ID3D11DeviceContext::End are invalid.
Use this method to denote that subsequent rendering and resource manipulation commands are not actually performed if the resulting predicate data of the predicate is equal to the PredicateValue. However, some predicates are only hints, so they may not actually prevent operations from being performed.
The primary usefulness of predication is to allow an application to issue rendering and resource manipulation commands without taking the performance hit of spinning, waiting for ID3D11DeviceContext::GetData to return. So, predication can occur while ID3D11DeviceContext::GetData returns S_FALSE. Another way to think of it: an application can also use predication as a fallback, if it is possible that ID3D11DeviceContext::GetData returns S_FALSE. If ID3D11DeviceContext::GetData returns S_OK, the application can skip calling the rendering and resource manipulation commands manually with its own application logic.
Rendering and resource manipulation commands for Direct3D 11 include these Draw, Dispatch, Copy, Update, Clear, Generate, and Resolve operations.
Requirement | Value |
---|---|
Target Platform | Windows |
Header | d3d11.h |
Library | D3D11.lib |
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today