Path: blob/master/thirdparty/libktx/lib/formatsize.h
10278 views
/* -*- tab-width: 4; -*- */1/* vi: set sw=2 ts=4 expandtab: */23/*4* Copyright 2019-2020 The Khronos Group Inc.5* SPDX-License-Identifier: Apache-2.06*/78/**9* @internal10* @file11* @~English12*13* @brief Struct for returning size information about an image format.14*15* @author Mark Callow, www.edgewise-consulting.com16*/1718#ifndef _FORMATSIZE_H_19#define _FORMATSIZE_H_2021#include "ktx.h"2223typedef enum ktxFormatSizeFlagBits {24KTX_FORMAT_SIZE_PACKED_BIT = 0x00000001,25KTX_FORMAT_SIZE_COMPRESSED_BIT = 0x00000002,26KTX_FORMAT_SIZE_PALETTIZED_BIT = 0x00000004,27KTX_FORMAT_SIZE_DEPTH_BIT = 0x00000008,28KTX_FORMAT_SIZE_STENCIL_BIT = 0x00000010,29KTX_FORMAT_SIZE_YUVSDA_BIT = 0x00000020,30} ktxFormatSizeFlagBits;3132typedef ktx_uint32_t ktxFormatSizeFlags;3334/**35* @brief Structure for holding size information for a texture format.36*/37typedef struct ktxFormatSize {38ktxFormatSizeFlags flags;39unsigned int paletteSizeInBits; // For KTX1.40unsigned int blockSizeInBits;41unsigned int blockWidth; // in texels42unsigned int blockHeight; // in texels43unsigned int blockDepth; // in texels44unsigned int minBlocksX; // Minimum required number of blocks45unsigned int minBlocksY;46} ktxFormatSize;4748#ifdef __cplusplus49extern "C" {50#endif5152bool ktxFormatSize_initFromDfd(ktxFormatSize* This, ktx_uint32_t* pDfd);5354#ifdef __cplusplus55} // extern "C"56#endif5758#endif /* _FORMATSIZE_H_ */596061