nngxExportCmdlist Function
NNGX_APICALL GLsizei NNGX_APIENTRY nngxExportCmdlist(
GLuint cmdlist,
GLuint bufferoffset,
GLsizei buffersize,
GLuint requestid,
GLsizei requestsize,
GLsizei datasize,
GLvoid * data
);
| 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. |
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 nngxGetCmdlistParameteri and get both the size of the accumulated 3D command buffer and the size of command requests. Set pname to NN_GX_CMDLIST_USED_BUFSIZE or NN_GX_CMDLIST_USED_REQCOUNT to get the size of the accumulated 3D command buffer or the number of accumulated command requests, respectively.
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 set to 0. The size (in bytes) of the exported data is returned.
You are expected to first call this function with data specified as 0, then using the return value as the required data size (for exporting) allocate a data region, and finally call this function again. You can call nngxImportCmdlist to import and use the exported data.
You must specify the combination of values without any conflict for the bufferoffset, buffersize, requestid, and requestsize arguments.
When exporting command requests, you must start at a 3D command buffer address within the region used to execute the first 3D execution command.
This function exports a 3D command buffer without checking its content; consequently, the exported data may not not behave correctly and errors may not be detected. To safely export data, we recommend that you use the save information obtained by nngxStopCmdlistSave. Alternatively, make sure 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 nngxGetCmdlistParameteri.
The following errors occur in this function.
| GL_ERROR_803C_DMP | The size of data to export is greater than datasize. |
|---|---|
| GL_ERROR_803D_DMP | The bufferoffset, buffersize, requestid, and requestsize arguments specify a region without any accumulated commands. |
| GL_ERROR_803E_DMP | The bufferoffset or buffersize argument is not 8-byte aligned. |
| GL_ERROR_803F_DMP | Any of the command requests are 3D execution commands added using nngxUseSavedCmdlist without copying the 3D command buffer. |
| GL_ERROR_8040_DMP | The bufferoffset or buffersize argument has not properly specified the 3D command buffer that is used to run an exported 3D execution command. |
CONFIDENTIAL