nn::gd::CTR::Memory::CopyTexture2DResourceLinearToBlock Member Functionstatic nnResult CopyTexture2DResourceLinearToBlock( const Texture2DResource * source, s32 srcMipLevelIndex, u32 srcOffsetY, s32 srcCountRow, const Texture2DResource * dest, s32 dstMipLevelIndex, u32 dstOffestY );
| Name | Description | |
|---|---|---|
| in | source |
Specifies a pointer to the source Texture2DResource resource. |
| in | srcMipLevelIndex |
Specifies the index of the mipmap level of the transfer source. If -1 is specified, the last mipmap level index is used. |
| in | srcOffsetY |
Specifies the Y offset of the transfer source. This value must be less than the height of the source resource. |
| in | srcCountRow |
Specifies the height to transfer. The memory layout is multiple of srcCountRow. If -1 is specified, the size to transfer is found by subtracting srcOffsetY from the height of the source resource. The sum (srcOffsetY + srcCountRow) must be equal to or less than the height of the transfer destination resource. (Including the srcMipLevelIndex of the transfer source.) |
| in | dest |
Specifies a pointer to the Texture2DResource of the transfer destination. |
| in | dstMipLevelIndex |
Specifies the index of the mipmap level of the transfer destination. If -1 is specified, the last mipmap level index is used. |
| in | dstOffestY |
Specifies the Y offset of the transfer destination. |
| Value | Description |
|---|---|
Result::IsSuccess |
Process was successful. |
ResultNullParameter |
NULL was specified for source or dest. |
ResultInvalidMemoryLayout |
Either the destination memory layout is not LAYOUT_BLOCK_8 or LAYOUT_BLOCK_32 format, or the transfer source memory layout is not LAYOUT_LINEAR. |
ResultInvalidTextureMipLevelIndex |
The index of the mipmap level of the source or destination is invalid. |
ResultInvalidTextureOffset |
dstOffset is not a multiple of the memory layout or is larger than the height of the destination. |
ResultInvalidTextureFormat |
The pixel size of the source and destination differ. |
ResultInvalidTextureResolution |
The resolution of the source and destination differ. Or, if the pixel format size of the source Texture2DResource is 24-bit, the height of the destination Texture2DResource is not a multiple of 32. |
ResultInvalidSubRegionResolution |
srcOffsetY or srcCountRow 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. |
ResultInvalidTextureFormat |
The pixel format of the transfer source or transfer destination is invalid. |
Adds a command to the current command list. This command converts the source Texture2DResource resource to the specified Texture2DResource (converting it from a linear image to a block image) and transfers it.
The following transfer source and destination pixel formats can be specified:NATIVE_FORMAT_RGBA_8888 NATIVE_FORMAT_RGB_888 NATIVE_FORMAT_RGBA_4444 NATIVE_FORMAT_RGBA_5551 NATIVE_FORMAT_RGB_565
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 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 nngxAddL2BTransferCommand function. This function adds commands to the command list. Refer to the Programming Manual for details.
CONFIDENTIAL