P4 to Git Change 1501660 by gandryey@gera-w8 on 2018/01/09 14:04:56

SWDEV-79445 - OCL generic changes and code clean-up
	- Code style clean-up. No functional changes.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpublit.cpp#127 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#164 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#321 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#236 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#412 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.hpp#142 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palblit.cpp#15 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palcompiler.cpp#20 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#70 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.hpp#22 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevicegl.cpp#9 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.cpp#42 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palmemory.cpp#18 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprintf.cpp#7 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#53 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palresource.cpp#45 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#69 edit
This commit is contained in:
foreman
2018-01-09 14:09:12 -05:00
parent 5ebba8d23c
commit e5ee74a086
17 changed files with 82 additions and 285 deletions
+3 -5
View File
@@ -170,7 +170,7 @@ bool Memory::create(Resource::MemoryType memType, Resource::CreateParams* params
}
if (result) {
if ((params != nullptr) && (memoryType() == Pinned)) {
if ((params != nullptr) && (memoryType() == Pinned)) {
memRef()->gpu_ = params->gpu_;
}
}
@@ -789,7 +789,6 @@ void* Memory::allocMapTarget(const amd::Coord3D& origin, const amd::Coord3D& reg
if (memory == nullptr) {
// for map target of svm buffer , we need use svm host ptr
memory = new (dev().context()) amd::Buffer(dev().context(), flag, owner()->getSize());
Memory* gpuMemory;
do {
if ((memory == nullptr) || !memory->create(initHostPtr, SysMem)) {
@@ -798,7 +797,7 @@ void* Memory::allocMapTarget(const amd::Coord3D& origin, const amd::Coord3D& reg
}
memory->setCacheStatus(canBeCached);
gpuMemory = reinterpret_cast<Memory*>(memory->getDeviceMemory(dev()));
Memory* gpuMemory = reinterpret_cast<Memory*>(memory->getDeviceMemory(dev()));
// Create, Map and get the base pointer for the resource
if ((gpuMemory == nullptr) || (nullptr == gpuMemory->map(nullptr))) {
@@ -1099,14 +1098,13 @@ void* Image::allocMapTarget(const amd::Coord3D& origin, const amd::Coord3D& regi
amd::Buffer(dev().context(), 0, desc().width_ * height * depth * elementSize());
memory->setVirtualDevice(owner()->getVirtualDevice());
Memory* gpuMemory;
do {
if ((memory == nullptr) || !memory->create(nullptr, SysMem)) {
failed = true;
break;
}
gpuMemory = reinterpret_cast<Memory*>(memory->getDeviceMemory(dev()));
Memory* gpuMemory = reinterpret_cast<Memory*>(memory->getDeviceMemory(dev()));
// Create, Map and get the base pointer for the resource
if ((gpuMemory == nullptr) || (nullptr == gpuMemory->map(nullptr))) {