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>CopyTexture2DResourceLinearToBlock</title> 8 </head> 9 <body> 10<h1><CODE><a href="../../../../nn/Overview.html">nn</a>::<a href="../../../../nn/gd/Overview.html">gd</a>::<a href="../../../../nn/gd/CTR/Overview.html">CTR</a>::<a href="../../../../nn/gd/CTR/Memory/Overview.html">Memory</a>::CopyTexture2DResourceLinearToBlock</CODE> Member Function</h1> 11<h2>Syntax</h2> 12 <div class="section"> 13 <pre class="definition"> 14static <a href="../../../../nnResult/Overview.html">nnResult</a> CopyTexture2DResourceLinearToBlock( 15 <a href="../../../../nn_types/u8.html">u8</a> * srcAddr, 16 <a href="../../../../nn_types/u32.html">u32</a> width, 17 <a href="../../../../nn_types/u32.html">u32</a> height, 18 const Texture2DResource * dest, 19 <a href="../../../../nn_types/s32.html">s32</a> dstMipLevelIndex, 20 <a href="../../../../nn_types/u32.html">u32</a> dstOffestY 21); 22</pre> 23 </div> 24<h2>Arguments</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>Specifies the source address.</td> 38 </tr> 39 <tr> 40<td>in</td> 41<th>width</th> 42<td>Specifies the width of data to be transferred. This value must be equal to or less than the width of the destination. (Including dstMipLevelIndex)</td> 43 </tr> 44 <tr> 45<td>in</td> 46<th>height</th> 47<td>Specifies the height to transfer. This value must be equal to or less than the height of the destination. (Including <SPAN class="Argument">dstMipLevelIndex</SPAN> and <SPAN class="Argument">dstOffsetY</SPAN>)</td> 48 </tr> 49 <tr> 50<td>in</td> 51<th>dest</th> 52<td>Pointer to the destination <SPAN class="Argument">Texture2DResource</SPAN> resource.</td> 53 </tr> 54 <tr> 55<td>in</td> 56<th>dstMipLevelIndex</th> 57<td>Specifies the index of the mipmap level of the transfer destination. If <CODE>-1</CODE> is specified, the last mipmap level index is used. </td> 58 </tr> 59 <tr> 60<td>in</td> 61<th>dstOffestY</th> 62<td>Specifies the Y offset of the transfer destination. </td> 63 </tr> </table> 64 </div> 65<h2>Return Values</h2> 66<div class="section">Returns the result of the operation. <br /> 67 <table class="arguments"> 68 <thead> 69 <tr> 70<th>Value</th> 71<td>Description</td> 72 </tr> 73 </thead> 74 <tr> 75<th><CODE>Result::IsSuccess</CODE></th> 76<td>Process was successful.</td> 77 </tr> 78 <tr> 79<th><CODE>ResultNullParameter</CODE></th> 80<td><CODE>NULL</CODE> was specified for <SPAN class="Argument">srcAddr</SPAN> or <SPAN class="Argument">dest</SPAN>.</td> 81 </tr> 82 <tr> 83<th><CODE>ResultInvalidMemoryLayout</CODE></th> 84<td>The destination memory layout is not <CODE>LAYOUT_BLOCK_8</CODE> or <CODE>LAYOUT_BLOCK_32</CODE>. </td> 85 </tr> 86 <tr> 87<th><CODE>ResultInvalidTextureMipLevelIndex</CODE></th> 88<td>The index of the destination mipmap level is invalid. </td> 89 </tr> 90 <tr> 91<th><CODE>ResultInvalidTextureResolution</CODE></th> 92<td><SPAN class="Argument">dstOffsetY</SPAN> or the height or width of the source is not a multiple of the memory layout. Or, if the pixel format size of the source resource is 24-bit, the height of the destination resource is not a multiple of 32. Or, the resolution of the source and destination have different pixel sizes. </td> 93 </tr> 94 <tr> 95<th><CODE>ResultInvalidTextureOffset</CODE></th> 96<td>The source offset is larger than the height of the resource. </td> 97 </tr> 98 <tr> 99<th><CODE>ResultInvalidTextureFormat</CODE></th> 100<td>The pixel format of the destination mipmap level is invalid. </td> 101 </tr> 102 </table> </div> 103<h2>Description</h2> 104 <div class="section"> 105<p>Adds a command for converting the image at the specified address from a linear image to a block image and transferring it to the destination <SPAN class="Argument">Texture2DResource</SPAN> to the current command list. </p><p>The following transfer destination pixel formats can be specified:<br /><itemizedlist><listitem><para>NATIVE_FORMAT_RGBA_8888 <br /></para></listitem><listitem><para>NATIVE_FORMAT_RGB_888 <br /></para></listitem><listitem><para>NATIVE_FORMAT_RGBA_4444 <br /></para></listitem><listitem><para>NATIVE_FORMAT_RGBA_5551 <br /></para></listitem><listitem><para>NATIVE_FORMAT_RGB_565 <br /></para></listitem></itemizedlist> The memory layout of the transfer source must be LAYOUT_LINEAR. The transfer destination memory layout must be either LAYOUT_BLOCK_8 or LAYOUT_BLOCK_32. If the pixel size of the transfer destination image is 24 bits, the width must be a multiple of 32. This process calls the <CODE>nngxAddL2BTransferCommand</CODE> function. This function adds commands to the command list. Refer to the Programming Manual for details.</p><!-- write here --></div> 106<h2>Revision History</h2> 107 <div class="section"> 108 <dl class="history"> 109 <dt>2011/02/21</dt> 110<dd>Initial version.<br /> 111 </dd> 112 </dl> 113 </div> 114 <hr><p>CONFIDENTIAL</p></body> 115</html>