From 5b53524966af132082a1123afcd6e467f38cc449 Mon Sep 17 00:00:00 2001
From: foreman
Date: Wed, 23 Jul 2014 12:19:19 -0400
Subject: [PATCH] P4 to Git Change 1058342 by jatang@jatang-ocl-lnx3 on
2014/07/23 11:50:50
EPR #402935 - Reset Resource::pinOffset_ if gslResource couldn't be created for pinned memory.
When the pinned memory to be created is too large, gslResource couldn't be created, and a local memory will be created instead. If pinOffset_ is NOT reset in this case, it will mess up future copying of the local memory.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.cpp#187 edit
[ROCm/clr commit: 1e0a5f64f5d01a56d4c4b57c322bbb3e680cc81d]
---
projects/clr/rocclr/runtime/device/gpu/gpuresource.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/projects/clr/rocclr/runtime/device/gpu/gpuresource.cpp b/projects/clr/rocclr/runtime/device/gpu/gpuresource.cpp
index 6be2231341..c6429f660d 100644
--- a/projects/clr/rocclr/runtime/device/gpu/gpuresource.cpp
+++ b/projects/clr/rocclr/runtime/device/gpu/gpuresource.cpp
@@ -577,6 +577,9 @@ Resource::create(MemoryType memType, CreateParams* params, bool heap)
if (gslResource != 0) {
calRes = true;
}
+ else {
+ pinOffset_ = 0;
+ }
}
break;
case View: {