From 66ef29e19aa95eb1e8558cab1ee77e6ac6b81d09 Mon Sep 17 00:00:00 2001
From: foreman
Date: Wed, 27 Jan 2016 12:28:37 -0500
Subject: [PATCH] P4 to Git Change 1231595 by weizhang@weizhang-lnx-opencl on
2016/01/27 12:13:15
SWDEV-85649 - The return of owner() needs to be casted to get amd::Image.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpumemory.cpp#125 edit
[ROCm/clr commit: 4ad453971020f8b81d83488a4954097911976990]
---
projects/clr/rocclr/runtime/device/gpu/gpumemory.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/projects/clr/rocclr/runtime/device/gpu/gpumemory.cpp b/projects/clr/rocclr/runtime/device/gpu/gpumemory.cpp
index d9df9f19b3..f965fa7155 100644
--- a/projects/clr/rocclr/runtime/device/gpu/gpumemory.cpp
+++ b/projects/clr/rocclr/runtime/device/gpu/gpumemory.cpp
@@ -597,7 +597,7 @@ Memory::syncCacheFromHost(VirtualGPU& gpu, device::Memory::SyncFlags syncFlags)
*this, origin, origin, region, Entire);
}
else {
- amd::Image& image = *owner()->asImage();
+ amd::Image& image = *static_cast(owner());
result = gpu.blitMgr().copyBufferToImage(*pinnedMemory_,
*this, origin, origin, image.getRegion(), Entire,
image.getRowPitch(), image.getSlicePitch());
@@ -611,7 +611,7 @@ Memory::syncCacheFromHost(VirtualGPU& gpu, device::Memory::SyncFlags syncFlags)
*this, origin, region, Entire);
}
else {
- amd::Image& image = *owner()->asImage();
+ amd::Image& image = *static_cast(owner());
result = gpu.blitMgr().writeImage(owner()->getHostMem(),
*this, origin, image.getRegion(),
image.getRowPitch(), image.getSlicePitch(), Entire);
@@ -721,7 +721,7 @@ Memory::syncHostFromCache(device::Memory::SyncFlags syncFlags)
*pinnedMemory_, origin, origin, region, Entire);
}
else {
- amd::Image& image = *owner()->asImage();
+ amd::Image& image = *static_cast(owner());
result = dev().xferMgr().copyImageToBuffer(*this,
*pinnedMemory_, origin, origin, image.getRegion(), Entire,
image.getRowPitch(), image.getSlicePitch());
@@ -736,7 +736,7 @@ Memory::syncHostFromCache(device::Memory::SyncFlags syncFlags)
owner()->getHostMem(), origin, region, Entire);
}
else {
- amd::Image& image = *owner()->asImage();
+ amd::Image& image = *static_cast(owner());
result = dev().xferMgr().readImage(*this,
owner()->getHostMem(), origin, image.getRegion(),
image.getRowPitch(), image.getSlicePitch(), Entire);