mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 12:23:05 +08:00
Dont call virtual method in CSR destructor
Change-Id: Idccea2ad8f5bc6ff9933e4f9f1f0549db5ce6a99 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
3ff5deaae9
commit
211ba8adcb
@@ -148,10 +148,10 @@ void CommandQueue::waitUntilComplete(uint32_t taskCountToWait, FlushStamp flushS
|
||||
|
||||
if (auto bcsCsr = getBcsCommandStreamReceiver()) {
|
||||
bcsCsr->waitForTaskCountWithKmdNotifyFallback(bcsTaskCount, 0, false, false);
|
||||
bcsCsr->waitForTaskCountAndCleanAllocationList(bcsTaskCount, TEMPORARY_ALLOCATION);
|
||||
bcsCsr->waitForTaskCountAndCleanTemporaryAllocationList(bcsTaskCount);
|
||||
}
|
||||
|
||||
getGpgpuCommandStreamReceiver().waitForTaskCountAndCleanAllocationList(taskCountToWait, TEMPORARY_ALLOCATION);
|
||||
getGpgpuCommandStreamReceiver().waitForTaskCountAndCleanTemporaryAllocationList(taskCountToWait);
|
||||
|
||||
WAIT_LEAVE()
|
||||
}
|
||||
|
||||
@@ -116,6 +116,10 @@ void CommandStreamReceiver::waitForTaskCountAndCleanAllocationList(uint32_t requ
|
||||
internalAllocationStorage->cleanAllocationList(requiredTaskCount, allocationUsage);
|
||||
}
|
||||
|
||||
void CommandStreamReceiver::waitForTaskCountAndCleanTemporaryAllocationList(uint32_t requiredTaskCount) {
|
||||
waitForTaskCountAndCleanAllocationList(requiredTaskCount, TEMPORARY_ALLOCATION);
|
||||
};
|
||||
|
||||
void CommandStreamReceiver::ensureCommandBufferAllocation(LinearStream &commandStream, size_t minimumRequiredSize, size_t additionalAllocationSize) {
|
||||
if (commandStream.getAvailableSpace() >= minimumRequiredSize) {
|
||||
return;
|
||||
|
||||
@@ -88,7 +88,8 @@ class CommandStreamReceiver {
|
||||
|
||||
virtual GmmPageTableMngr *createPageTableManager() { return nullptr; }
|
||||
|
||||
MOCKABLE_VIRTUAL void waitForTaskCountAndCleanAllocationList(uint32_t requiredTaskCount, uint32_t allocationUsage);
|
||||
void waitForTaskCountAndCleanAllocationList(uint32_t requiredTaskCount, uint32_t allocationUsage);
|
||||
MOCKABLE_VIRTUAL void waitForTaskCountAndCleanTemporaryAllocationList(uint32_t requiredTaskCount);
|
||||
|
||||
LinearStream &getCS(size_t minRequiredSize = 1024u);
|
||||
OSInterface *getOSInterface() const { return osInterface; };
|
||||
|
||||
@@ -687,7 +687,7 @@ struct BcsBufferTests : public ::testing::Test {
|
||||
waitForTaskCountWithKmdNotifyFallbackCalled++;
|
||||
}
|
||||
|
||||
void waitForTaskCountAndCleanAllocationList(uint32_t requiredTaskCount, uint32_t allocationUsage) override {
|
||||
void waitForTaskCountAndCleanTemporaryAllocationList(uint32_t requiredTaskCount) override {
|
||||
EXPECT_EQ(1u, waitForTaskCountWithKmdNotifyFallbackCalled);
|
||||
EXPECT_EQ(this->latestFlushedTaskCount, requiredTaskCount);
|
||||
waitForTaskCountAndCleanAllocationListCalled++;
|
||||
|
||||
@@ -78,17 +78,11 @@ class MockCsrBase : public UltCommandStreamReceiver<GfxFamily> {
|
||||
processEvictionCalled = true;
|
||||
}
|
||||
|
||||
void waitForTaskCountAndCleanAllocationList(uint32_t requiredTaskCount, uint32_t allocationUsage) override {
|
||||
waitForTaskCountRequiredTaskCount = requiredTaskCount;
|
||||
BaseUltCsrClass::waitForTaskCountAndCleanAllocationList(requiredTaskCount, allocationUsage);
|
||||
}
|
||||
|
||||
ResidencyContainer madeResidentGfxAllocations;
|
||||
ResidencyContainer madeNonResidentGfxAllocations;
|
||||
int32_t *executionStamp;
|
||||
int32_t flushTaskStamp;
|
||||
bool processEvictionCalled = false;
|
||||
uint32_t waitForTaskCountRequiredTaskCount = 0;
|
||||
};
|
||||
|
||||
template <typename GfxFamily>
|
||||
|
||||
Reference in New Issue
Block a user