Add wait on timestamp mechanism

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2021-11-17 15:05:48 +00:00
committed by Compute-Runtime-Automation
parent 59bcfc30a5
commit 36efe72e3e
15 changed files with 242 additions and 13 deletions

View File

@@ -138,6 +138,37 @@ TEST(CommandQueue, WhenConstructingCommandQueueThenQueueFamilyIsNotSelected) {
EXPECT_FALSE(cmdQ.isQueueFamilySelected());
}
TEST(CommandQueue, givenEnableTimestampWaitWhenCheckIsTimestampWaitEnabledThenReturnProperValue) {
DebugManagerStateRestore restorer;
auto mockDevice = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
MockCommandQueue cmdQ(nullptr, mockDevice.get(), 0, false);
{
DebugManager.flags.EnableTimestampWait.set(0);
EXPECT_FALSE(cmdQ.isTimestampWaitEnabled());
}
{
DebugManager.flags.EnableTimestampWait.set(1);
EXPECT_EQ(cmdQ.isTimestampWaitEnabled(), cmdQ.getGpgpuCommandStreamReceiver().isUpdateTagFromWaitEnabled());
}
{
DebugManager.flags.EnableTimestampWait.set(2);
EXPECT_EQ(cmdQ.isTimestampWaitEnabled(), cmdQ.getGpgpuCommandStreamReceiver().isDirectSubmissionEnabled());
}
{
DebugManager.flags.EnableTimestampWait.set(3);
EXPECT_EQ(cmdQ.isTimestampWaitEnabled(), cmdQ.getGpgpuCommandStreamReceiver().isAnyDirectSubmissionEnabled());
}
{
DebugManager.flags.EnableTimestampWait.set(4);
EXPECT_TRUE(cmdQ.isTimestampWaitEnabled());
}
}
struct GetTagTest : public ClDeviceFixture,
public CommandQueueFixture,
public CommandStreamFixture,