From 8c3b5ef90bedf229b5126adb6163dbcff93fa4bf Mon Sep 17 00:00:00 2001
From: foreman
Date: Fri, 28 Oct 2016 04:06:50 -0400
Subject: [PATCH] P4 to Git Change 1333198 by lmoriche@lmoriche_opencl_dev on
2016/10/28 04:01:59
SWDEV-105604 - [OCL-LC-PAL] OpenCL program manager for LC on PAL
- Suppress the assertion message box on windows by default.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/platform/runtime.cpp#34 edit
... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.hpp#258 edit
[ROCm/clr commit: b3c63c5fb526584fb86e398e0d59c5e4d729130c]
---
projects/clr/rocclr/runtime/platform/runtime.cpp | 11 +++++++----
projects/clr/rocclr/runtime/utils/flags.hpp | 4 ++--
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/projects/clr/rocclr/runtime/platform/runtime.cpp b/projects/clr/rocclr/runtime/platform/runtime.cpp
index cdbfe127df..e3cf1e877a 100644
--- a/projects/clr/rocclr/runtime/platform/runtime.cpp
+++ b/projects/clr/rocclr/runtime/platform/runtime.cpp
@@ -123,9 +123,12 @@ ReferenceCountedObject::release()
static int
reportHook(int reportType, char *message, int *returnValue)
{
- std::cerr << message;
- ::exit(3);
- return TRUE;
+ if (returnValue) {
+ *returnValue = 1;
+ }
+ std::cerr << message;
+ ::exit(3);
+ return TRUE;
}
#endif // DEBUG
@@ -135,7 +138,7 @@ DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved)
switch (reason) {
case DLL_PROCESS_ATTACH:
# ifdef DEBUG
- if (AMD_OCL_SUPPRESS_MESSAGE_BOX) {
+ if (!AMD_OCL_ENABLE_MESSAGE_BOX) {
_CrtSetReportHook(reportHook);
_set_error_mode(_OUT_TO_STDERR);
}
diff --git a/projects/clr/rocclr/runtime/utils/flags.hpp b/projects/clr/rocclr/runtime/utils/flags.hpp
index a776d08dd0..587dc71c41 100644
--- a/projects/clr/rocclr/runtime/utils/flags.hpp
+++ b/projects/clr/rocclr/runtime/utils/flags.hpp
@@ -78,8 +78,8 @@ release(cstring, AMD_OCL_LINK_OPTIONS_APPEND, 0, \
"Append clLinkProgram()'s options") \
release(cstring, AMD_OCL_SC_LIB, 0, \
"Set shader compiler shared library name or path") \
-debug(bool, AMD_OCL_SUPPRESS_MESSAGE_BOX, false, \
- "Suppress the error dialog on Windows") \
+debug(bool, AMD_OCL_ENABLE_MESSAGE_BOX, false, \
+ "Enable the error dialog on Windows") \
release(cstring, GPU_PRE_RA_SCHED, "default", \
"Allows setting of alternate pre-RA-sched") \
release(size_t, GPU_PINNED_XFER_SIZE, 16, \