mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 12:23:05 +08:00
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:
committed by
Compute-Runtime-Automation
parent
7bbe57c671
commit
87d13fcb6e
@@ -447,6 +447,9 @@ class CommandStreamReceiver {
|
||||
return this->resourcesInitialized;
|
||||
}
|
||||
|
||||
uint32_t getRequiredScratchSlot0Size() { return requiredScratchSlot0Size; }
|
||||
uint32_t getRequiredScratchSlot1Size() { return requiredScratchSlot1Size; }
|
||||
|
||||
protected:
|
||||
void cleanupResources();
|
||||
void printDeviceIndex();
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user