Refactoring preemption tests

Change-Id: I7e34f12e7d974e24cc63aaaad77d293b744d1c74
This commit is contained in:
Chodor, Jaroslaw
2018-01-08 16:13:51 +01:00
committed by sys_ocldev
parent 6cf7ac41c2
commit f235ba015e
8 changed files with 151 additions and 198 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Intel Corporation
* Copyright (c) 2018, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@ -503,7 +503,7 @@ size_t CommandStreamReceiverHw<GfxFamily>::getRequiredCsrSize() {
size += getCmdSizeForCoherency();
if (csrSizeRequestFlags.preemptionRequestChanged) {
size += PreemptionHelper::getRequiredCsrSize<GfxFamily>(memoryManager->device->getPreemptionMode());
size += PreemptionHelper::getRequiredCmdStreamSize<GfxFamily>(memoryManager->device->getPreemptionMode());
}
return alignUp(size, MemoryConstants::cacheLineSize);
}
@ -531,7 +531,7 @@ inline void CommandStreamReceiverHw<GfxFamily>::waitForTaskCountWithKmdNotifyFal
template <typename GfxFamily>
inline void CommandStreamReceiverHw<GfxFamily>::programPreemption(LinearStream &csr, DispatchFlags &dispatchFlags) {
if (csrSizeRequestFlags.preemptionRequestChanged) {
PreemptionHelper::programPreemptionMode<GfxFamily>(&csr, dispatchFlags.preemptionMode, preemptionCsrAllocation, nullptr);
PreemptionHelper::programCmdStream<GfxFamily>(&csr, dispatchFlags.preemptionMode, preemptionCsrAllocation, nullptr);
this->lastPreemptionMode = dispatchFlags.preemptionMode;
}
}