mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-22 09:59:39 +08:00
fix: patch correct payload offset value in relocation
Related-To:: GSD-8116 Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
63843862df
commit
b755a30919
@@ -440,7 +440,8 @@ void Linker::patchInstructionsSegments(const std::vector<PatchableSegment> &inst
|
||||
|
||||
auto relocAddress = ptrOffset(segment.hostPointer, static_cast<uintptr_t>(relocation.offset));
|
||||
if (relocation.type == LinkerInput::RelocationInfo::Type::perThreadPayloadOffset) {
|
||||
*reinterpret_cast<uint32_t *>(relocAddress) = kernelDescriptors.at(segId)->kernelAttributes.crossThreadDataSize;
|
||||
uint32_t crossThreadDataSize = kernelDescriptors.at(segId)->kernelAttributes.crossThreadDataSize - kernelDescriptors.at(segId)->kernelAttributes.inlineDataPayloadSize;
|
||||
*reinterpret_cast<uint32_t *>(relocAddress) = crossThreadDataSize;
|
||||
} else if (relocation.symbolName == implicitArgsRelocationSymbolName) {
|
||||
pImplicitArgsRelocationAddresses[static_cast<uint32_t>(segId)].push_back(reinterpret_cast<uint32_t *>(relocAddress));
|
||||
} else if (relocation.symbolName.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user