Use printfSurfaceAddress arg instead of patchToken

Use KernelDescriptor's printfSurfaceAddress arg instead of storing
SPatchAllocateStatelessPrintfSurface token in KernelInfo's patchInfo.

Related-To: NEO-4729
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
This commit is contained in:
Krystian Chmielewski
2021-02-16 15:28:59 +01:00
committed by Compute-Runtime-Automation
parent 8e927b5484
commit 9bb229f771
21 changed files with 162 additions and 176 deletions

View File

@@ -179,7 +179,6 @@ void WorkSizeInfo::checkRatio(const size_t workItems[3]) {
KernelInfo::~KernelInfo() {
kernelArgInfo.clear();
patchInfo.stringDataMap.clear();
delete[] crossThreadData;
}
@@ -315,24 +314,11 @@ void KernelInfo::storePatchToken(const SPatchAllocateStatelessGlobalMemorySurfac
patchInfo.pAllocateStatelessGlobalMemorySurfaceWithInitialization = pStatelessGlobalMemorySurfaceWithInitializationArg;
}
void KernelInfo::storePatchToken(const SPatchAllocateStatelessPrintfSurface *pStatelessPrintfSurfaceArg) {
usesSsh |= true;
patchInfo.pAllocateStatelessPrintfSurface = pStatelessPrintfSurfaceArg;
}
void KernelInfo::storePatchToken(const SPatchAllocateStatelessDefaultDeviceQueueSurface *pStatelessDefaultDeviceQueueSurfaceArg) {
usesSsh |= true;
patchInfo.pAllocateStatelessDefaultDeviceQueueSurface = pStatelessDefaultDeviceQueueSurfaceArg;
}
void KernelInfo::storePatchToken(const SPatchString *pStringArg) {
uint32_t stringIndex = pStringArg->Index;
if (pStringArg->StringSize > 0) {
const char *stringData = reinterpret_cast<const char *>(pStringArg + 1);
patchInfo.stringDataMap.emplace(stringIndex, std::string(stringData, stringData + pStringArg->StringSize));
}
}
void KernelInfo::storePatchToken(const SPatchKernelAttributesInfo *pKernelAttributesInfo) {
this->patchInfo.pKernelAttributesInfo = pKernelAttributesInfo;
attributes = reinterpret_cast<const char *>(pKernelAttributesInfo) + sizeof(SPatchKernelAttributesInfo);