From c9bf64f2f7e6bcf0e976e8fb6866be942c5659df Mon Sep 17 00:00:00 2001
From: foreman
Date: Mon, 26 Jan 2015 18:39:50 -0500
Subject: [PATCH] P4 to Git Change 1115441 by
skudchad@skudchad_test_win_opencl2 on 2015/01/26 18:11:58
EPR #403782 - IOMMU2/SVM
- Fix assert in OpenCL runtime
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.cpp#204 edit
---
rocclr/runtime/device/gpu/gpuresource.cpp | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/rocclr/runtime/device/gpu/gpuresource.cpp b/rocclr/runtime/device/gpu/gpuresource.cpp
index 851ab90a35..a1e5db9988 100644
--- a/rocclr/runtime/device/gpu/gpuresource.cpp
+++ b/rocclr/runtime/device/gpu/gpuresource.cpp
@@ -356,6 +356,16 @@ Resource::create(MemoryType memType, CreateParams* params, bool heap)
desc.section = GSL_SECTION_SVM_ATOMICS;
}
}
+
+ if (memType == Shader){
+ if(dev().settings().svmFineGrainSystem_) {
+ desc.isAllocExecute = true;
+ }
+ // force to use remote memory for HW DEBUG or use
+ // local memory once we determine if FGS is supported
+ memType = (!dev().settings().enableHwDebug_) ? Local : RemoteUSWC;
+ }
+
// This is a thread safe operation
const_cast(dev()).initializeHeapResources();
@@ -438,15 +448,6 @@ Resource::create(MemoryType memType, CreateParams* params, bool heap)
else if (memoryType() == RemoteUSWC) {
desc.type = GSL_MOA_MEMORY_AGP;
}
- else if (memoryType() == Shader){
- if(dev().settings().svmFineGrainSystem_) {
- desc.isAllocExecute = true;
- }
- // force to use remote memory for HW DEBUG or use
- // local memory once we determine if FGS is supported
- memType = (!dev().settings().enableHwDebug_) ? Local : RemoteUSWC;
- cal_.type_ = memType;
- }
else if (memoryType() == BusAddressable){
desc.type = GSL_MOA_MEMORY_CARD_BUS_ADDRESSABLE;
}