fix command stream receiver: stop calling virtual methods in dtor

make getCompletionAddress and getCompletionValue non-virtual methods

Related-To: NEO-6643
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2022-04-20 11:26:46 +00:00
committed by Compute-Runtime-Automation
parent 4cb46ee15c
commit 8f38f4ee3c
5 changed files with 30 additions and 32 deletions

View File

@@ -842,4 +842,9 @@ const RootDeviceEnvironment &CommandStreamReceiver::peekRootDeviceEnvironment()
return *executionEnvironment.rootDeviceEnvironments[rootDeviceIndex];
}
uint32_t CommandStreamReceiver::getCompletionValue(const GraphicsAllocation &gfxAllocation) {
auto osContextId = osContext->getContextId();
return gfxAllocation.getTaskCount(osContextId);
}
} // namespace NEO

View File

@@ -321,13 +321,16 @@ class CommandStreamReceiver {
MOCKABLE_VIRTUAL bool isGpuHangDetected() const;
virtual uint64_t getCompletionAddress() {
return 0;
uint64_t getCompletionAddress() {
uint64_t completionFenceAddress = castToUint64(const_cast<uint32_t *>(getTagAddress()));
if (completionFenceAddress == 0) {
return 0;
}
completionFenceAddress += completionFenceOffset;
return completionFenceAddress;
}
virtual uint32_t getCompletionValue(const GraphicsAllocation &gfxAllocation) {
return 0;
}
uint32_t getCompletionValue(const GraphicsAllocation &gfxAllocation);
protected:
void cleanupResources();
@@ -406,6 +409,7 @@ class CommandStreamReceiver {
uint32_t activePartitions = 1;
uint32_t activePartitionsConfig = 1;
uint32_t postSyncWriteOffset = 0;
uint32_t completionFenceOffset = 0;
const uint32_t rootDeviceIndex;
const DeviceBitfield deviceBitfield;