nngxExportCmdlist Function

Syntax

NNGX_APICALL GLsizei NNGX_APIENTRY nngxExportCmdlist(
     GLuint cmdlist,
     GLuint bufferoffset,
     GLsizei buffersize,
     GLuint requestid,
     GLsizei requestsize,
     GLsizei datasize,
     GLvoid * data
);

Arguments

Name Description
in cmdlist Saved command list object.
in bufferoffset Offset (in bytes) from the starting address of the 3D command buffer to the first address to export.
in buffersize Size (in bytes) of the 3D command buffer to export.
in requestid ID of the first command request to export.
in requestsize Number of command requests to export.
in datasize Size (in bytes) of the data region.
in data Pointer to a region used to store the exported data.

Return Values

There is no return value.

Description

Exports the specified command list as binary data in memory.

bufferoffset specifies the offset (in bytes) from the starting address of the 3D command buffer to the first address to export. buffersize specifies the number of bytes to export from the 3D command buffer. requestid specifies the ID of the first command request to export. Command request IDs start at 0 and increase sequentially in the order that commands are accumulated. requestsize specifies the number of command requests to export. To determine which values to specify for bufferoffset, buffersize, requestid, and requestsize while commands are accumulating, call the nngxGetCmdlistParameteri function and get both the size of the accumulated 3D command buffer and the size of command requests. For pname, specify NN_GX_CMDLIST_USED_BUFSIZE to get the size of the accumulated 3D command buffer. Specify NN_GX_CMDLIST_USED_REQCOUNT to get the number of accumulated command requests.

data specifies a pointer to a region used to store the exported data. datasize specifies the size (in bytes) of the data region. Nothing is exported if the data argument is 0. The size (in bytes) of the exported data is returned.

Typically, you would call this function, specifying 0 for data, to obtain the required data size for exporting, then you would allocate a data region and call this function again. You can call nngxImportCmdlist to import and use the exported data.

You must specify a valid combination of values for the bufferoffset, buffersize, requestid, and requestsize parameters.

When exporting command requests, you must start at a 3D command buffer address within the region executed by the first render command request among the command requests to export.

This function exports a 3D command buffer without checking its content; consequently, the exported data may not behave correctly and errors may not be detected. To safely export data, we recommend that you use the save information obtained by the nngxStopCmdlistSave function. Alternatively, Nintendo recommends that the pair of values you use for bufferoffset and requestid, as well as the pair of values you use for buffersize and requestsize, were obtained at the same time during the same call to the nngxGetCmdlistParameteri function.

The following errors occur in this function.

GL_ERROR_803B_DMPInvalid value specified for cmdlist.
GL_ERROR_803C_DMPThe size of data to export is greater than datasize.
GL_ERROR_803D_DMPThe bufferoffset, buffersize, requestid, and requestsize arguments specify a region without any accumulated commands.
GL_ERROR_803E_DMPThe bufferoffset or buffersize argument is not 8-byte aligned.
GL_ERROR_803F_DMPThe command request includes a render command request that was added using nngxUseSavedCmdlist without copying the 3D command buffer.
GL_ERROR_8040_DMPThe bufferoffset or buffersize argument has not properly specified the 3D command buffer that is used to run an exported 3D execution command.

See Also

nngxImportCmdlist

Revision History

2012/02/03
Fixed accidental omission of error code GL_ERROR_803B_DMP.
2011/10/04
Added See Also section.
2010/07/07
Deleted potentially misleading explanation.
2010/03/12
Initial version.

CONFIDENTIAL