Don't access virtual method if not needed

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
Szymon Morek
2022-11-25 10:44:10 +00:00
committed by Compute-Runtime-Automation
parent 8ac794db04
commit 4598fc61e2
5 changed files with 46 additions and 11 deletions

View File

@@ -354,6 +354,10 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw<GfxFamily>, publ
BaseClass::ensureCommandBufferAllocation(commandStream, minimumRequiredSize, additionalAllocationSize);
}
CommandStreamReceiverType getType() override {
return commandStreamReceiverType;
}
std::vector<std::string> aubCommentMessages;
BatchBuffer latestFlushedBatchBuffer = {};
@@ -398,6 +402,7 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw<GfxFamily>, publ
bool callBaseFlushBcsTask{true};
uint32_t flushBcsTaskReturnValue{};
std::optional<SubmissionStatus> flushReturnValue{};
CommandStreamReceiverType commandStreamReceiverType = CommandStreamReceiverType::CSR_HW;
};
} // namespace NEO

View File

@@ -122,7 +122,7 @@ class MockCommandStreamReceiver : public CommandStreamReceiver {
uint32_t flushBcsTask(const BlitPropertiesContainer &blitPropertiesContainer, bool blocking, bool profilingEnabled, Device &device) override { return taskCount; };
CommandStreamReceiverType getType() override {
return CommandStreamReceiverType::CSR_HW;
return commandStreamReceiverType;
}
void downloadAllocations() override {
@@ -193,6 +193,7 @@ class MockCommandStreamReceiver : public CommandStreamReceiver {
std::optional<bool> isGpuHangDetectedReturnValue{};
std::optional<bool> testTaskCountReadyReturnValue{};
WaitStatus waitForCompletionWithTimeoutReturnValue{WaitStatus::Ready};
CommandStreamReceiverType commandStreamReceiverType = CommandStreamReceiverType::CSR_HW;
};
class MockCommandStreamReceiverWithFailingSubmitBatch : public MockCommandStreamReceiver {