[Mesa-dev] [PATCH 024/140] amdgpu/addrlib: add define HAVE_TSERVER
Marek Olšák
maraeo at gmail.com
Mon Mar 20 22:42:34 UTC 2017
From: Xavi Zhang <xavi.zhang at amd.com>
---
src/amd/addrlib/addrtypes.h | 10 +++++-----
src/amd/addrlib/core/addrcommon.h | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/amd/addrlib/addrtypes.h b/src/amd/addrlib/addrtypes.h
index 4dd7bab..fb8e706 100644
--- a/src/amd/addrlib/addrtypes.h
+++ b/src/amd/addrlib/addrtypes.h
@@ -26,22 +26,22 @@
/**
***************************************************************************************************
* @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"
#else
// Windows and/or Linux
#if !defined(VOID)
typedef void VOID;
#endif
@@ -52,21 +52,21 @@ typedef float FLOAT;
#if !defined(CHAR)
typedef char CHAR;
#endif
#if !defined(INT)
typedef int INT;
#endif
#include <stdarg.h> // va_list...etc need this header
-#endif // defined (__APPLE__)
+#endif // defined (__APPLE__) && !defined(HAVE_TSERVER)
/**
***************************************************************************************************
* Calling conventions
***************************************************************************************************
*/
#ifndef ADDR_CDECL
#if defined(__GNUC__)
#define ADDR_CDECL __attribute__((cdecl))
#else
@@ -448,21 +448,21 @@ typedef enum _AddrTileType
ADDR_ROTATED = 3, ///< Rotated displayable tiling
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
/// @ingroup type
#define BOOL_32 int
#endif
#ifndef INT_32
#define INT_32 int
#endif
@@ -524,21 +524,21 @@ typedef enum _AddrTileType
/// @brief 64-bit unsigned integer type (compiler dependent)
/// @ingroup type
///
/// The addrlib defines a 64-bit unsigned integer type for either
/// Gnu/Watcom compilers (which use the first syntax) or for
/// the Windows VCC compiler (which uses the second syntax).
///
#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
//
#if defined( __GNUC__ ) || defined( __WATCOMC__ )
#define ADDR64X "llx"
#define ADDR64D "lld"
#elif defined( _WIN32 )
#define ADDR64X "I64x"
#define ADDR64D "I64d"
diff --git a/src/amd/addrlib/core/addrcommon.h b/src/amd/addrlib/core/addrcommon.h
index 0dff0b8..35320e6 100644
--- a/src/amd/addrlib/core/addrcommon.h
+++ b/src/amd/addrlib/core/addrcommon.h
@@ -34,21 +34,21 @@
#ifndef __ADDR_COMMON_H__
#define __ADDR_COMMON_H__
#include "addrinterface.h"
// ADDR_LNX_KERNEL_BUILD is for internal build
// Moved from addrinterface.h so __KERNEL__ is not needed any more
#if ADDR_LNX_KERNEL_BUILD // || (defined(__GNUC__) && defined(__KERNEL__))
#include "lnx_common_defs.h" // ported from cmmqs
-#elif !defined(__APPLE__)
+#elif !defined(__APPLE__) || defined(HAVE_TSERVER)
#include <stdlib.h>
#include <string.h>
#endif
///////////////////////////////////////////////////////////////////////////////////////////////////
// Common constants
///////////////////////////////////////////////////////////////////////////////////////////////////
static const UINT_32 MicroTileWidth = 8; ///< Micro tile width, for 1D and 2D tiling
static const UINT_32 MicroTileHeight = 8; ///< Micro tile height, for 1D and 2D tiling
static const UINT_32 ThickTileThickness = 4; ///< Micro tile thickness, for THICK modes
--
2.7.4
More information about the mesa-dev
mailing list