fix: fix scratch programming in heapless mode

Related-To: NEO-10107

Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk
2024-01-23 14:32:18 +00:00
committed by Compute-Runtime-Automation
parent 7bbe57c671
commit 87d13fcb6e
4 changed files with 53 additions and 21 deletions

View File

@@ -447,6 +447,9 @@ class CommandStreamReceiver {
return this->resourcesInitialized;
}
uint32_t getRequiredScratchSlot0Size() { return requiredScratchSlot0Size; }
uint32_t getRequiredScratchSlot1Size() { return requiredScratchSlot1Size; }
protected:
void cleanupResources();
void printDeviceIndex();

View File

@@ -446,23 +446,25 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
bool stateBaseAddressDirty = false;
bool checkVfeStateDirty = false;
if (ssh && (requiredScratchSlot0Size || requiredScratchSlot1Size)) {
scratchSpaceController->setRequiredScratchSpace(ssh->getCpuBase(),
0u,
requiredScratchSlot0Size,
requiredScratchSlot1Size,
this->taskCount,
*this->osContext,
stateBaseAddressDirty,
checkVfeStateDirty);
if (checkVfeStateDirty) {
setMediaVFEStateDirty(true);
}
if (scratchSpaceController->getScratchSpaceSlot0Allocation()) {
makeResident(*scratchSpaceController->getScratchSpaceSlot0Allocation());
}
if (scratchSpaceController->getScratchSpaceSlot1Allocation()) {
makeResident(*scratchSpaceController->getScratchSpaceSlot1Allocation());
if (heaplessModeEnabled == false) {
if (ssh && (requiredScratchSlot0Size || requiredScratchSlot1Size)) {
scratchSpaceController->setRequiredScratchSpace(ssh->getCpuBase(),
0u,
requiredScratchSlot0Size,
requiredScratchSlot1Size,
this->taskCount,
*this->osContext,
stateBaseAddressDirty,
checkVfeStateDirty);
if (checkVfeStateDirty) {
setMediaVFEStateDirty(true);
}
if (scratchSpaceController->getScratchSpaceSlot0Allocation()) {
makeResident(*scratchSpaceController->getScratchSpaceSlot0Allocation());
}
if (scratchSpaceController->getScratchSpaceSlot1Allocation()) {
makeResident(*scratchSpaceController->getScratchSpaceSlot1Allocation());
}
}
}