P4 to Git Change 1309526 by lmoriche@lmoriche_opencl_dev on 2016/08/31 22:39:22

SWDEV-94610 - Use the metadata to set the correct size for pointer arguments. Pointers to different address spaces may be of different sizes.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.cpp#11 edit
此提交包含在:
foreman
2016-08-31 22:44:50 -04:00
父節點 8d309ccae6
當前提交 741816f873
+3 -2
查看文件
@@ -1522,9 +1522,10 @@ VirtualGPU::submitKernelInternal(
const_address srcArgPtr = parameters + signature.at(i).offset_;
if (arg->type_ == HSAIL_ARGTYPE_POINTER ) {
const size_t size = sizeof(void*);
const size_t size = arg->size_;
if (arg->addrQual_ == HSAIL_ADDRESS_LOCAL) {
ldsUsage = amd::alignUp(ldsUsage, arg->alignment_); //!< do we need this?
// Align the LDS on the alignment requirement of type pointed to
ldsUsage = amd::alignUp(ldsUsage, arg->alignment_);
addArg(&argPtr, &ldsUsage, size);
ldsUsage += *reinterpret_cast<const size_t *>(srcArgPtr);
continue;