P4 to Git Change 1319465 by lmoriche@lmoriche_opencl_dev on 2016/09/27 14:56:10

SWDEV-103418 - [ROCm CQE][OCLonLC][Fiji] OCLCreateBuffer results in Segmentation fault
	Fix KernelBlitManager::createProgram to report an error if one or more blit kernel could not be created. Re-enable the image blit kernels in the blit program.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/blitcl.cpp#10 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocblit.cpp#4 edit
This commit is contained in:
foreman
2016-09-27 15:06:48 -04:00
parent 9aa76246e5
commit fd73443cb0
2 changed files with 14 additions and 19 deletions
+14 -15
View File
@@ -1509,22 +1509,21 @@ KernelBlitManager::createProgram(Device& device)
program_ = device.blitProgram()->program_;
program_->retain();
bool result = false;
do {
// Create kernel objects for all blits
for (uint i = 0; i < BlitTotal; ++i) {
const amd::Symbol* symbol = program_->findSymbol(BlitName[i]);
if (symbol == NULL) {
break;
}
kernels_[i] = new amd::Kernel(*program_, *symbol, BlitName[i]);
if (kernels_[i] == NULL) {
break;
}
}
bool result = true;
result = true;
} while(!result);
// Create kernel objects for all blits
for (uint i = 0; i < BlitTotal; ++i) {
const amd::Symbol* symbol = program_->findSymbol(BlitName[i]);
if (symbol == NULL) {
result = false;
continue;
}
kernels_[i] = new amd::Kernel(*program_, *symbol, BlitName[i]);
if (kernels_[i] == NULL) {
result = false;
continue;
}
}
return result;
}