From 041c859d7e1912d4e8621a3a017ea8f90b6bef17 Mon Sep 17 00:00:00 2001
From: foreman
Date: Wed, 13 Jun 2018 14:25:49 -0400
Subject: [PATCH] P4 to Git Change 1567853 by gandryey@gera-ocl-lc on
2018/06/13 14:04:27
SWDEV-79445 - OCL generic changes and code clean-up
- Following CL#1567428. Fix LC path.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/platform/kernel.cpp#32 edit
---
rocclr/runtime/platform/kernel.cpp | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/rocclr/runtime/platform/kernel.cpp b/rocclr/runtime/platform/kernel.cpp
index d710170fe8..a272a176e0 100644
--- a/rocclr/runtime/platform/kernel.cpp
+++ b/rocclr/runtime/platform/kernel.cpp
@@ -298,5 +298,15 @@ KernelSignature::KernelSignature(const std::vector& p
// 16 bytes is the current HW alignment for the arguments
paramsSize_ = alignUp(paramsSize_, 16);
}
+
+ if (hiddenParams.size() > 0) {
+ uint32_t lastArg = hiddenParams.size() - 1;
+ // Check if it's LC path and the hidden arguments are placed at the end
+ if (hiddenParams[lastArg].offset_ >= paramsSize_) {
+ paramsSize_ = hiddenParams[lastArg].offset_ + hiddenParams[lastArg].size_;
+ // 16 bytes is the current HW alignment for the arguments
+ paramsSize_ = alignUp(paramsSize_, 16);
+ }
+ }
}
} // namespace amd