mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 13:33:02 +08:00
Pick main Kernel for PrintfHandler and AubSubCapture
Change-Id: I9ff3bdaa5da82e162642deeaf4a8e0821ff00da2 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
64dbdf1556
commit
56562963ef
@@ -40,7 +40,7 @@ PrintfHandler::~PrintfHandler() {
|
||||
|
||||
PrintfHandler *PrintfHandler::create(const MultiDispatchInfo &multiDispatchInfo, Device &device) {
|
||||
if (multiDispatchInfo.usesStatelessPrintfSurface() ||
|
||||
(multiDispatchInfo.begin()->getKernel()->checkIfIsParentKernelAndBlocksUsesPrintf())) {
|
||||
(multiDispatchInfo.peekMainKernel()->checkIfIsParentKernelAndBlocksUsesPrintf())) {
|
||||
return new PrintfHandler(device);
|
||||
}
|
||||
return nullptr;
|
||||
@@ -51,7 +51,7 @@ void PrintfHandler::prepareDispatch(const MultiDispatchInfo &multiDispatchInfo)
|
||||
if (printfSurfaceSize == 0) {
|
||||
return;
|
||||
}
|
||||
kernel = multiDispatchInfo.begin()->getKernel();
|
||||
kernel = multiDispatchInfo.peekMainKernel();
|
||||
printfSurface = device.getMemoryManager()->allocateGraphicsMemoryInPreferredPool(true, nullptr, printfSurfaceSize, GraphicsAllocation::AllocationType::PRINTF_SURFACE);
|
||||
|
||||
*reinterpret_cast<uint32_t *>(printfSurface->getUnderlyingBuffer()) = printfSurfaceInitialDataSize;
|
||||
|
||||
Reference in New Issue
Block a user