P4 to Git Change 1101352 by gandryey@gera-dev-w7 on 2014/11/28 18:03:18

ECR #304775 - Make optimization for read map of USWC memory
	- If runtime detects USWC map with read operation, then it will switch to indirect map. This should improve map-read  performance on APU(s)  when USWC memory is used instead of frame buffer

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_memobj.cpp#72 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_svm.cpp#8 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpudevice.cpp#269 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpudevice.hpp#89 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#172 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#234 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#486 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#134 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpumemory.cpp#112 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpumemory.hpp#43 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#340 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa/hsadevice.cpp#88 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa/hsadevice.hpp#45 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa/hsamemory.cpp#42 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa/hsamemory.hpp#27 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa/hsavirtual.cpp#98 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsadevice.cpp#21 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsadevice.hpp#7 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsamemory.cpp#6 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsamemory.hpp#5 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsavirtual.cpp#26 edit
This commit is contained in:
foreman
2014-11-28 18:11:36 -05:00
parent 2ba0f2a112
commit 6d464be252
14 changed files with 75 additions and 65 deletions
+6 -2
View File
@@ -906,6 +906,7 @@ void*
Memory::allocMapTarget(
const amd::Coord3D& origin,
const amd::Coord3D& region,
uint mapFlags,
size_t* rowPitch,
size_t* slicePitch)
{
@@ -921,7 +922,8 @@ Memory::allocMapTarget(
incIndMapCount();
// If host memory exists, use it
if (owner()->getHostMem() != NULL) {
if ((owner()->getHostMem() != NULL) &&
(isCacheable() || !isHostMemDirectAccess() || !(mapFlags & CL_MAP_READ))) {
mapAddress = reinterpret_cast<address>(owner()->getHostMem());
}
// If resource is a persistent allocation, we can use it directly
@@ -1226,6 +1228,7 @@ void*
Image::allocMapTarget(
const amd::Coord3D& origin,
const amd::Coord3D& region,
uint mapFlags,
size_t* rowPitch,
size_t* slicePitch)
{
@@ -1245,7 +1248,8 @@ Image::allocMapTarget(
incIndMapCount();
// If host memory exists, use it
if (owner()->getHostMem() != NULL) {
if ((owner()->getHostMem() != NULL) &&
(isCacheable() || !isHostMemDirectAccess() || !(mapFlags & CL_MAP_READ))) {
useRemoteResource = false;
mapAddress = reinterpret_cast<address>(owner()->getHostMem());
amd::Image* amdImage = owner()->asImage();