mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Move destruction of command stream receiver to execution environment.
- remove other explicit resets, no longer needed. - change the order of destruction, command stream receiver needs to be destroyed prior to memory manager. Change-Id: I3c5db46db15a2cb7dc9f6fdb0e06441806fbd9f2
This commit is contained in:
@ -182,7 +182,6 @@ LinearStream &CommandStreamReceiver::getCS(size_t minRequiredSize) {
|
||||
}
|
||||
|
||||
void CommandStreamReceiver::cleanupResources() {
|
||||
auto memoryManager = this->getMemoryManager();
|
||||
if (!memoryManager)
|
||||
return;
|
||||
|
||||
@ -210,7 +209,6 @@ void CommandStreamReceiver::cleanupResources() {
|
||||
tagAllocation = nullptr;
|
||||
tagAddress = nullptr;
|
||||
}
|
||||
experimentalCmdBuffer.reset(nullptr);
|
||||
}
|
||||
|
||||
bool CommandStreamReceiver::waitForCompletionWithTimeout(bool enableTimeout, int64_t timeoutMicroseconds, uint32_t taskCountToWait) {
|
||||
|
@ -106,9 +106,9 @@ Device::~Device() {
|
||||
if (performanceCounters) {
|
||||
performanceCounters->shutdown();
|
||||
}
|
||||
|
||||
if (executionEnvironment->commandStreamReceiver) {
|
||||
executionEnvironment->commandStreamReceiver->flushBatchedSubmissions();
|
||||
executionEnvironment->commandStreamReceiver.reset(nullptr);
|
||||
}
|
||||
|
||||
if (deviceInfo.sourceLevelDebuggerActive && sourceLevelDebugger) {
|
||||
|
@ -39,7 +39,7 @@ class ExecutionEnvironment : public ReferenceTrackedObject<ExecutionEnvironment>
|
||||
ExecutionEnvironment();
|
||||
~ExecutionEnvironment() override;
|
||||
void initGmm(const HardwareInfo *hwInfo);
|
||||
std::unique_ptr<CommandStreamReceiver> commandStreamReceiver;
|
||||
std::unique_ptr<MemoryManager> memoryManager;
|
||||
std::unique_ptr<CommandStreamReceiver> commandStreamReceiver;
|
||||
};
|
||||
} // namespace OCLRT
|
||||
|
Reference in New Issue
Block a user