mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 07:14:10 +08:00
Fix completion check for TimestampPacketStorage
Change-Id: If15d2bbc49a1dc2dfb29e3b6cdc3ad1523997cd5 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
8784491abe
commit
b1fbced81f
@@ -214,6 +214,25 @@ TEST_F(TimestampPacketSimpleTests, whenIsCompletedIsCalledThenItReturnsProperTim
|
||||
EXPECT_TRUE(timestampPacketStorage.isCompleted());
|
||||
}
|
||||
|
||||
TEST_F(TimestampPacketSimpleTests, givenMultiplePacketsInUseWhenCompletionIsCheckedTheVerifyAllUsedNodes) {
|
||||
TimestampPacketStorage timestampPacketStorage;
|
||||
auto &packets = timestampPacketStorage.packets;
|
||||
|
||||
timestampPacketStorage.packetsUsed = TimestampPacketSizeControl::preferredPacketCount - 1;
|
||||
|
||||
for (uint32_t i = 0; i < timestampPacketStorage.packetsUsed - 1; i++) {
|
||||
packets[i].contextEnd = 0;
|
||||
packets[i].globalEnd = 0;
|
||||
EXPECT_FALSE(timestampPacketStorage.isCompleted());
|
||||
}
|
||||
|
||||
packets[timestampPacketStorage.packetsUsed - 1].contextEnd = 0;
|
||||
EXPECT_FALSE(timestampPacketStorage.isCompleted());
|
||||
|
||||
packets[timestampPacketStorage.packetsUsed - 1].globalEnd = 0;
|
||||
EXPECT_TRUE(timestampPacketStorage.isCompleted());
|
||||
}
|
||||
|
||||
TEST_F(TimestampPacketSimpleTests, givenImplicitDependencyWhenEndTagIsWrittenThenCantBeReleased) {
|
||||
TimestampPacketStorage timestampPacketStorage;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user