L3 programming refactor 4/n

- Fix overestimation of preemption programming in preamble

Change-Id: I4ddfc6a2dacbe1160c68cdcef08125a5d5e74835
This commit is contained in:
Maciej Dziuban
2018-05-11 11:18:33 +02:00
committed by sys_ocldev
parent baa7640c90
commit 749d89a9bf
2 changed files with 13 additions and 16 deletions

View File

@ -86,7 +86,10 @@ inline void CommandStreamReceiverHw<GfxFamily>::alignToCacheLine(LinearStream &c
template <typename GfxFamily>
inline size_t CommandStreamReceiverHw<GfxFamily>::getRequiredCmdSizeForPreamble() const {
size_t size = sizeof(typename GfxFamily::PIPE_CONTROL) + sizeof(typename GfxFamily::MEDIA_VFE_STATE);
size += PreambleHelper<GfxFamily>::getAdditionalCommandsSize(*memoryManager->device);
if (!this->isPreambleSent) {
size += PreambleHelper<GfxFamily>::getAdditionalCommandsSize(*memoryManager->device);
}
if (!this->isPreambleSent || this->lastSentThreadArbitrationPolicy != this->requiredThreadArbitrationPolicy) {
size += PreambleHelper<GfxFamily>::getThreadArbitrationCommandsSize();
}