From f204610517f34b10a9e1f5a4e2bd1bfe794ae071 Mon Sep 17 00:00:00 2001
From: foreman
Date: Fri, 7 Aug 2015 16:45:39 -0400
Subject: [PATCH] P4 to Git Change 1178314 by bdhanase@bala_workpc_ocl on
2015/08/07 16:30:49
EPR #397491 - enable 32 bit opencl 2.0
http://ocltc.amd.com/reviews/r/8191/
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.cpp#318 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#131 edit
---
rocclr/runtime/device/gpu/gpusettings.cpp | 8 ++++----
rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/rocclr/runtime/device/gpu/gpusettings.cpp b/rocclr/runtime/device/gpu/gpusettings.cpp
index bb30ac824c..8554c45e9d 100644
--- a/rocclr/runtime/device/gpu/gpusettings.cpp
+++ b/rocclr/runtime/device/gpu/gpusettings.cpp
@@ -295,10 +295,10 @@ Settings::create(
if (ciPlus_) {
libSelector_ = amd::GPU_Library_CI;
-#if defined(_LP64)
- oclVersion_ = !reportAsOCL12Device && calAttr.isOpenCL200Device ?
- XCONCAT(OpenCL, XCONCAT(OPENCL_MAJOR, OPENCL_MINOR)) : OpenCL12;
-#endif
+ if (LP64_SWITCH(WINDOWS_SWITCH(viPlus_, false), true)) {
+ oclVersion_ = !reportAsOCL12Device && calAttr.isOpenCL200Device ?
+ XCONCAT(OpenCL, XCONCAT(OPENCL_MAJOR, OPENCL_MINOR)) : OpenCL12;
+ }
if (GPU_FORCE_OCL20_32BIT) {
force32BitOcl20_ = true;
oclVersion_ = !reportAsOCL12Device && calAttr.isOpenCL200Device ?
diff --git a/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp b/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp
index d6dfbf8fba..436af73b4e 100644
--- a/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp
+++ b/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp
@@ -209,7 +209,7 @@ CALGSLDevice::open(uint32 gpuIndex, bool enableHighPerformanceState, bool report
m_dcfg.bEnableSvm.value = reportAsOCL12Device ? false : OPENCL_MAJOR >= 2;
m_dcfg.bEnableFlatAddressing.hasValue = true;
-#ifdef ATI_BITS_32
+#if defined(ATI_BITS_32) && defined(ATI_OS_LINUX)
m_dcfg.bEnableFlatAddressing.value = false;
#else
m_dcfg.bEnableFlatAddressing.value = reportAsOCL12Device ? false : (OPENCL_MAJOR >= 2);