nngxAddL2BTransferCommand Function

Syntax

NNGX_APICALL void NNGX_APIENTRY nngxAddL2BTransferCommand(
     const GLvoid * srcaddr,
     GLvoid * dstaddr,
     GLsizei width,
     GLsizei height,
     GLenum format,
     GLsizei blocksize
);

Arguments

Name Description
in srcaddr Transfer source linear image address.
out dstaddr Transfer source block image storage address.
in width Transfer source and destination image width.
in height Transfer source and destination image height.
in format Transfer image pixel format.
in blocksize Block image block size (8 or 32).

Return Values

There is no return value.

Description

Adds a command to convert from a linear image into a block image and then to transfer it.

This function converts a linear image to a block image. (In other words, it converts from the format used for display to the format used for rendering.) Although the nngxTransferLinearImage function provides equivalent functionality, this function has more general uses. Also, like nngxTransferLinearImage, this function only adds a transfer request command without adding a 3D split command.

Specify the start address of the transfer source linear image with the srcaddr argument. Specify the start address of the transfer destination block image with the dstaddr argument. Both srcaddr and dstaddr must be 16-byte aligned.

Specify the width and height of both the original and transferred images (in pixels) with width and height. Both images must have the same width and height. These dimensions must all be multiples of the block size. The block size is either 8 or 32. However, if the transferred image uses 24 bits per pixel and a block size of 8, the width must be a multiple of 32. This function exits without adding any commands if either width or height is 0.

Specify the pixel format of the transferred image with the format argument. The original image must have the same format as the transferred image. The exception is when format is 24-bit, in which case the original image must use a 32-bit format. For each four-byte block of the original data that is transferred, the first byte is discarded. (The hardware does not support transfers between 24-bit formats. ) Specify the pixel format with one of the following macros.

GL_RGBA8_OES32-bit RGBA8
GL_RGB8_OES24-bit RGB8
GL_RGBA416-bit RGBA4
GL_RGB5_A116-bit RGBA5551
GL_RGB56516-bit RGB565

Specify blocksize to be 8 or 32. When set to 8, the image is converted to a block image with a block size of 8. When set to 32, the image is converted to a block image with a block size of 32.

The following errors occur with this function.

GL_ERROR_806F_DMP0 is bound to the current command list or the command request queue is full.
GL_ERROR_8070_DMPsrcaddr or dstaddr is not 16-byte aligned.
GL_ERROR_8071_DMPblocksize is neither 8 nor 32.
GL_ERROR_8072_DMPThe width or height argument is set to an invalid value.
GL_ERROR_8073_DMPThe format argument is set to an invalid value.

Revision History

2010/09/15
Initial version.

CONFIDENTIAL