ID3D11DeviceContextX::PIXBeginEvent Method

Starts a user-defined event for GPU captures.

Syntax

public:
INT PIXBeginEvent(
         LPCWSTR Name
)  

Parameters

Name
Type: LPCWSTR 

[in] The name of the event.

Return value

Type: INT 

The nested depth of user event calls.

Remarks

Each call to PIXBeginEvent must be paired with a corresponding call to ID3D11DeviceContextX::PIXEndEvent.

PIXBeginEvent is used to put user events into a PIX capture. Anything that happens between a PIXBeginEvent("foo") and PIXEndEvent() pair will be identified as being a part of a user event named “foo”.

See also the PIXBeginEvent function, in Tools: PIX Reference.

Example

Returning the nested depth of user event calls:

C++

PIXBeginEvent("foo") // Returns 0, as there are no preceding events.
PIXBeginEvent("bar") // Returns 1, as the call is inside of event "foo".
PIXBeginEvent("baz") // Returns 2, as the call is inside of events "foo" and "bar".
PIXEndEvent()        // Returns 2, as the call is inside of events "foo" and "bar".
PIXEndEvent()        // Returns 1, as the call is inside of event "foo".
PIXEndEvent()        // Returns 0, as there are no enclosing user events.  

Requirements

Header: Declared in d3d11_x.h.

Library: Use d3d11_x.lib.

See also

PIX API Reference

Reference

ID3D11DeviceContextX Interface

ID3D11DeviceContextX Members