Syntax
Parameters
pBuffer [in, optional]Type: ID3D12Resource * The buffer, as an ID3D12Resource, which must be in the D3D12_RESOURCE_STATE_PREDICATION or D3D21_RESOURCE_STATE_INDIRECT_ARGUMENT state (both values are identical, and provided as aliases for clarity), or NULL to disable predication. AlignedBufferOffset [in]
Type: UINT64 The aligned buffer offset, as a UINT64. Operation [in]
Type: D3D12_PREDICATION_OP Specifies a D3D12_PREDICATION_OP, such as D3D12_PREDICATION_OP_EQUAL_ZERO or D3D12_PREDICATION_OP_NOT_EQUAL_ZERO.
Return value
Type: void None.Remarks
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 operation specified. Unlike Direct3D 11, in Direct3D 12 predication state is not inherited by direct command lists, and predication is always respected (there are no predication hints). All direct command lists begin with predication disabled. Bundles do inherit predication state. It is legal for the same predicate to be bound multiple times. Illegal API calls will result in Close returning an error, or ID3D12CommandQueue::ExecuteCommandLists dropping the command list and removing the device. The debug layer will issue errors whenever the runtime validation fails. Refer to Predication for more information.Examples
The D3D12PredicationQueries sample uses ID3D12GraphicsCommandList::SetPredication as follows:Requirements
Header: d3d12_xs.h or d3d12_x.hLibrary: d3d12_xs.lib or d3d12_x.lib
Supported Platforms: XBOX Series consoles and XBOX One family
