Add clEnqueueNDRangeKernelINTEL API

Related-To: NEO-2712

Change-Id: If1d16d9d626871a9dc4b19282f9edc5786ffa398
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2019-11-19 16:54:47 +01:00
committed by sys_ocldev
parent 7be937c226
commit 82bc594af0
26 changed files with 764 additions and 14 deletions

View File

@@ -2205,6 +2205,25 @@ void Kernel::patchBlocksSimdSize() {
}
}
bool Kernel::usesSyncBuffer() {
return (kernelInfo.patchInfo.pAllocateSyncBuffer != nullptr);
}
void Kernel::patchSyncBuffer(Device &device, GraphicsAllocation *gfxAllocation, size_t bufferOffset) {
auto &patchInfo = kernelInfo.patchInfo;
auto bufferPatchAddress = ptrOffset(getCrossThreadData(), patchInfo.pAllocateSyncBuffer->DataParamOffset);
patchWithRequiredSize(bufferPatchAddress, patchInfo.pAllocateSyncBuffer->DataParamSize,
ptrOffset(gfxAllocation->getGpuAddressToPatch(), bufferOffset));
if (requiresSshForBuffers()) {
auto surfaceState = ptrOffset(reinterpret_cast<uintptr_t *>(getSurfaceStateHeap()),
patchInfo.pAllocateSyncBuffer->SurfaceStateHeapOffset);
auto addressToPatch = gfxAllocation->getUnderlyingBuffer();
auto sizeToPatch = gfxAllocation->getUnderlyingBufferSize();
Buffer::setSurfaceState(&device, surfaceState, sizeToPatch, addressToPatch, gfxAllocation);
}
}
template void Kernel::patchReflectionSurface<false>(DeviceQueue *, PrintfHandler *);
bool Kernel::isPatched() const {