gx Raw

Description

This is the directly specified command list version of the DMPGL system API.

The gx Raw API is a group of functions that enable the command list-related controls of the gx API to be processed in the form of directly specified command list objects.

With the existing gx API, command list processing adheres to OpenGL style rules: you specify the IDs for objects allocated in the library and use them in a bound form. The code for the use of command lists looks something like this:

// For saving the command list ID
GLuint s_MyCmdListId;

{
    // Prepare a new command list.
    nngxGenCmdlists(1, &s_MyCmdListId);
    
    nngxBindCmdlist(s_MyCmdListId);
    nngxCmdlistStorage(MY_CMDLIST_BUFFER_SIZE, MY_CMDLIST_NUM_REQUESTS);
    nngxClearCmdlist();
}

{
    // Run the command list.
    nngxBindCmdlist(s_MyCmdListId);
    nngxRunCmdlist();
}

{
    // Destroy the command list.
    nngxDeleteCmdlists(1, &s_MyCmdListId);
}
            

In contrast, with this gx Raw function group, the definition of the nngxCommandList structure that maintains command list management information is provided, and the various functions are called with a pointer to an object of this type given as the first argument. In this case, the code for performing this same kind of process looks something like this:

// Allocate command list object.
nngxCommandList s_MyCmdListObj;

{
    // Prepare a new command list.
    GLsizei reqSize;
    GLvoid* pCmdBuffer;
    GLvoid* pReqBuffer;
    
    // The application allocates the required buffer region.
    reqSize = nngxGetCommandRequestSizeRaw(MY_CMDLIST_NUM_REQUESTS);
    pCmdBuffer = MyAlloc(MY_CMDLIST_BUFFER_SIZE);
    pReqBuffer = MyAlloc(reqSize);
    
    nngxCmdlistStorageRaw(&s_MyCmdListObj, pCmdBuffer, MY_CMDLIST_BUFFER_SIZE, pReqBuffer, reqSize);
    nngxClearCmdlistRaw(&s_MyCmdListObj);
}

{
    // Run the command list.
    nngxRunCmdlistRaw(&s_MyCmdListObj);
}

// No need to explicitly destroy the command list.
            

Although this requires that the application take complete responsibility for managing the allocating and deallocating of objects and buffer regions, it gives you more freedom to build a framework that is not dependent on the state inside the library.

The provided APIs are named like the existing functions but with "Raw" appended to the end of the name, and with the added parameter of the pointer to nngxCommandList. As long as there are no special descriptions, you can read details about operations and errors by reading the references for the existing functions. (Wherever the reference says "the current command list," replace it with "the command list specified by nngxCommandList."))

Note:

Structures

nngxCommandList The structure that maintains command list information.

Functions

Command List Execution Control
nngxCmdlistStorageRaw Allocates the data region for the specified command list.
nngxGetCommandRequestSizeRaw Calculates and returns the size of the buffer needed for storing the command list queue data.
nngxSplitDrawCmdlistRaw Splits the 3D command buffer for the specified command list.
nngxEnableCmdlistCallbackRaw Enables an exit callback for the specified command list.
nngxDisableCmdlistCallbackRaw Disables an exit callback for the specified command list.
nngxSetCmdlistCallbackRaw Sets the exit callback function for the specified command list.
nngxRunCmdlistRaw Runs the specified command list.
nngxReserveStopCmdlistRaw Presets the specified command list to stop.
nngxClearCmdlistRaw Clears commands accumulated in the specified command list.
nngxClearFillCmdlistRaw Uses the specified value to clear commands accumulated in the specified command list.
nngxSetGasAutoAccumulationUpdateRaw Updates the additive blend result from rendering gas density information for the specified command request handler of the specified command list.
nngxSetGasUpdateRaw Specifies whether to update the additive blend result from rendering gas density information for the specified command list.
nngxGetIsRunningRaw Checks whether the specified command list is running.
nngxGetUsedBufferSizeRaw Returns the size of the 3D command buffer accumulated in the specified command list.
nngxGetUsedRequestCountRaw Returns the number of command requests accumulated in the specified command list.
nngxGetMaxBufferSizeRaw Returns the maximum size of the 3D command buffer that can be accumulated in the specified command list.
nngxGetMaxRequestCountRaw Returns the maximum number of command requests that can be accumulated in the specified command list.
nngxGetTopBufferAddrRaw Returns the starting address of the 3D command buffer that has been set in the specified command list.
nngxGetRunBufferSizeRaw Returns the size of the 3D command buffer that has been executed in the specified command list.
nngxGetRunRequestCountRaw Returns the number of command requests that have been executed in the specified command list.
nngxGetTopRequestAddrRaw Returns the starting address of the buffer for storing command request queue data that has been set in the specified command list.
nngxGetNextRequestTypeRaw Returns the type of the next command request that will be executed among those command requests that have accumulated in the specified command list.
nngxGetNextBufferAddrRaw Returns the next buffer address to execute in the 3D command buffer accumulated in the specified command list.
nngxGetNextBufferSizeRaw Returns the size of the next buffer region to execute in the 3D command buffer accumulated in the specified command list.
nngxGetCurrentBufferAddrRaw For the specified command list, returns the 3D command buffer address where the next 3D command will be accumulated.
nngxGetHWStateRaw Gets 32 bits of data indicating the hardware state.
Command Cache Operations
nngxAdd3DCommandNoCacheFlushRaw For the specified command list, adds the data of the specified region (a 3D command) to the 3D command buffer.
Issuance of Low-Level Command Requests
nngxFlush3DCommandNoCacheFlushRaw Issues a render command request and flushes the accumulated 3D command buffer in the specified command list.
nngxFlush3DCommandPartiallyRaw Issues a render command request and flushes the accumulated 3D command buffer in the specified command list. However, 3D commands are only executed for the specified size.
nngxMoveCommandbufferPointerRaw Moves the current output-destination pointer of the 3D command buffer in the specified command list.
nngxAddB2LTransferCommandRaw Adds a command to the specified command list to convert a block image to a linear image and then transfer it.
nngxAddBlockImageCopyCommandRaw Adds a command to the specified command list to transfer a block image.
nngxAddL2BTransferCommandRaw Adds a command to the specified command list to convert a linear image to a block image and then transfer it.
nngxAddMemoryFillCommandRaw Adds a memory-fill command to the specified command list.
nngxAddVramDmaCommandNoCacheFlushRaw Adds a DMA transfer command to the specified command list.
nngxFilterBlockImageRaw Adds a command to the specified command list to transfer a block image anti-aliasing filter.

Revision History

2012/06/14
Added a list of the gx command list processing functions that can be used at the same time as the gx Raw functions.
2012/05/09
Initial version.

CONFIDENTIAL