mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Refactoring preemption tests
Change-Id: I7e34f12e7d974e24cc63aaaad77d293b744d1c74
This commit is contained in:

committed by
sys_ocldev

parent
6cf7ac41c2
commit
f235ba015e
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user