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 const Texture2DResource * source, 16 <a href="../../../../nn_types/s32.html">s32</a> srcMipLevelIndex, 17 <a href="../../../../nn_types/u32.html">u32</a> srcOffsetY, 18 <a href="../../../../nn_types/s32.html">s32</a> srcCountRow, 19 const Texture2DResource * dest, 20 <a href="../../../../nn_types/s32.html">s32</a> dstMipLevelIndex, 21 <a href="../../../../nn_types/u32.html">u32</a> dstOffestY 22); 23</pre> 24 </div> 25<h2>Parameters</h2> 26 <div class="section"> 27 <table class="arguments"> 28 <thead> 29 <tr> 30 <td width="15" /> 31<th>Name</th> 32<td>Description</td> 33 </tr> 34 </thead> 35 <tr> 36<td>in</td> 37<th>source</th> 38<td>Specifies a pointer to the source <CODE>Texture2DResource</CODE> resource.</td> 39 </tr> 40 <tr> 41<td>in</td> 42<th>srcMipLevelIndex</th> 43<td>Specifies the index of the mipmap level of the transfer source. If <CODE>-1</CODE> is specified, the last mipmap level index is used.</td> 44 </tr> 45 <tr> 46<td>in</td> 47<th>srcOffsetY</th> 48<td>Specifies the y offset of the transfer source. This value must be less than the height of the source resource.</td> 49 </tr> 50 <tr> 51<td>in</td> 52<th>srcCountRow</th> 53<td>Specifies the height to transfer. The memory layout is multiple of <SPAN class="Argument">srcCountRow</SPAN>. If <CODE>-1</CODE> is specified, the size to transfer is found by subtracting <SPAN class="argument">srcOffsetY</SPAN> from the height of the <SPAN class="argument">source</SPAN> resource. The sum (<SPAN class="argument">srcOffsetY</SPAN> + <SPAN class="argument">srcCountRow</SPAN>) must be equal to or less than the height of the transfer destination resource. (Including the <SPAN class="argument">srcMipLevelIndex</SPAN> of the transfer source.)</td> 54 </tr> 55 <tr> 56<td>in</td> 57<th>dest</th> 58<td>Specifies a pointer to the <SPAN class="Argument">Texture2DResource</SPAN> of the transfer destination.</td> 59 </tr> 60 <tr> 61<td>in</td> 62<th>dstMipLevelIndex</th> 63<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> 64 </tr> 65 <tr> 66<td>in</td> 67<th>dstOffestY</th> 68<td>Specifies the y offset of the transfer destination.</td> 69 </tr> </table> 70 </div> 71<h2>Return Values</h2> 72<div class="section">Returns the result of the operation. <br /> 73 <table class="arguments"> 74 <thead> 75 <tr> 76<th>Value</th> 77<td>Description</td> 78 </tr> 79 </thead> 80 <tr> 81<th>Result::IsSuccess</th> 82<td>The process was successful.</td> 83 </tr> 84 <tr> 85<th>ResultNullParameter</th> 86<td><CODE>NULL</CODE> was specified for <SPAN class="Argument">source</SPAN> or <SPAN class="Argument">dest</SPAN>.</td> 87 </tr> 88 <tr> 89<th>ResultInvalidMemoryLayout</th> 90<td>Either the destination memory layout is not <CODE>LAYOUT_BLOCK_8</CODE> or <CODE>LAYOUT_BLOCK_32</CODE> format, or the transfer source memory layout is not <CODE>LAYOUT_LINEAR</CODE>.</td> 91 </tr> 92 <tr> 93<th>ResultInvalidTextureMipLevelIndex</th> 94<td>The index of the mipmap level of the source or destination is invalid.</td> 95 </tr> 96 <tr> 97<th>ResultInvalidTextureOffset</th> 98<td><SPAN class="argument">dstOffset</SPAN> is not a multiple of the memory layout or is larger than the height of the destination.</td> 99 </tr> 100 <tr> 101<th>ResultInvalidTextureFormat</th> 102<td>The pixel size of the source and destination differ.</td> 103 </tr> 104 <tr> 105<th>ResultInvalidTextureResolution</th> 106<td>The resolution of the source and destination differ. Or, if the pixel format size of the source <CODE>Texture2DResource</CODE> is 24-bit, the height of the destination <CODE>Texture2DResource</CODE> is not a multiple of 32.</td> 107 </tr> 108 <tr> 109<th>ResultInvalidSubRegionResolution</th> 110<td><SPAN class="argument">srcOffsetY</SPAN> or <SPAN class="argument">srcCountRow</SPAN> is not a multiple of the memory layout. Or, the offset of the source or destination, or the transfer size is larger than the height of each resource.</td> 111 </tr> 112 <tr> 113<th>ResultInvalidTextureFormat</th> 114<td>The pixel format of the transfer source or transfer destination is invalid.</td> 115 </tr> 116 </table> </div> 117<h2>Description</h2> 118 <div class="section"> 119<p>Adds a command to the current command list. This command converts the source <CODE>Texture2DResource</CODE> resource to the specified <CODE>Texture2DResource</CODE> (converting it from a linear image to a block image) and transfers it.</p><p>The following transfer source and destination pixel formats can be specified:<br /><itemizedlist><listitem><para><CODE>NATIVE_FORMAT_RGBA_8888 </CODE><br /></para></listitem><listitem><para><CODE>NATIVE_FORMAT_RGB_888 </CODE><br /></para></listitem><listitem><para><CODE>NATIVE_FORMAT_RGBA_4444 </CODE><br /></para></listitem><listitem><para><CODE>NATIVE_FORMAT_RGBA_5551 </CODE><br /></para></listitem><listitem><para><CODE>NATIVE_FORMAT_RGB_565 </CODE><br /></para></listitem></itemizedlist><br /> The memory layout of the transfer source must be <CODE>LAYOUT_LINEAR</CODE>. The transfer destination memory layout must be either <CODE>LAYOUT_BLOCK_8</CODE> or <CODE>LAYOUT_BLOCK_32</CODE>. If the pixel size of the transfer destination image is 24 bits, the horizontal width in pixels must be a multiple of 32. The width of the transfer source and destination resource must match. This process calls the <CODE>nngxAddL2BTransferCommand</CODE> function. This function adds commands to the command list. For more information, see the programming manual.</p><!-- write here --></div> 120<h2>Revision History</h2> 121 <div class="section"> 122 <dl class="history"> 123 <dt>2011/02/21</dt> 124<dd>Initial version.<br /> 125 </dd> 126 </dl> 127 </div> 128 <hr><p>CONFIDENTIAL</p></body> 129</html> 130