mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 22:12:59 +08:00
Defer ULLS initialization
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
3f87dfa74b
commit
9e50138829
@@ -210,7 +210,7 @@ class CommandStreamReceiver {
|
||||
this->latestSentTaskCount = latestSentTaskCount;
|
||||
}
|
||||
|
||||
virtual uint32_t blitBuffer(const BlitPropertiesContainer &blitPropertiesContainer, bool blocking, bool profilingEnabled) = 0;
|
||||
virtual uint32_t blitBuffer(const BlitPropertiesContainer &blitPropertiesContainer, bool blocking, bool profilingEnabled, Device &device) = 0;
|
||||
|
||||
virtual void flushTagUpdate() = 0;
|
||||
virtual void flushNonKernelTask(GraphicsAllocation *eventAlloc, uint64_t immediateGpuAddress, uint64_t immediateData, PipeControlArgs &args, bool isWaitOnEvents, bool isStartOfDispatch, bool isEndOfDispatch) = 0;
|
||||
|
||||
@@ -91,7 +91,7 @@ class CommandStreamReceiverHw : public CommandStreamReceiver {
|
||||
return CommandStreamReceiverType::CSR_HW;
|
||||
}
|
||||
|
||||
uint32_t blitBuffer(const BlitPropertiesContainer &blitPropertiesContainer, bool blocking, bool profilingEnabled) override;
|
||||
uint32_t blitBuffer(const BlitPropertiesContainer &blitPropertiesContainer, bool blocking, bool profilingEnabled, Device &device) override;
|
||||
|
||||
void flushTagUpdate() override;
|
||||
void flushNonKernelTask(GraphicsAllocation *eventAlloc, uint64_t immediateGpuAddress, uint64_t immediateData, PipeControlArgs &args, bool isWaitOnEvent, bool isStartOfDispatch, bool isEndOfDispatch) override;
|
||||
|
||||
@@ -1003,7 +1003,7 @@ bool CommandStreamReceiverHw<GfxFamily>::detectInitProgrammingFlagsRequired(cons
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
uint32_t CommandStreamReceiverHw<GfxFamily>::blitBuffer(const BlitPropertiesContainer &blitPropertiesContainer, bool blocking, bool profilingEnabled) {
|
||||
uint32_t CommandStreamReceiverHw<GfxFamily>::blitBuffer(const BlitPropertiesContainer &blitPropertiesContainer, bool blocking, bool profilingEnabled, Device &device) {
|
||||
using MI_BATCH_BUFFER_END = typename GfxFamily::MI_BATCH_BUFFER_END;
|
||||
using MI_FLUSH_DW = typename GfxFamily::MI_FLUSH_DW;
|
||||
|
||||
@@ -1016,6 +1016,7 @@ uint32_t CommandStreamReceiverHw<GfxFamily>::blitBuffer(const BlitPropertiesCont
|
||||
latestSentTaskCount = newTaskCount;
|
||||
|
||||
getOsContext().ensureContextInitialized();
|
||||
this->initDirectSubmission(device, getOsContext());
|
||||
|
||||
if (PauseOnGpuProperties::pauseModeAllowed(DebugManager.flags.PauseOnBlitCopy.get(), taskCount, PauseOnGpuProperties::PauseMode::BeforeWorkload)) {
|
||||
BlitCommandsHelper<GfxFamily>::dispatchDebugPauseCommands(commandStream, getDebugPauseStateGPUAddress(), DebugPauseState::waitingForUserStartConfirmation, DebugPauseState::hasUserStartConfirmation);
|
||||
@@ -1396,11 +1397,15 @@ inline bool CommandStreamReceiverHw<GfxFamily>::initDirectSubmission(Device &dev
|
||||
|
||||
if (startDirect) {
|
||||
if (osContext.getEngineType() == aub_stream::ENGINE_BCS) {
|
||||
blitterDirectSubmission = DirectSubmissionHw<GfxFamily, BlitterDispatcher<GfxFamily>>::create(device, osContext);
|
||||
ret = blitterDirectSubmission->initialize(submitOnInit);
|
||||
if (!this->isBlitterDirectSubmissionEnabled()) {
|
||||
blitterDirectSubmission = DirectSubmissionHw<GfxFamily, BlitterDispatcher<GfxFamily>>::create(device, osContext);
|
||||
ret = blitterDirectSubmission->initialize(submitOnInit);
|
||||
}
|
||||
} else {
|
||||
directSubmission = DirectSubmissionHw<GfxFamily, RenderDispatcher<GfxFamily>>::create(device, osContext);
|
||||
ret = directSubmission->initialize(submitOnInit);
|
||||
if (!this->isDirectSubmissionEnabled()) {
|
||||
directSubmission = DirectSubmissionHw<GfxFamily, RenderDispatcher<GfxFamily>>::create(device, osContext);
|
||||
ret = directSubmission->initialize(submitOnInit);
|
||||
}
|
||||
}
|
||||
osContext.setDirectSubmissionActive();
|
||||
}
|
||||
|
||||
@@ -216,10 +216,6 @@ bool Device::createDeviceImpl() {
|
||||
|
||||
for (auto &engine : engines) {
|
||||
auto commandStreamReceiver = engine.commandStreamReceiver;
|
||||
auto osContext = engine.osContext;
|
||||
if (!commandStreamReceiver->initDirectSubmission(*this, *osContext)) {
|
||||
return false;
|
||||
}
|
||||
commandStreamReceiver->postInitFlagsSetup();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user