SWDEV-307185 - Create heap for device memory allocator

Pass the allocated heap with the kernel arguments

Change-Id: Icdec09b7f937845c39e21cbca7071dc3ba791af9
This commit is contained in:
German Andryeyev
2022-03-02 19:19:29 -05:00
parent a6bcb4435a
commit 7b114a2b8b
11 changed files with 103 additions and 29 deletions
+7
View File
@@ -2829,6 +2829,13 @@ bool VirtualGPU::submitKernelInternal(const amd::NDRangeContainer& sizes, const
WriteAqlArgAt(hidden_arguments, gridSync, it.size_, it.offset_);
break;
}
case amd::KernelParameterDescriptor::HiddenHeap:
if (dev().HeapBuffer() != nullptr) {
// Add heap pointer to the code
size_t heap_ptr = static_cast<size_t>(dev().HeapBuffer()->virtualAddress());
WriteAqlArgAt(hidden_arguments, heap_ptr, it.size_, it.offset_);
}
break;
case amd::KernelParameterDescriptor::HiddenBlockCountX:
WriteAqlArgAt(hidden_arguments, static_cast<uint32_t>(newGlobalSize[0] / local[0]),
it.size_, it.offset_);