Simplify Semaphore programming

Change-Id: I3322be137bbc1fe6f63baada26cf65baf821b4c1
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2018-09-11 10:15:54 +02:00
committed by sys_ocldev
parent c3be3d9ef3
commit 2366c41154
5 changed files with 35 additions and 10 deletions

View File

@@ -664,11 +664,7 @@ inline void GpgpuWalkerHelper<GfxFamily>::dispatchOnDeviceWaitlistSemaphores(Lin
auto compareAddress = timestampPacket->pickAddressForDataWrite(TimestampPacket::DataIndex::ContextEnd);
auto miSemaphoreCmd = commandStream->getSpaceForCmd<MI_SEMAPHORE_WAIT>();
*miSemaphoreCmd = MI_SEMAPHORE_WAIT::sInit();
miSemaphoreCmd->setCompareOperation(MI_SEMAPHORE_WAIT::COMPARE_OPERATION::COMPARE_OPERATION_SAD_NOT_EQUAL_SDD);
miSemaphoreCmd->setSemaphoreDataDword(1);
miSemaphoreCmd->setSemaphoreGraphicsAddress(compareAddress);
KernelCommandsHelper<GfxFamily>::programMiSemaphoreWait(*commandStream, compareAddress, 1);
}
}