mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Remove an osInterface reference from csr
Resolves: NEO-4151 Change-Id: I69fec50bbe14245a91846281191e360ad99d6e1c Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
This commit is contained in:

committed by
sys_ocldev

parent
8a6cb1e5ca
commit
31029be263
@ -153,6 +153,10 @@ LinearStream &CommandStreamReceiver::getCS(size_t minRequiredSize) {
|
||||
return commandStream;
|
||||
}
|
||||
|
||||
OSInterface *CommandStreamReceiver::getOSInterface() const {
|
||||
return executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->osInterface.get();
|
||||
}
|
||||
|
||||
void CommandStreamReceiver::cleanupResources() {
|
||||
waitForTaskCountAndCleanAllocationList(this->latestFlushedTaskCount, TEMPORARY_ALLOCATION);
|
||||
waitForTaskCountAndCleanAllocationList(this->latestFlushedTaskCount, REUSABLE_ALLOCATION);
|
||||
|
@ -92,7 +92,7 @@ class CommandStreamReceiver {
|
||||
MOCKABLE_VIRTUAL void waitForTaskCountAndCleanTemporaryAllocationList(uint32_t requiredTaskCount);
|
||||
|
||||
LinearStream &getCS(size_t minRequiredSize = 1024u);
|
||||
OSInterface *getOSInterface() const { return osInterface; };
|
||||
OSInterface *getOSInterface() const;
|
||||
ExecutionEnvironment &peekExecutionEnvironment() const { return executionEnvironment; };
|
||||
|
||||
MOCKABLE_VIRTUAL void setTagAllocation(GraphicsAllocation *allocation);
|
||||
@ -219,7 +219,6 @@ class CommandStreamReceiver {
|
||||
GraphicsAllocation *preemptionAllocation = nullptr;
|
||||
GraphicsAllocation *debugSurface = nullptr;
|
||||
GraphicsAllocation *perDssBackedBuffer = nullptr;
|
||||
OSInterface *osInterface = nullptr;
|
||||
|
||||
IndirectHeap *indirectHeap[IndirectHeap::NUM_TYPES];
|
||||
|
||||
|
@ -39,7 +39,6 @@ DrmCommandStreamReceiver<GfxFamily>::DrmCommandStreamReceiver(ExecutionEnvironme
|
||||
execObjectsStorage.reserve(512);
|
||||
|
||||
executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->osInterface->get()->setDrm(this->drm);
|
||||
CommandStreamReceiver::osInterface = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->osInterface.get();
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
|
@ -37,8 +37,7 @@ WddmCommandStreamReceiver<GfxFamily>::WddmCommandStreamReceiver(ExecutionEnviron
|
||||
: BaseClass(executionEnvironment, rootDeviceIndex) {
|
||||
|
||||
notifyAubCaptureImpl = DeviceCallbacks<GfxFamily>::notifyAubCapture;
|
||||
this->osInterface = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->osInterface.get();
|
||||
this->wddm = this->osInterface->get()->getWddm();
|
||||
this->wddm = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->osInterface->get()->getWddm();
|
||||
|
||||
PreemptionMode preemptionMode = PreemptionHelper::getDefaultPreemptionMode(peekHwInfo());
|
||||
|
||||
|
@ -7,8 +7,6 @@
|
||||
|
||||
#include "unit_tests/mocks/mock_csr.h"
|
||||
|
||||
#include "core/os_interface/os_interface.h"
|
||||
|
||||
bool MockCommandStreamReceiver::flush(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency) {
|
||||
return true;
|
||||
}
|
||||
@ -26,7 +24,3 @@ CompletionStamp MockCommandStreamReceiver::flushTask(
|
||||
CompletionStamp stamp = {taskCount, taskLevel, flushStamp->peekStamp()};
|
||||
return stamp;
|
||||
}
|
||||
|
||||
void MockCommandStreamReceiver::setOSInterface(OSInterface *osInterface) {
|
||||
this->osInterface = osInterface;
|
||||
}
|
||||
|
@ -292,8 +292,6 @@ class MockCommandStreamReceiver : public CommandStreamReceiver {
|
||||
|
||||
uint32_t blitBuffer(const BlitPropertiesContainer &blitPropertiesContainer, bool blocking) override { return taskCount; };
|
||||
|
||||
void setOSInterface(OSInterface *osInterface);
|
||||
|
||||
CommandStreamReceiverType getType() override {
|
||||
return CommandStreamReceiverType::CSR_HW;
|
||||
}
|
||||
|
@ -57,7 +57,6 @@ CommandStreamReceiver *createMockCommandStreamReceiver(bool withAubDump, Executi
|
||||
}
|
||||
|
||||
EXPECT_NE(nullptr, executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->osInterface.get());
|
||||
csr->setOSInterface(executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->osInterface.get());
|
||||
return csr;
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,6 @@ struct GlArbSyncEventTest : public ::testing::Test {
|
||||
sharing->pfnGlArbSyncObjectSignal = glArbSyncObjectSignalMockDoNothing;
|
||||
sharing->pfnGlArbSyncObjectWaitServer = glArbSyncObjectWaitServerMock<false>;
|
||||
osInterface = new OSInterface;
|
||||
mockCsr->setOSInterface(osInterface);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(osInterface);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user