Bntx is a texture archive file format implemented by nn::gfx.

Header (nn::gfx::ResTextureFile)

Version 4.1.0
Offset Size Type Description
0x0 0x20 nn::util::BinaryFileHeader Magic ("BNTX " in big-endian)
0x20 0x28 nn::gfx::ResTextureContainer

nn::gfx::ResTextureContainer

Container for holding an array of texture info, and information about the GPU region containing textures

Version 4.1.0
Offset Size Type Description
0x0 0x4 u32 Magic ("NX ")
0x4 0x4 u32 Texture count
0x8 0x8 ResTextureInfo ** Texture info array
0x10 0x8 ResTextureData * Texture data gpu region header
0x18 0x8 nn::util::ResDic * Texture info dictionary
0x20 0x8 nn::gfx::TMemoryPool * Points to reserved 0x100 byte region for an in-place MemoryPool
0x28 0x8 nn::gfx::TMemoryPool * User MemoryPool (initialized by nn::gfx to point to the in-place MemoryPool if one is not provided)
0x30 0x4 s32 Base MemoryPool offset
0x34 0x4 u32 Reserved

nn::gfx::ResTextureInfo

Block contains all the data necessary to initialize a Texture and a TextureView object in nn::gfx.

Version 4.1.0
Offset Size Type Description
0x0 0x10 nn::util::BinaryBlockHeader Magic ("BRTI" in big-endian)
0x10 0x28 nn::gfx::TextureInfo Texture info for nn::gfx
0x38 0x4 u8[4] Packaged texture layout?
0x3c 0x14 u8[0x14] Reserved
0x50 0x4 u32 Total texture size (including all mip maps)
0x54 0x4 u32 Texture data alignment
0x58 0x4 nn::gfx::ChannelSource[4]
0x5c 0x1 nn::gfx::ImageDimension
0x5d 0x3 u8[3] Reserved
0x60 0x8 const char * (NW) Texture name
0x68 0x8 nn::gfx::ResTextureContainer * Pointer to parent texture container
0x70 0x8 void ** Array of pointers to each texture mip map level
0x78 0x8 Gfx User Data * User data array
0x80 0x8 nn::gfx::TTexture * Points to reserved 0x100 byte region for an in-place Texture
0x88 0x8 nn::gfx::TTextureView * Points to reserved 0x100 byte region for an in-place TextureView
0x90 0x8 nn::gfx::DescriptorSlot Runtime descriptor slot for the registered Texture + TextureView
0x98 0x8 nn::util::ResDic * User data dictionary

nn::gfx::ResTextureData

This block header directly precedes the 0x1000 byte page aligned GPU memory region.

Version 4.1.0
Offset Size Type Description
0x0 0x10 nn::util::BinaryBlockHeader Magic ("BRTD" in big-endian)