mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
refactor: create new members for storing spill and private memory in scratch
rename private scratch space into scratch space slot 1 as it can be generic Related-To: NEO-9944 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
de480e792f
commit
a697a3f718
@@ -269,13 +269,13 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushImmediateTask(
|
||||
flushData.stateComputeModeFullConfigurationNeeded = getStateComputeModeDirty();
|
||||
flushData.stateBaseAddressFullConfigurationNeeded = getGSBAStateDirty();
|
||||
|
||||
if (dispatchFlags.sshCpuBase != nullptr && (this->requiredScratchSize > 0 || this->requiredPrivateScratchSize > 0)) {
|
||||
if (dispatchFlags.sshCpuBase != nullptr && (this->requiredScratchSlot0Size > 0 || this->requiredScratchSlot1Size > 0)) {
|
||||
bool checkFeStateDirty = false;
|
||||
bool checkSbaStateDirty = false;
|
||||
scratchSpaceController->setRequiredScratchSpace(dispatchFlags.sshCpuBase,
|
||||
0u,
|
||||
this->requiredScratchSize,
|
||||
this->requiredPrivateScratchSize,
|
||||
this->requiredScratchSlot0Size,
|
||||
this->requiredScratchSlot1Size,
|
||||
this->taskCount,
|
||||
*this->osContext,
|
||||
checkSbaStateDirty,
|
||||
@@ -283,11 +283,11 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushImmediateTask(
|
||||
flushData.frontEndFullConfigurationNeeded |= checkFeStateDirty;
|
||||
flushData.stateBaseAddressFullConfigurationNeeded |= checkSbaStateDirty;
|
||||
|
||||
if (scratchSpaceController->getScratchSpaceAllocation()) {
|
||||
makeResident(*scratchSpaceController->getScratchSpaceAllocation());
|
||||
if (scratchSpaceController->getScratchSpaceSlot0Allocation()) {
|
||||
makeResident(*scratchSpaceController->getScratchSpaceSlot0Allocation());
|
||||
}
|
||||
if (scratchSpaceController->getPrivateScratchSpaceAllocation()) {
|
||||
makeResident(*scratchSpaceController->getPrivateScratchSpaceAllocation());
|
||||
if (scratchSpaceController->getScratchSpaceSlot1Allocation()) {
|
||||
makeResident(*scratchSpaceController->getScratchSpaceSlot1Allocation());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -446,11 +446,11 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
|
||||
bool stateBaseAddressDirty = false;
|
||||
|
||||
bool checkVfeStateDirty = false;
|
||||
if (ssh && (requiredScratchSize || requiredPrivateScratchSize)) {
|
||||
if (ssh && (requiredScratchSlot0Size || requiredScratchSlot1Size)) {
|
||||
scratchSpaceController->setRequiredScratchSpace(ssh->getCpuBase(),
|
||||
0u,
|
||||
requiredScratchSize,
|
||||
requiredPrivateScratchSize,
|
||||
requiredScratchSlot0Size,
|
||||
requiredScratchSlot1Size,
|
||||
this->taskCount,
|
||||
*this->osContext,
|
||||
stateBaseAddressDirty,
|
||||
@@ -458,11 +458,11 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
|
||||
if (checkVfeStateDirty) {
|
||||
setMediaVFEStateDirty(true);
|
||||
}
|
||||
if (scratchSpaceController->getScratchSpaceAllocation()) {
|
||||
makeResident(*scratchSpaceController->getScratchSpaceAllocation());
|
||||
if (scratchSpaceController->getScratchSpaceSlot0Allocation()) {
|
||||
makeResident(*scratchSpaceController->getScratchSpaceSlot0Allocation());
|
||||
}
|
||||
if (scratchSpaceController->getPrivateScratchSpaceAllocation()) {
|
||||
makeResident(*scratchSpaceController->getPrivateScratchSpaceAllocation());
|
||||
if (scratchSpaceController->getScratchSpaceSlot1Allocation()) {
|
||||
makeResident(*scratchSpaceController->getScratchSpaceSlot1Allocation());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1036,7 +1036,7 @@ inline void CommandStreamReceiverHw<GfxFamily>::programVFEState(LinearStream &cs
|
||||
auto engineGroupType = gfxCoreHelper.getEngineGroupType(getOsContext().getEngineType(), getOsContext().getEngineUsage(), hwInfo);
|
||||
auto pVfeState = PreambleHelper<GfxFamily>::getSpaceForVfeState(&csr, hwInfo, engineGroupType);
|
||||
PreambleHelper<GfxFamily>::programVfeState(
|
||||
pVfeState, peekRootDeviceEnvironment(), requiredScratchSize, getScratchPatchAddress(),
|
||||
pVfeState, peekRootDeviceEnvironment(), requiredScratchSlot0Size, getScratchPatchAddress(),
|
||||
maxFrontEndThreads, streamProperties);
|
||||
auto commandOffset = PreambleHelper<GfxFamily>::getScratchSpaceAddressOffsetForVfeState(&csr, pVfeState);
|
||||
|
||||
@@ -1757,10 +1757,10 @@ inline void CommandStreamReceiverHw<GfxFamily>::reprogramStateBaseAddress(const
|
||||
|
||||
uint64_t newGshBase = 0;
|
||||
gsbaFor32BitProgrammed = false;
|
||||
if (is64bit && scratchSpaceController->getScratchSpaceAllocation() && !force32BitAllocations) {
|
||||
if (is64bit && scratchSpaceController->getScratchSpaceSlot0Allocation() && !force32BitAllocations) {
|
||||
newGshBase = scratchSpaceController->calculateNewGSH();
|
||||
} else if (is64bit && force32BitAllocations && dispatchFlags.gsba32BitRequired) {
|
||||
bool useLocalMemory = scratchSpaceController->getScratchSpaceAllocation() ? scratchSpaceController->getScratchSpaceAllocation()->isAllocatedInLocalMemoryPool() : false;
|
||||
bool useLocalMemory = scratchSpaceController->getScratchSpaceSlot0Allocation() ? scratchSpaceController->getScratchSpaceSlot0Allocation()->isAllocatedInLocalMemoryPool() : false;
|
||||
newGshBase = getMemoryManager()->getExternalHeapBaseAddress(rootDeviceIndex, useLocalMemory);
|
||||
gsbaFor32BitProgrammed = true;
|
||||
}
|
||||
@@ -1950,7 +1950,7 @@ void CommandStreamReceiverHw<GfxFamily>::dispatchImmediateFlushFrontEndCommand(I
|
||||
auto feStateCmdSpace = PreambleHelper<GfxFamily>::getSpaceForVfeState(&csrStream, peekHwInfo(), engineGroupType);
|
||||
PreambleHelper<GfxFamily>::programVfeState(feStateCmdSpace,
|
||||
peekRootDeviceEnvironment(),
|
||||
requiredScratchSize,
|
||||
requiredScratchSlot0Size,
|
||||
getScratchPatchAddress(),
|
||||
device.getDeviceInfo().maxFrontEndThreads,
|
||||
this->streamProperties);
|
||||
|
||||
Reference in New Issue
Block a user