P4 to Git Change 1567789 by gandryey@gera-w8 on 2018/06/13 11:45:56

SWDEV-79445 - OCL generic changes and code clean-up
	Following CL#1567428. Fix "pass by reference" logic:
	- Make sure we add the offset to the struct location
	- Adjust assert condition

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.cpp#54 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#108 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/kernel.cpp#31 edit
This commit is contained in:
foreman
2018-06-13 12:01:00 -04:00
parent 1f1b062117
commit ec029f4a40
3 changed files with 10 additions and 5 deletions
+2 -1
View File
@@ -3115,7 +3115,8 @@ bool VirtualGPU::processMemObjectsHSA(const amd::Kernel& kernel, const_address p
else if (desc.type_ == T_VOID) {
if (desc.info_.oclObject_ == amd::KernelParameterDescriptor::ReferenceObject) {
// Copy the current structure into CB1
size_t gpuPtr = static_cast<size_t>(cb(1)->UploadDataToHw(params, desc.size_));
size_t gpuPtr = static_cast<size_t>(cb(1)->UploadDataToHw(
params + desc.offset_, desc.size_));
// Then use a pointer in aqlArgBuffer to CB1
const auto it = hsaKernel.patch().find(desc.offset_);
// Patch the GPU VA address in the original arguments