From 1267cf476a9556516645b23886a09246143b92bf Mon Sep 17 00:00:00 2001 From: foreman Date: Wed, 26 Oct 2016 16:13:32 -0400 Subject: [PATCH] P4 to Git Change 1332293 by lmoriche@lmoriche_opencl_dev on 2016/10/26 16:04:38 SWDEV-105604 - OpenCL program manager for LC on PAL - Don't count the hidden arguments as the OCL signature should not see them. Use -1 for hidden index. Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.cpp#19 edit --- rocclr/runtime/device/pal/palkernel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rocclr/runtime/device/pal/palkernel.cpp b/rocclr/runtime/device/pal/palkernel.cpp index 8c77a6014f..dde15db7a6 100644 --- a/rocclr/runtime/device/pal/palkernel.cpp +++ b/rocclr/runtime/device/pal/palkernel.cpp @@ -503,7 +503,7 @@ void HSAILKernel::initHsailArgs(const aclArgData* aclArg) { // Iterate through the each kernel argument - for (; aclArg->struct_size != 0; aclArg++) { + for (uint index = 0; aclArg->struct_size != 0; aclArg++) { Argument* arg = new Argument; // Initialize HSAIL kernel argument @@ -525,7 +525,7 @@ HSAILKernel::initHsailArgs(const aclArgData* aclArg) || arg->type_ == HSAIL_ARGTYPE_HIDDEN_COMPLETION_ACTION || arg->type_ == HSAIL_ARGTYPE_HIDDEN_NONE; - arg->index_ = isHidden ? uint(-1) : arguments_.size(); + arg->index_ = isHidden ? uint(-1) : index++; arguments_.push_back(arg); }