nn::gd::CTR::Memory::CopyTexture2DResourceLinearToBlock Member Functionstatic nnResult CopyTexture2DResourceLinearToBlock( u8 * srcAddr, u32 width, u32 height, const Texture2DResource * dest, s32 dstMipLevelIndex, u32 dstOffestY );
| Name | Description | |
|---|---|---|
| in | srcAddr | Specifies the source address. |
| in | width | Specifies the width of data to be transferred. This value must be less than or equal to the width of the destination. (Including dstMipLevelIndex) |
| in | height | Specifies the height to transfer. This value must be less than or equal to the height of the destination. (Including dstMipLevelIndex and dstOffsetY) |
| in | dest | Pointer to the destination Texture2DResource resource. |
| 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 | The process was successful. |
| ResultNullParameter | NULL was specified for srcAddr or dest. |
| ResultInvalidMemoryLayout | The destination memory layout is not LAYOUT_BLOCK_8 or LAYOUT_BLOCK_32. |
| ResultInvalidTextureMipLevelIndex | The index of the destination mipmap level is invalid. |
| ResultInvalidTextureResolution | dstOffsetY 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. |
| ResultInvalidTextureOffset | The source offset is larger than the height of the resource. |
| ResultInvalidTextureFormat | The pixel format of the destination mipmap level is invalid. |
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 Texture2DResource to the current command list.
The following transfer destination pixel formats can be specified: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 nngxAddL2BTransferCommand function. This function adds commands to the command list. For more information, see the programming manual.
CONFIDENTIAL