nn::gd::CTR::Memory::CopyTexture2DResourceLinearToBlock Member Function

Syntax

static nnResult CopyTexture2DResourceLinearToBlock(
     u8 * srcAddr,
     u32 width,
     u32 height,
     const Texture2DResource * dest,
     s32 dstMipLevelIndex,
     u32 dstOffestY
);

Arguments

Name Description
in srcAddr Specifies the source address.
in width Specifies the width of data to be transferred. This value must be equal to or less than the width of the destination. (Including dstMipLevelIndex)
in height Specifies the height to transfer. This value must be equal to or less than 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.

Return Values

Returns the result of the operation.
Value Description
Result::IsSuccess 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.

Description

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.

Revision History

2011/02/21
Initial version.

CONFIDENTIAL