Move flag setup after initialization

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2021-05-19 21:41:59 +00:00
committed by Compute-Runtime-Automation
parent 32729f6feb
commit a692f1ecc5
11 changed files with 44 additions and 16 deletions

View File

@@ -253,6 +253,8 @@ class CommandStreamReceiver {
virtual GraphicsAllocation *getClearColorAllocation() = 0;
virtual void postInitFlagsSetup() = 0;
protected:
void cleanupResources();
void printDeviceIndex();

View File

@@ -126,6 +126,8 @@ class CommandStreamReceiverHw : public CommandStreamReceiver {
TagAllocatorBase *getTimestampPacketAllocator() override;
void postInitFlagsSetup() override;
protected:
void programPreemption(LinearStream &csr, DispatchFlags &dispatchFlags);
void programL3(LinearStream &csr, DispatchFlags &dispatchFlags, uint32_t &newL3Config);

View File

@@ -59,17 +59,6 @@ CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiverHw(ExecutionEnvironment
timestampPacketWriteEnabled = !!DebugManager.flags.EnableTimestampPacket.get();
}
createScratchSpaceController();
useNewResourceImplicitFlush = checkPlatformSupportsNewResourceImplicitFlush();
int32_t overrideNewResourceImplicitFlush = DebugManager.flags.PerformImplicitFlushForNewResource.get();
if (overrideNewResourceImplicitFlush != -1) {
useNewResourceImplicitFlush = overrideNewResourceImplicitFlush == 0 ? false : true;
}
useGpuIdleImplicitFlush = checkPlatformSupportsGpuIdleImplicitFlush();
int32_t overrideGpuIdleImplicitFlush = DebugManager.flags.PerformImplicitFlushForIdleGpu.get();
if (overrideGpuIdleImplicitFlush != -1) {
useGpuIdleImplicitFlush = overrideGpuIdleImplicitFlush == 0 ? false : true;
}
}
template <typename GfxFamily>
@@ -1386,4 +1375,18 @@ TagAllocatorBase *CommandStreamReceiverHw<GfxFamily>::getTimestampPacketAllocato
return timestampPacketAllocator.get();
}
template <typename GfxFamily>
void CommandStreamReceiverHw<GfxFamily>::postInitFlagsSetup() {
useNewResourceImplicitFlush = checkPlatformSupportsNewResourceImplicitFlush();
int32_t overrideNewResourceImplicitFlush = DebugManager.flags.PerformImplicitFlushForNewResource.get();
if (overrideNewResourceImplicitFlush != -1) {
useNewResourceImplicitFlush = overrideNewResourceImplicitFlush == 0 ? false : true;
}
useGpuIdleImplicitFlush = checkPlatformSupportsGpuIdleImplicitFlush();
int32_t overrideGpuIdleImplicitFlush = DebugManager.flags.PerformImplicitFlushForIdleGpu.get();
if (overrideGpuIdleImplicitFlush != -1) {
useGpuIdleImplicitFlush = overrideGpuIdleImplicitFlush == 0 ? false : true;
}
}
} // namespace NEO

View File

@@ -216,6 +216,7 @@ bool Device::createDeviceImpl() {
if (!commandStreamReceiver->initDirectSubmission(*this, *osContext)) {
return false;
}
commandStreamReceiver->postInitFlagsSetup();
}
uint32_t defaultEngineIndexWithinMemoryManager = 0;