From 48b5ff4600f4e576555c447970d128e6ffc32494 Mon Sep 17 00:00:00 2001
From: foreman
Date: Thu, 31 Jan 2019 15:46:34 -0500
Subject: [PATCH] P4 to Git Change 1738443 by gandryey@gera-w8 on 2019/01/31
14:38:27
SWDEV-79445 - OCL generic changes and code clean-up
- Clean-up suppressing message box logic
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#602 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#124 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/runtime.cpp#39 edit
---
rocclr/runtime/device/gpu/gpudevice.cpp | 17 -----------------
rocclr/runtime/device/pal/paldevice.cpp | 10 ----------
rocclr/runtime/platform/runtime.cpp | 2 +-
3 files changed, 1 insertion(+), 28 deletions(-)
diff --git a/rocclr/runtime/device/gpu/gpudevice.cpp b/rocclr/runtime/device/gpu/gpudevice.cpp
index d9d779ecb0..2df6f5058f 100644
--- a/rocclr/runtime/device/gpu/gpudevice.cpp
+++ b/rocclr/runtime/device/gpu/gpudevice.cpp
@@ -1188,16 +1188,6 @@ static void parseRequestedDeviceList(requestedDevices_t& requestedDevices) {
}
}
-#if defined(_WIN32) && defined(DEBUG)
-#include
-#include
-static int reportHook(int reportType, char* message, int* returnValue) {
- fprintf(stderr, "%s", message);
- ::exit(3);
- return 1;
-}
-#endif // _WIN32 & DEBUG
-
bool Device::init() {
CALuint numDevices = 0;
bool useDeviceList = false;
@@ -1217,13 +1207,6 @@ bool Device::init() {
// osAssertSetStyle(OSASSERT_STYLE_LOGANDEXIT);
#endif // WIN32
-#if defined(_WIN32) && defined(DEBUG)
- if (::getenv("AMD_OCL_SUPPRESS_MESSAGE_BOX")) {
- _CrtSetReportHook(reportHook);
- _set_error_mode(_OUT_TO_STDERR);
- }
-#endif // _WIN32 & DEBUG
-
gslInit();
#if defined(_WIN32) && !defined(_WIN64)
diff --git a/rocclr/runtime/device/pal/paldevice.cpp b/rocclr/runtime/device/pal/paldevice.cpp
index 21fc5c91d9..2eaa421ac6 100644
--- a/rocclr/runtime/device/pal/paldevice.cpp
+++ b/rocclr/runtime/device/pal/paldevice.cpp
@@ -1213,16 +1213,6 @@ static void parseRequestedDeviceList(const char* requestedDeviceList,
}
}
-#if defined(_WIN32) && defined(DEBUG)
-#include
-#include
-static int reportHook(int reportType, char* message, int* returnValue) {
- fprintf(stderr, "%s", message);
- ::exit(3);
- return 1;
-}
-#endif // _WIN32 & DEBUG
-
bool Device::init() {
uint32_t numDevices = 0;
bool useDeviceList = false;
diff --git a/rocclr/runtime/platform/runtime.cpp b/rocclr/runtime/platform/runtime.cpp
index 21bd0d5f6a..0850d6cd24 100644
--- a/rocclr/runtime/platform/runtime.cpp
+++ b/rocclr/runtime/platform/runtime.cpp
@@ -111,7 +111,7 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved) {
switch (reason) {
case DLL_PROCESS_ATTACH:
#ifdef DEBUG
- if (!AMD_OCL_ENABLE_MESSAGE_BOX) {
+ if (!::getenv("AMD_OCL_ENABLE_MESSAGE_BOX")) {
_CrtSetReportHook(reportHook);
_set_error_mode(_OUT_TO_STDERR);
}