mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 06:24:51 +08:00
feature: Add support for BUFFER_SIZE explicit argument
Related-To: NEO-13972 Signed-off-by: Vysochyn, Illia <illia.vysochyn@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
8978ea5e5a
commit
146a7f7b9b
@@ -1527,6 +1527,7 @@ cl_int Kernel::setArgBuffer(uint32_t argIndex,
|
||||
|
||||
const auto &arg = kernelInfo.kernelDescriptor.payloadMappings.explicitArgs[argIndex];
|
||||
const auto &argAsPtr = arg.as<ArgDescPointer>();
|
||||
patch<int64_t, int64_t>(0, crossThreadData, argAsPtr.bufferSize);
|
||||
|
||||
if (clMem && *clMem) {
|
||||
auto clMemObj = *clMem;
|
||||
@@ -1539,6 +1540,8 @@ cl_int Kernel::setArgBuffer(uint32_t argIndex,
|
||||
return CL_INVALID_MEM_OBJECT;
|
||||
}
|
||||
|
||||
patch<int64_t, int64_t>(static_cast<int64_t>(buffer->getSize()), getCrossThreadData(), argAsPtr.bufferSize);
|
||||
|
||||
auto gfxAllocationType = buffer->getGraphicsAllocation(rootDeviceIndex)->getAllocationType();
|
||||
if (!isBuiltIn) {
|
||||
this->anyKernelArgumentUsingSystemMemory |= Kernel::graphicsAllocationTypeUseSystemMemory(gfxAllocationType);
|
||||
|
||||
Reference in New Issue
Block a user