Saves the GPU state for suspension at a time that is known good by the title.
public:
HRESULT Suspend(
UINT Flags
)
Flags
Type: UINT
[in] Flags to control the suspending. Must be 0. Intended to control whether ESRAM is saved, in a future release.
Type: HRESULT
One of the Direct3D 11 return codes.
Suspend and ID3D11DeviceContextX::Resume must be called from the title’s render thread, to save GPU state in a known-good state. Calling Suspend suspends the GPU and saves the GPU state. The GPU state can be loaded back later in the ID3D11DeviceContextX::Resume event handler.
When the title is suspended, the title cannot render anything until the GPU is resumed. Calling any Direct3D APIs in between Direct3D Suspend and Resume calls, such as calling ID3D11DeviceContext::Draw… methods, will throw an exception.
In the Suspended state, the app’s memory is left intact, but the app has no CPU or GPU resources. The Suspend and Resume methods are for exclusive apps, which omit the prolog and epilog to gain performance.
Shared apps don’t need explicit support calls for Suspend and Resume because GPU state will be implicitly saved between GPU kickoffs, using the prolog and epilog, which are present only for shared apps.
For information about the PLM states, see App States.
This method is used in the GPU Suspend and Resume sample.
For more information, see Direct3D Support for Suspend and Resume.
Header: Declared in d3d11_x.h.
Library: Use d3d11_x.lib.