mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Refactor getTimestampPacketAllocator method
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
7d64d8e00e
commit
4a2a14fd41
@ -75,6 +75,19 @@ HWTEST_F(CommandStreamReceiverTest, WhenCreatingCsrThenDefaultValuesAreSet) {
|
||||
EXPECT_FALSE(csr.isPreambleSent);
|
||||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverTest, WhenCreatingCsrThenTimestampTypeIs32b) {
|
||||
using ExpectedType = TimestampPackets<typename FamilyType::TimestampPacketType>;
|
||||
|
||||
auto &csr = pDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||
|
||||
auto allocator = csr.getTimestampPacketAllocator();
|
||||
auto tag = allocator->getTag();
|
||||
|
||||
auto expectedOffset = sizeof(typename FamilyType::TimestampPacketType) * 4 * static_cast<size_t>(TimestampPacketSizeControl::preferredPacketCount);
|
||||
|
||||
EXPECT_EQ(expectedOffset, tag->getImplicitGpuDependenciesCountOffset());
|
||||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverTest, WhenCreatingCsrThenFlagsAreSetCorrectly) {
|
||||
auto &csr = pDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||
csr.initProgrammingFlags();
|
||||
|
Reference in New Issue
Block a user