MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / dds_header

Class dds_header

Source/astcenccli_image_load_store.cpp:1712–1760  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1710};
1711
1712struct dds_header
1713{
1714 uint32_t size; // header size; must be exactly 124.
1715 /*
1716 flag field is an OR or the following bits, that indicate fields containing valid data:
1717 1: caps/caps2/caps3/caps4 (set in all DDS files, ignore on read)
1718 2: height (set in all DDS files, ignore on read)
1719 4: width (set in all DDS files, ignore on read)
1720 8: pitch (for uncompressed texture)
1721 0x1000: the pixel format field (set in all DDS files, ignore on read)
1722 0x20000: mipmap count (for mipmapped textures with >1 level)
1723 0x80000: pitch (for compressed texture)
1724 0x800000: depth (for 3d textures)
1725 */
1726 uint32_t flags;
1727 uint32_t height;
1728 uint32_t width;
1729 uint32_t pitch_or_linear_size; // scanline pitch for uncompressed; total size in bytes for compressed
1730 uint32_t depth;
1731 uint32_t mipmapcount;
1732 // unused, set to 0
1733 uint32_t reserved1[11];
1734 dds_pixelformat ddspf;
1735 /*
1736 caps field is an OR of the following values:
1737 8 : should be set for a file that contains more than 1 surface (ignore on read)
1738 0x400000 : should be set for a mipmapped texture
1739 0x1000 : should be set if the surface is a texture at all (all DDS files, ignore on read)
1740 */
1741 uint32_t caps;
1742 /*
1743 caps2 field is an OR of the following values:
1744 0x200 : texture is cubemap
1745 0x400 : +X face of cubemap is present
1746 0x800 : -X face of cubemap is present
1747 0x1000 : +Y face of cubemap is present
1748 0x2000 : -Y face of cubemap is present
1749 0x4000 : +Z face of cubemap is present
1750 0x8000 : -Z face of cubemap is present
1751 0x200000 : texture is a 3d texture.
1752 */
1753 uint32_t caps2;
1754 // unused, set to 0
1755 uint32_t caps3;
1756 // unused, set to 0
1757 uint32_t caps4;
1758 // unused, set to 0
1759 uint32_t reserved2;
1760};
1761
1762struct dds_header_dx10
1763{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected