nn::gd::CTR::Memory::CopyTexture2DResourceBlockToLinear Member Functionstatic nnResult CopyTexture2DResourceBlockToLinear( const Texture2DResource * source, s32 srcMipLevelIndex, u32 srcOffestY, u8 * dstAddr, u32 dstWidth, u32 dstHeight, u32 dstFormat, 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 | srcOffestY | Specifies the Y offset of the transfer source. This value must be a multiple of srcBlockSize and must be less than the height of the transfer source resource. |
| in | dstAddr | Specifies the address of the destination. |
| in | dstWidth | Specifies the width of the destination. This value must be equal to or less than the width of the source. (Or, a size of one half the width of the transfer source when using mipmapping in the X-direction.) |
| in | dstHeight | Specifies the height of the destination. This value must be equal to or less than the height of the transfer source minus srcOffsetY. (Or, a size of (height - srcOffsetY) / 2) when using mipmapping in the Y-direction.) |
| in | dstFormat | Specifies the pixel format of the 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 dstAddr. |
| ResultInvalidMemoryLayout | Either the transfer source resource is not LAYOUT_BLOCK_8 or LAYOUT_BLOCK_32 format, or the transfer destination is not LAYOUT_LINEAR. |
| ResultInvalidSubRegionResolution | The height or width of the source or destination is not a multiple of the memory layout. |
| ResultInvalidTextureOffset | srcOffsetY, srcCountRow, and srcOffset are not multiples of the memory layout. Or, dstOffestY is larger than the transfer destination. Or, the source offset is larger than the height of the source resource, or the destination offset is larger than the height of the destination resource. |
| ResultInvalidTextureResolution | downScalingMode is invalid. Or, if the pixel format of the destination is 24-bit, the width of the source and/or destination is not a multiple of 16. |
| 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. |
Adds a command for converting the source Texture2DResource resource from a block image to a linear image and transferring it to the specified address.
CONFIDENTIAL