1 /*---------------------------------------------------------------------------* 2 3 Copyright (C) Nintendo. All rights reserved. 4 5 These coded instructions, statements, and computer programs contain 6 proprietary information of Nintendo of America Inc. and/or Nintendo 7 Company Ltd., and are protected by Federal copyright law. They may 8 not be disclosed to third parties or copied or duplicated in any form, 9 in whole or in part, without the prior written consent of Nintendo. 10 11 *---------------------------------------------------------------------------*/ 12 13 // gfdEnum.h 14 // 15 // Declares enums for Grafhics File Format library. 16 17 #ifndef _CAFE_GFD_ENUM_H_ 18 #define _CAFE_GFD_ENUM_H_ 19 20 #ifdef __cplusplus 21 extern "C" 22 { 23 #endif // __cplusplus 24 25 /// @addtogroup GFDEnumGroup 26 /// @{ 27 28 /// \brief GPU version the file is designed for. 29 /// 30 typedef enum _GFDGPUVersion 31 { 32 GFD_GPU_VERSION_0 = 0, ///< ver 0 33 GFD_GPU_VERSION_1 = 1, ///< ver 1 34 GFD_GPU_VERSION_GPU7 = 2, ///< Cafe(GPU7) 35 GFD_GPU_VERSION_Last ///< Count of valid GPU versions 36 } GFDGPUVersion; 37 38 /// \brief Defines type of each block in the GFD (gtx and gsh) file. 39 /// 40 typedef enum _GFDBlockType 41 { 42 GFD_BLOCK_TYPE_HEADER = 0, ///< a 'file' header. Not actually a valid DataBlock type (different magic). 43 GFD_BLOCK_TYPE_END = 1, ///< Last block in program, terminates parsing loop in reader. Must be < all other valid block types. 44 GFD_BLOCK_TYPE_PAD = 2, ///< Data to ignore. Used to align following blocks, program and texture data ones in particular 45 GFD_BLOCK_TYPE_GX2_VSH_HEADER = 3, ///< Vertex shader header 46 GFD_BLOCK_TYPE_GX2_VSH_PROGRAM = 5, ///< Vertex program. 47 GFD_BLOCK_TYPE_GX2_PSH_HEADER = 6, ///< Pixel shader header 48 GFD_BLOCK_TYPE_GX2_PSH_PROGRAM = 7, ///< Pixel shader program. 49 GFD_BLOCK_TYPE_GX2_GSH_HEADER = 8, ///< Geometry shader header. 50 GFD_BLOCK_TYPE_GX2_GSH_PROGRAM = 9, ///< Geometry shader program. 51 GFD_BLOCK_TYPE_GX2_GSH_COPY_PROGRAM = 10, ///< Geometry copy shader program. 52 GFD_BLOCK_TYPE_GX2_TEX_HEADER = 11, ///< Texture/image header 53 GFD_BLOCK_TYPE_GX2_TEX_IMAGE = 12, ///< Texture/image data block. 54 GFD_BLOCK_TYPE_GX2_TEX_MIP_IMAGE = 13, ///< Mipmap Texure/image data block. 55 GFD_BLOCK_TYPE_GX2_CSH_HEADER = 14, ///< Compute shader header 56 GFD_BLOCK_TYPE_GX2_CSH_PROGRAM = 15, ///< Compute shader program 57 GFD_BLOCK_TYPE_USER = 16, ///< A user defined data block. Treated like a pad block by main parsers, users can do what they want 58 GFD_BLOCK_TYPE_LAST ///< Count of valid block types. 59 } GFDBlockType; 60 61 /// \brief Endian Swap Mode. 62 /// 63 typedef enum _GFDEndianSwapMode 64 { 65 GFD_ENDIAN_SWAP_MODE_DEFAULT = 0, ///< Same as little 66 GFD_ENDIAN_SWAP_MODE_LITTLE = 0, ///< Swap to little endian if cpu uses big endian 67 GFD_ENDIAN_SWAP_MODE_BIG = 1, ///< Swap to big endian if cpu uses little endian 68 GFD_ENDIAN_SWAP_MODE_8_IN_32 = 2, ///< Specifies extra 8_in_32 swap mode 69 GFD_ENDIAN_SWAP_MODE_Last ///< Count of valid Endian swap modes 70 } GFDEndianSwapMode; 71 72 /// \brief Align Mode. 73 /// 74 typedef enum _GFDAlignMode 75 { 76 GFD_ALIGN_MODE_DISABLE = 0, ///< No align 77 GFD_ALIGN_MODE_ENABLE = 1, ///< Add data specific alignment size padding block before data 78 GFD_ALIGN_MODE_Last ///< Count of valid align modes 79 } GFDAlignMode; 80 81 /// \brief Element Size. 82 /// 83 typedef enum _GFDElementSize { 84 GFD_ELEMENT_SIZE_8 = 1, 85 GFD_ELEMENT_SIZE_16 = 2, 86 GFD_ELEMENT_SIZE_24 = 3, 87 GFD_ELEMENT_SIZE_32 = 4 88 } GFDElementSize; 89 90 /// @} 91 92 #ifdef __cplusplus 93 } 94 #endif // __cplusplus 95 96 #endif // _CAFE_GFD_ENUM_H_ 97