nn::gd::CTR::Memory::CopyTexture2DResourceBlockToLinear Member Function
static nnResult CopyTexture2DResourceBlockToLinear(
const Texture2DResource * source,
s32 srcMipLevelIndex,
u32 srcOffsetY,
s32 srcCountRow,
const Texture2DResource * dest,
s32 dstMipLevelIndex,
u32 dstOffestY,
DownScalingMode downScalingMode,
gdBool yFlip
);
| Name | Description | |
|---|---|---|
| in | source |
Pointer to the Texture2DResource resource transfer source. |
| 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 a multiple of srcBlockSize and less than the height of the mipmap level of the transfer source. |
| in | srcCountRow |
Specifies the height to transfer. If -1 is specified, the size to transfer is found by subtracting srcOffsetY from the height of the transfer source resource. srcCountRow is a multiple of srcBlockSize. The sum (srcOffsetY + srcCountRow) must be equal to or less than the height of the transfer source resource. |
| 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. |
| in | downScalingMode |
Specifies antialiasing filter mode. |
| in | yFlip |
The transferred image is flipped vertically when yflip is GD_TRUE. The image is not flipped when GD_FALSE. |
| Value | Description |
|---|---|
Result::IsSuccess |
Process was successful. |
ResultNullParameter |
NULL was specified for source or dest. |
ResultInvalidMemoryLayout |
Either the transfer source resource is not LAYOUT_BLOCK_8 or LAYOUT_BLOCK_32 format, or the transfer destination is not LAYOUT_LINEAR. |
ResultInvalidTextureOffset |
srcOffsetY is not a multiple of the memory layout for source. Or, the transfer source offset srcOffsetY is taller than the transfer source resource. |
ResultInvalidTextureMipLevelIndex |
The mipmap level index of the transfer source or transfer destination is invalid. |
ResultInvalidTextureFormat |
The pixel format of the transfer source or transfer destination is invalid. |
ResultInvalidSubRegionResolution |
The transfer source destination dstWidth or dstHeight is not a multiple of the memory layout for source. |
Adds a command for converting the source Texture2DResource resource from a block image to a linear image and transferring it to the destination Texture2DResource.
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_BLOCK_8 or LAYOUT_BLOCK_32. The transfer destination memory layout must be LAYOUT_LINEAR. The data transferred is automatically clipped if the source memory region (including srcMipLevelIndex, srcOffsetY and srcCountRow) is bigger than the destination region (including srcMipLevelIndex, srcOffsetY and srcCountRow). An error occurs if the source region is smaller than the destination region. When converting the pixel format, the source pixel size must be the same as or smaller than the destination pixel size. In other words, conversions that increase the pixel size are not possible. This process calls the nngxAddB2LTransferCommand function.
This function adds commands to the command list. Refer to the Programming Manual for details.
CONFIDENTIAL