X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Famd%2Faddrlib%2Faddrtypes.h;h=4d94a838a438535f183e715a6c294baaedcf1c9c;hb=9705e3b72c51f21caaf13d8bde1abf447e94f082;hp=4c68ac544b882a8bab40accb9c9f01fe9ab04212;hpb=69fca64259495d7a31135876e818e1ac2a36d190;p=mesa.git diff --git a/src/amd/addrlib/addrtypes.h b/src/amd/addrlib/addrtypes.h index 4c68ac544b8..4d94a838a43 100644 --- a/src/amd/addrlib/addrtypes.h +++ b/src/amd/addrlib/addrtypes.h @@ -25,16 +25,16 @@ */ /** -*************************************************************************************************** +**************************************************************************************************** * @file addrtypes.h * @brief Contains the helper function and constants -*************************************************************************************************** +**************************************************************************************************** */ #ifndef __ADDR_TYPES_H__ #define __ADDR_TYPES_H__ -#if defined(__APPLE__) || defined(TCORE_BUILD) -// External definitions header maintained by Mac driver team (and TCORE team) +#if defined(__APPLE__) && !defined(HAVE_TSERVER) +// External definitions header maintained by Apple driver team, but not for diag team under Mac. // Helps address compilation issues & reduces code covered by NDA #include "addrExtDef.h" @@ -59,12 +59,12 @@ typedef int INT; #include // va_list...etc need this header -#endif // defined (__APPLE__) +#endif // defined (__APPLE__) && !defined(HAVE_TSERVER) /** -*************************************************************************************************** +**************************************************************************************************** * Calling conventions -*************************************************************************************************** +**************************************************************************************************** */ #ifndef ADDR_CDECL #if defined(__GNUC__) @@ -88,7 +88,11 @@ typedef int INT; #ifndef ADDR_FASTCALL #if defined(__GNUC__) - #define ADDR_FASTCALL __attribute__((regparm(0))) + #if defined(__i386__) + #define ADDR_FASTCALL __attribute__((regparm(0))) + #else + #define ADDR_FASTCALL + #endif #else #define ADDR_FASTCALL __fastcall #endif @@ -117,9 +121,9 @@ typedef int INT; #define ADDR_API ADDR_FASTCALL //default call convention is fast call /** -*************************************************************************************************** +**************************************************************************************************** * Global defines used by other modules -*************************************************************************************************** +**************************************************************************************************** */ #if !defined(TILEINDEX_INVALID) #define TILEINDEX_INVALID -1 @@ -134,9 +138,9 @@ typedef int INT; #endif /** -*************************************************************************************************** +**************************************************************************************************** * Return codes -*************************************************************************************************** +**************************************************************************************************** */ typedef enum _ADDR_E_RETURNCODE { @@ -155,14 +159,14 @@ typedef enum _ADDR_E_RETURNCODE } ADDR_E_RETURNCODE; /** -*************************************************************************************************** +**************************************************************************************************** * @brief * Neutral enums that define tile modes for all H/W * @note * R600/R800 tiling mode can be cast to hw enums directly but never cast into HW enum from * ADDR_TM_2D_TILED_XTHICK * -*************************************************************************************************** +**************************************************************************************************** */ typedef enum _AddrTileMode { @@ -191,17 +195,18 @@ typedef enum _AddrTileMode ADDR_TM_PRT_TILED_THICK = 22, ///< No bank/pipe rotation or hashing beyond macrotile size ADDR_TM_PRT_2D_TILED_THICK = 23, ///< Same as 2D_TILED_THICK, PRT only ADDR_TM_PRT_3D_TILED_THICK = 24, ///< Same as 3D_TILED_THICK, PRT only - ADDR_TM_COUNT = 25, ///< Must be the value of the last tile mode + ADDR_TM_UNKNOWN = 25, ///< Unkown tile mode, should be decided by address lib + ADDR_TM_COUNT = 26, ///< Must be the value of the last tile mode } AddrTileMode; /** -*************************************************************************************************** +**************************************************************************************************** * AddrFormat * * @brief * Neutral enum for SurfaceFormat * -*************************************************************************************************** +**************************************************************************************************** */ typedef enum _AddrFormat { ADDR_FMT_INVALID = 0x00000000, @@ -268,16 +273,30 @@ typedef enum _AddrFormat { ADDR_FMT_APC7 = 0x0000003d, ADDR_FMT_CTX1 = 0x0000003e, ADDR_FMT_RESERVED_63 = 0x0000003f, + ADDR_FMT_ASTC_4x4 = 0x00000040, + ADDR_FMT_ASTC_5x4 = 0x00000041, + ADDR_FMT_ASTC_5x5 = 0x00000042, + ADDR_FMT_ASTC_6x5 = 0x00000043, + ADDR_FMT_ASTC_6x6 = 0x00000044, + ADDR_FMT_ASTC_8x5 = 0x00000045, + ADDR_FMT_ASTC_8x6 = 0x00000046, + ADDR_FMT_ASTC_8x8 = 0x00000047, + ADDR_FMT_ASTC_10x5 = 0x00000048, + ADDR_FMT_ASTC_10x6 = 0x00000049, + ADDR_FMT_ASTC_10x8 = 0x0000004a, + ADDR_FMT_ASTC_10x10 = 0x0000004b, + ADDR_FMT_ASTC_12x10 = 0x0000004c, + ADDR_FMT_ASTC_12x12 = 0x0000004d, } AddrFormat; /** -*************************************************************************************************** +**************************************************************************************************** * AddrDepthFormat * * @brief * Neutral enum for addrFlt32ToDepthPixel * -*************************************************************************************************** +**************************************************************************************************** */ typedef enum _AddrDepthFormat { @@ -293,13 +312,13 @@ typedef enum _AddrDepthFormat } AddrDepthFormat; /** -*************************************************************************************************** +**************************************************************************************************** * AddrColorFormat * * @brief * Neutral enum for ColorFormat * -*************************************************************************************************** +**************************************************************************************************** */ typedef enum _AddrColorFormat { @@ -342,13 +361,13 @@ typedef enum _AddrColorFormat } AddrColorFormat; /** -*************************************************************************************************** +**************************************************************************************************** * AddrSurfaceNumber * * @brief * Neutral enum for SurfaceNumber * -*************************************************************************************************** +**************************************************************************************************** */ typedef enum _AddrSurfaceNumber { ADDR_NUMBER_UNORM = 0x00000000, @@ -362,13 +381,13 @@ typedef enum _AddrSurfaceNumber { } AddrSurfaceNumber; /** -*************************************************************************************************** +**************************************************************************************************** * AddrSurfaceSwap * * @brief * Neutral enum for SurfaceSwap * -*************************************************************************************************** +**************************************************************************************************** */ typedef enum _AddrSurfaceSwap { ADDR_SWAP_STD = 0x00000000, @@ -378,12 +397,12 @@ typedef enum _AddrSurfaceSwap { } AddrSurfaceSwap; /** -*************************************************************************************************** +**************************************************************************************************** * AddrHtileBlockSize * * @brief * Size of HTILE blocks, valid values are 4 or 8 for now -*************************************************************************************************** +**************************************************************************************************** */ typedef enum _AddrHtileBlockSize { @@ -393,7 +412,7 @@ typedef enum _AddrHtileBlockSize /** -*************************************************************************************************** +**************************************************************************************************** * AddrPipeCfg * * @brief @@ -406,7 +425,7 @@ typedef enum _AddrHtileBlockSize * For hw configurations w/ non-pow2 memory number of memory channels, it usually matches * the number of ROP units(? TODO: which registers??) * The enum value = hw enum + 1 which is to reserve 0 for requesting default. -*************************************************************************************************** +**************************************************************************************************** */ typedef enum _AddrPipeCfg { @@ -429,12 +448,12 @@ typedef enum _AddrPipeCfg } AddrPipeCfg; /** -*************************************************************************************************** +**************************************************************************************************** * AddrTileType * * @brief * Neutral enums that specifies micro tile type (MICRO_TILE_MODE) -*************************************************************************************************** +**************************************************************************************************** */ typedef enum _AddrTileType { @@ -445,13 +464,13 @@ typedef enum _AddrTileType ADDR_THICK = 4, ///< Thick micro-tiling, only valid for THICK and XTHICK } AddrTileType; -/////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// // // Type definitions: short system-independent names for address library types // -/////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// -#if !defined(__APPLE__) +#if !defined(__APPLE__) || defined(HAVE_TSERVER) #ifndef BOOL_32 // no bool type in C /// @brief Boolean type, since none is defined in C @@ -527,7 +546,7 @@ typedef enum _AddrTileType #define UINT_64 unsigned long long OR unsigned __int64 #endif -#endif // #if !defined(__APPLE__) +#endif // #if !defined(__APPLE__) || defined(HAVE_TSERVER) // ADDR64X is used to print addresses in hex form on both Windows and Linux // @@ -570,11 +589,11 @@ typedef union { } ADDR_FLT_32; -/////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// // // Macros for controlling linking and building on multiple systems // -/////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// #if defined(_MSC_VER) #if defined(va_copy) #undef va_copy //redefine va_copy to support VC2013