Skip to content

Commit 849a16e

Browse files
committed
Fix GPAInterfaceLoader.h
Don't automatically use the debug build of GPA in debug builds of a client. In most cases, a client won't have the debug build of GPA available unless they have built GPA themselves.
1 parent a33199e commit 849a16e

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

Src/GPUPerfAPI-Common/GPAInterfaceLoader.h

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@
1515
// #endif
1616
// GPAFuncTableInfo* g_pFuncTableInfo = NULL;
1717

18+
// In order to use this header file with a debug build of GPA
19+
// the "USE_DEBUG_GPA" preprocessor macro should be defined before
20+
// including this header file
21+
22+
// In order to use this header file with an internal build of GPA
23+
// the "USE_INTERNAL_GPA" preprocessor macro should be defined before
24+
// including this header file
25+
1826
#ifndef _GPA_INTERFACE_LOADER_H_
1927
#define _GPA_INTERFACE_LOADER_H_
2028

@@ -93,12 +101,7 @@
93101
#define GPA_X86_ARCH_SUFFIX TFORMAT("32") ///< Macro for 32-bit lib file architecture suffix
94102
#endif
95103

96-
#ifdef _DEBUG
97-
#define GPA_DEBUG_SUFFIX TFORMAT("-d") ///< Macro for debug suffix
98-
#else
99-
#define GPA_DEBUG_SUFFIX TFORMAT("") ///< Macro for release suffix
100-
#endif
101-
104+
#define GPA_DEBUG_SUFFIX TFORMAT("-d") ///< Macro for debug suffix
102105
#define GPA_INTERNAL_SUFFIX TFORMAT("-Internal") ///< Macro for internal build lib file suffix
103106

104107
#define ARRAY_LENGTH(x) (sizeof(x)/sizeof(x[0])) ///< Macro to calculate array length
@@ -229,7 +232,9 @@ static const LocaleChar* GPAIL_GetLibraryFileName(GPA_API_Type pApiType)
229232
STR_CAT(filenameStaticString, ARRAY_LENGTH(filenameStaticString), GPA_X86_ARCH_SUFFIX);
230233
#endif
231234

235+
#ifdef USE_DEBUG_GPA
232236
STR_CAT(filenameStaticString, ARRAY_LENGTH(filenameStaticString), GPA_DEBUG_SUFFIX);
237+
#endif
233238

234239
#ifdef USE_INTERNAL_GPA
235240
STR_CAT(filenameStaticString, ARRAY_LENGTH(filenameStaticString), GPA_INTERNAL_SUFFIX);

0 commit comments

Comments
 (0)