Skip to content

Commit f4d3b2e

Browse files
jgu222igcbot
authored andcommitted
Make IGCStandalone work on Linux release build
On Linux release build, we already made igc keys available. This change makes IGCStandalone available as well.
1 parent 1ccc8f7 commit f4d3b2e

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

IGC/AdaptorCommon/customApi.cpp

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ namespace IGC
9090
{
9191
namespace Debug
9292
{
93+
94+
#if defined( IGC_EXPORTS ) || defined( IGC_DEBUG_VARIABLES )
95+
9396
EnumStr IGC_DEBUG_API_CALL str(DebugFlag value)
9497
{
9598
#define CASE(x) case DebugFlag::x: return STRINGIFY(x)
@@ -244,7 +247,7 @@ namespace IGC
244247
IGC_ASSERT_EXIT_MESSAGE((0 <= static_cast<int>(flag)), "range sanity check");
245248
IGC_ASSERT_EXIT_MESSAGE((static_cast<int>(flag) < static_cast<int> (DebugFlag::END)), "range sanity check");
246249

247-
#if defined( _DEBUG ) || defined( _INTERNAL )
250+
#if defined( IGC_DEBUG_VARIABLES )
248251
g_debugFlags[ static_cast<int>( flag ) ] = enabled;
249252
#else
250253
(void) flag;
@@ -257,7 +260,7 @@ namespace IGC
257260
IGC_ASSERT_EXIT_MESSAGE((0 <= static_cast<int>(flag)), "range sanity check");
258261
IGC_ASSERT_EXIT_MESSAGE((static_cast<int>(flag) < static_cast<int> (DebugFlag::END)), "range sanity check");
259262

260-
#if defined( _DEBUG ) || defined( _INTERNAL )
263+
#if defined( IGC_DEBUG_VARIABLES )
261264

262265
#if defined(_WIN32 )|| defined( _WIN64 )
263266
//Disable Dump for OS Applications
@@ -285,7 +288,7 @@ namespace IGC
285288
IGC_ASSERT_EXIT_MESSAGE((0 <= static_cast<int>(type)), "range sanity check");
286289
IGC_ASSERT_EXIT_MESSAGE((static_cast<int>(type) < static_cast<int> (DumpType::END)), "range sanity check");
287290

288-
#if defined( _DEBUG ) || defined( _INTERNAL )
291+
#if defined( IGC_DEBUG_VARIABLES )
289292
switch (loc)
290293
{
291294
case DumpLoc::ODS : g_dumpFlags[ static_cast<int>(type) ].dumpODS = enabled; break;
@@ -304,7 +307,7 @@ namespace IGC
304307
IGC_ASSERT_EXIT_MESSAGE((0 <= static_cast<int>(type)), "range sanity check");
305308
IGC_ASSERT_EXIT_MESSAGE((static_cast<int>(type) < static_cast<int> (DumpType::END)), "range sanity check");
306309

307-
#if defined( _DEBUG ) || defined( _INTERNAL )
310+
#if defined( IGC_DEBUG_VARIABLES )
308311

309312
#if defined(_WIN32 )|| defined( _WIN64 )
310313
//Disable Dump for OS Applications
@@ -328,7 +331,7 @@ namespace IGC
328331

329332
void IGC_DEBUG_API_CALL SetShaderCorpusName( CorpusName name )
330333
{
331-
#if defined( _DEBUG ) || defined( _INTERNAL )
334+
#if defined( IGC_DEBUG_VARIABLES )
332335
g_shaderCorpusName = name;
333336
#else
334337
(void) name;
@@ -337,7 +340,7 @@ namespace IGC
337340

338341
CorpusName IGC_DEBUG_API_CALL GetShaderCorpusName()
339342
{
340-
#if defined( _DEBUG ) || defined( _INTERNAL )
343+
#if defined( IGC_DEBUG_VARIABLES )
341344
return g_shaderCorpusName.c_str();
342345
#else
343346
return "";
@@ -644,5 +647,7 @@ namespace IGC
644647
{
645648
return g_cBuildInfo;
646649
}
650+
651+
#endif // defined( IGC_EXPORTS ) || defined( IGC_DEBUG_VARIABLES )
647652
}
648653
}

IGC/AdaptorCommon/customApi.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ SPDX-License-Identifier: MIT
1111
#include "usc.h"
1212
#include "common/igc_regkeys.hpp"
1313

14-
#if !( defined( IGC_EXPORTS ) || defined( _DEBUG ) || defined( _INTERNAL ) )
14+
#if !( defined( IGC_EXPORTS ) || defined( IGC_DEBUG_VARIABLES ) )
1515
# include <stdio.h>
1616
#endif
1717

1818
// In _RELEASE builds, make these api functions available for internal use,
1919
// but do not export them in the dll.
20-
#if defined( _DEBUG ) || defined( _INTERNAL )
20+
#if defined( IGC_DEBUG_VARIABLES )
2121
# if defined( _WIN32 )
2222
# if defined( IGC_EXPORTS )
2323
# define IGC_DEBUG_API_CALL __declspec(dllexport)
@@ -139,7 +139,7 @@ namespace IGC
139139
typedef const char* OutputFolderName;
140140
typedef const char* OutputName;
141141

142-
#if defined( IGC_EXPORTS ) || defined( _DEBUG ) || defined( _INTERNAL )
142+
#if defined( IGC_EXPORTS ) || defined( IGC_DEBUG_VARIABLES )
143143

144144
/// Convert enum value to string
145145
EnumStr IGC_DEBUG_API_CALL str(DebugFlag value);

0 commit comments

Comments
 (0)