mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 21:18:24 +08:00
Move flag setup after initialization
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
32729f6feb
commit
a692f1ecc5
@@ -253,6 +253,8 @@ class CommandStreamReceiver {
|
||||
|
||||
virtual GraphicsAllocation *getClearColorAllocation() = 0;
|
||||
|
||||
virtual void postInitFlagsSetup() = 0;
|
||||
|
||||
protected:
|
||||
void cleanupResources();
|
||||
void printDeviceIndex();
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -216,6 +216,7 @@ bool Device::createDeviceImpl() {
|
||||
if (!commandStreamReceiver->initDirectSubmission(*this, *osContext)) {
|
||||
return false;
|
||||
}
|
||||
commandStreamReceiver->postInitFlagsSetup();
|
||||
}
|
||||
|
||||
uint32_t defaultEngineIndexWithinMemoryManager = 0;
|
||||
|
||||
Reference in New Issue
Block a user