1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <meta http-equiv="Content-Style-Type" content="text/css" /> 6 <link rel="stylesheet" href="../css/manpage.css" type="text/css" /> 7<title>nngxAddL2BTransferCommand</title> 8 </head> 9 <body> 10<h1><CODE>nngxAddL2BTransferCommand</CODE> Function</h1> 11<h2>Syntax</h2> 12 <div class="section"> 13 <pre class="definition"> 14NNGX_APICALL void NNGX_APIENTRY nngxAddL2BTransferCommand( 15 const GLvoid * srcaddr, 16 GLvoid * dstaddr, 17 GLsizei width, 18 GLsizei height, 19 GLenum format, 20 GLsizei blocksize 21); 22</pre> 23 </div> 24<h2>Parameters</h2> 25 <div class="section"> 26 <table class="arguments"> 27 <thead> 28 <tr> 29 <td width="15" /> 30<th>Name</th> 31<td>Description</td> 32 </tr> 33 </thead> 34 <tr> 35<td>in</td> 36<th>srcaddr</th> 37<td>Transfer source linear image address.</td> 38 </tr> 39 <tr> 40<td>in</td> 41<th>dstaddr</th> 42<td>Transfer destination block image storage address.</td> 43 </tr> 44 <tr> 45<td>in</td> 46<th>width</th> 47<td>Transfer source and destination image width.</td> 48 </tr> 49 <tr> 50<td>in</td> 51<th>height</th> 52<td>Transfer source and destination image height.</td> 53 </tr> 54 <tr> 55<td>in</td> 56<th>format</th> 57<td>Transfer image pixel format.</td> 58 </tr> 59 <tr> 60<td>in</td> 61<th>blocksize</th> 62<td>Block image block size (<CODE>8</CODE> or <CODE>32</CODE>).</td> 63 </tr> </table> 64 </div> 65<h2>Return Values</h2> 66<div class="section">There is no return value. </div> 67<h2>Description</h2> 68 <div class="section"> 69<p>Adds a command to convert from a linear image into a block image and then to transfer it.</p><P> 70This 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 <CODE>nngxTransferLinearImage</CODE> function provides equivalent functionality, this function has more general uses. Also, unlike <CODE>nngxTransferLinearImage</CODE>, this function only adds a transfer request command without adding a 3D split command. 71 </P><P> 72Specify the start address of the linear image to transfer using the <SPAN class="argument">srcaddr</SPAN> parameter. Specify the start address of the transfer destination block image with the <SPAN class="argument">dstaddr</SPAN> argument. Both <SPAN class="argument">srcaddr</SPAN> and <SPAN class="argument">dstaddr</SPAN> must be 16-byte aligned. 73 </P><P> 74Specify the width and height of both the original and transferred images (in pixels) using <SPAN class="argument">width</SPAN> and <SPAN class="argument">height</SPAN>. Both images must have the same width and height. The number of pixels for the width and the height must each be at least 128 pixels and also a multiple 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 <SPAN class="argument">width</SPAN> or <SPAN class="argument">height</SPAN> is <CODE>0</CODE>. 75 </P><P> 76Specify the pixel format of the transferred image using the <SPAN class="argument">format</SPAN> parameter. The original image must have the same format as the transferred image. The exception is when <SPAN class="argument">format</SPAN> 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. 77<TABLE><TR><TH>GL_RGBA8_OES</TH><TD>32-bit RGBA8</TD></TR><TR><TH>GL_RGB8_OES</TH><TD>24-bit RGB8</TD></TR><TR><TH>GL_RGBA4</TH><TD>16-bit RGBA4</TD></TR><TR><TH>GL_RGB5_A1</TH><TD>16-bit RGBA5551</TD></TR><TR><TH>GL_RGB565</TH><TD>16-bit RGB565</TD></TR></TABLE></P><P> 78For <SPAN class="argument">blocksize</SPAN>, specify <CODE>8</CODE> or <CODE>32</CODE>. When set to <CODE>8</CODE>, the image is converted to a block image with a block size of 8. When set to <CODE>32</CODE>, the image is converted to a block image with a block size of 32. 79 </P><P> 80<CODE>srcaddr</CODE> and <CODE>dstaddr</CODE> must be stored in device memory or in VRAM. If they are not stored in these regions, the Development/Debug builds will stop on an assertion and the Release build will quit without the addition of a transfer command.<br />If the data of either <CODE>srcaddr</CODE> or <CODE>dstaddr</CODE> is stored in device memory and will be directly referenced and edited by the CPU, then you will need to use the <CODE>nngxUpdateBuffer</CODE> function to flush the cache before executing the transfer command. 81 </P><P> 82The following errors occur with this function. 83<TABLE><TR><TH>GL_ERROR_806F_DMP</TH><TD>0 is bound to the current command list or the command request queue is full.</TD></TR><TR><TH>GL_ERROR_8070_DMP</TH><TD><SPAN class="argument">srcaddr</SPAN> or <SPAN class="argument">dstaddr</SPAN> is not 16-byte aligned.</TD></TR><TR><TH>GL_ERROR_8071_DMP</TH><TD><SPAN class="argument">blocksize</SPAN> is neither 8 nor 32.</TD></TR><TR><TH>GL_ERROR_8072_DMP</TH><TD>An invalid value (less than 128) was specified for <SPAN class="argument">width</SPAN> or <SPAN class="argument">height</SPAN>.</TD></TR><TR><TH>GL_ERROR_8073_DMP</TH><TD>The <SPAN class="argument">format</SPAN> argument was invalid.</TD></TR></TABLE></P></div> 84<h2>See Also</h2> 85 <div class="section"> 86<p class="reference"><a href="../nn_gx/nngxAddB2LTransferCommand.html"><CODE>nngxAddB2LTransferCommand</CODE></a><br /> </p> 87 </div> 88<h2>Revision History</h2> 89 <div class="section"> 90 <dl class="history"> 91 <dt>2012/02/03</dt> 92<dd>Added restrictions for the <SPAN class="argument">width</SPAN> and <SPAN class="argument">height</SPAN> arguments in conformance to the specifications.<br /> 93 </dd> 94 <dt>2012/01/23</dt> 95<dd>Added information about restrictions on the <CODE>width</CODE> and <CODE>height</CODE> parameters.<BR> 96 </dd> 97 <dt>2011/10/04</dt> 98<dd>Added <B>See Also</B> section.<br /> 99 </dd> 100 <dt>2011/06/21</dt> 101<dd>Added mention of a restriction on <CODE>srcaddr</CODE> and the use of the <CODE>nngxUpdateBuffer</CODE> function to flush the cache.<br /> 102 </dd> 103 <dt>2011/05/26</dt> 104<dd>Made minor revision to the description of the difference with the <CODE>nngxTransferLinearImage</CODE> function (the presence/absence of split commands). 105 </dd> 106 <dt>2010/09/15</dt> 107<dd>Initial version.<br /> 108 </dd> 109 </dl> 110 </div> 111 <hr><p>CONFIDENTIAL</p></body> 112</html>