nn::gd::CTR::System::StartRecordingPackets Member Function

Syntax

static nnResult StartRecordingPackets(
     u32 * forceDirtyModuleFlag,
     RecordingPacketUsage usage = RECORD_COMMAND_LIST_COPY
);

Parameters

Name Description
in forceDirtyModuleFlag Specifies the flag that sets reconfigurable status for the command of a particular module. Module status does not change when NULL is specified. If not an immediate function, the command is generated in the command buffer when the rendering command executes. Depending on the current status of the Gd API, commands generated by non-immediate functions do not always need to be sent following the call. The forceDirtyModuleFlag can be used at a time such as when you want to send a command of a module specified by the user by flag. The StartRecordingPackets function uses this flag to internally call the ForceDirty function.
in usage If RECORD_COMMAND_LIST_COPY is specified, command packets are copied to another buffer. You can edit and execute command packets that are stored in a user buffer. When the command packets are executed, they are copied to the internal command buffer managed by GD functions. CPU time is necessary to copy these to the command buffer.

Return Values

Returns the result of the operation.
Value Description
Result::IsSuccess Process was successful.
ResultSystemAPacketIsAlreadyBeingRecorded Save has already started.
ResultOutOfMemory Could not allocate memory.
ResultSystemReceiveErrorFromGlGetError An error was generated by the nngxStartCmdlistSave function.
ResultInvalidParameter The parameter is invalid.

Description

Starts saving the current command list object. forceDirtyModuleFlag can be specified by OR'ing System::Module enum members.

If saving other packets has already started, saving new packets does not start. If the function you tried to execute is not an immediate function, the command may not be generated even if executed between calls to StartRecordingPackets and StopRecordingPackets. (For example, nothing changes when you set a state that is already set. Use forceDirtyModuleFlag if you always want to generate a command for the executed function.

When saving packets, it is often more convenient to use immediate functions rather than conventional functions. Immediate functions allow you to control whether to save commands inside the saved packet. The Shader uniform variable has the same sort of functionality. ShaderStage::SetFloatConstantBuffer)

If RECORD_3D_COMMAND_BUFFER_FOR_JUMP is set for RecordingPacketUsage, the GD API will save only the 3D command buffer. A request is not inserted in the command request list in this case. In all other cases, an error occurs if the System::StopRecordingPackets has executed.

If RECORD_COMMAND_LIST_NO_COPY is specified, command packets are not copied. Instead, the ones already stored in the GD functions' internal command buffer are used. This speeds up the System::StopRecordingPackets and System::ReplayPackets functions by the amount of time that would have been spent copying command packets. However, command packets cannot be edited and executed, nor can they be reused after the command buffer is cleared.

If RECORD_3D_COMMAND_BUFFER_FOR_JUMP has been specified, the 3D command buffer being managed by GD is copied to another buffer. The GD API jumps to the copied command at the jump command inserted by the nngxAddSubroutineCommand() function after SystemReplayPackets() executes.

See Also

System::GetCommandBufferOffset
System::GetCommandBufferBaseAddress
System::StopRecordingPackets
System::ReplayPackets
System::ReleasePackets

Revision History

2011/02/17
Initial version.

CONFIDENTIAL