Change Buffer to MemObj in BufferForAuxTranslation collection

Change-Id: Icbdb8fecaa3fd8e19e993502f59c76156fe4ad2c
This commit is contained in:
Kamil Diedrich
2018-12-19 07:13:57 +01:00
parent 2f88abfa2a
commit b2e0195663
10 changed files with 48 additions and 48 deletions

View File

@@ -555,12 +555,12 @@ void CommandQueue::releaseIndirectHeap(IndirectHeap::Type heapType) {
getCommandStreamReceiver().releaseIndirectHeap(heapType);
}
void CommandQueue::dispatchAuxTranslation(MultiDispatchInfo &multiDispatchInfo, BuffersForAuxTranslation &buffersForAuxTranslation,
void CommandQueue::dispatchAuxTranslation(MultiDispatchInfo &multiDispatchInfo, MemObjsForAuxTranslation &memObjsForAuxTranslation,
AuxTranslationDirection auxTranslationDirection) {
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::AuxTranslation, getContext(), getDevice());
BuiltinDispatchInfoBuilder::BuiltinOpParams dispatchParams;
dispatchParams.buffersForAuxTranslation = &buffersForAuxTranslation;
dispatchParams.memObjsForAuxTranslation = &memObjsForAuxTranslation;
dispatchParams.auxTranslationDirection = auxTranslationDirection;
builder.buildDispatchInfos(multiDispatchInfo, dispatchParams);

View File

@@ -414,7 +414,7 @@ class CommandQueue : public BaseObject<_cl_command_queue> {
virtual void obtainTaskLevelAndBlockedStatus(unsigned int &taskLevel, cl_uint &numEventsInWaitList, const cl_event *&eventWaitList, bool &blockQueue, unsigned int commandType){};
MOCKABLE_VIRTUAL void dispatchAuxTranslation(MultiDispatchInfo &multiDispatchInfo, BuffersForAuxTranslation &buffersForAuxTranslation,
MOCKABLE_VIRTUAL void dispatchAuxTranslation(MultiDispatchInfo &multiDispatchInfo, MemObjsForAuxTranslation &memObjsForAuxTranslation,
AuxTranslationDirection auxTranslationDirection);
void obtainNewTimestampPacketNodes(size_t numberOfNodes, TimestampPacketContainer &previousNodes);

View File

@@ -58,12 +58,12 @@ void CommandQueueHw<GfxFamily>::enqueueHandler(Surface *(&surfaces)[surfaceCount
if (DebugManager.flags.ForceDispatchScheduler.get()) {
forceDispatchScheduler(multiDispatchInfo);
} else {
BuffersForAuxTranslation buffersForAuxTranslation;
MemObjsForAuxTranslation memObjsForAuxTranslation;
if (kernel->isAuxTranslationRequired()) {
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::AuxTranslation, getContext(), getDevice());
builtInLock.takeOwnership(builder, this->context);
kernel->fillWithBuffersForAuxTranslation(buffersForAuxTranslation);
dispatchAuxTranslation(multiDispatchInfo, buffersForAuxTranslation, AuxTranslationDirection::AuxToNonAux);
kernel->fillWithBuffersForAuxTranslation(memObjsForAuxTranslation);
dispatchAuxTranslation(multiDispatchInfo, memObjsForAuxTranslation, AuxTranslationDirection::AuxToNonAux);
}
if (kernel->getKernelInfo().builtinDispatchBuilder == nullptr) {
@@ -81,11 +81,11 @@ void CommandQueueHw<GfxFamily>::enqueueHandler(Surface *(&surfaces)[surfaceCount
}
if (kernel->isAuxTranslationRequired()) {
if (kernel->isParentKernel) {
for (auto &buffer : buffersForAuxTranslation) {
for (auto &buffer : memObjsForAuxTranslation) {
buffer->getGraphicsAllocation()->setAllocationType(GraphicsAllocation::AllocationType::BUFFER);
}
} else {
dispatchAuxTranslation(multiDispatchInfo, buffersForAuxTranslation, AuxTranslationDirection::NonAuxToAux);
dispatchAuxTranslation(multiDispatchInfo, memObjsForAuxTranslation, AuxTranslationDirection::NonAuxToAux);
}
}
}