Add helper for encoding memory prefetch

Change-Id: I481ec11b66ad392ba9748bb5bbb6fd0ad3ce7f12
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2020-04-03 17:38:09 +02:00
parent 62a87f644c
commit 32e1b7d1a7
7 changed files with 26 additions and 0 deletions

View File

@@ -55,3 +55,13 @@ HWTEST_F(CommandEncoderTests, givenImmDataWriteWhenProgrammingMiFlushDwThenSetAl
EXPECT_EQ(gpuAddress, miFlushDwCmd->getDestinationAddress());
EXPECT_EQ(immData, miFlushDwCmd->getImmediateData());
}
HWTEST_F(CommandEncoderTests, whenEncodeMemoryPrefetchCalledThenDoNothing) {
uint8_t buffer[MemoryConstants::pageSize] = {};
LinearStream linearStream(buffer, sizeof(buffer));
EncodeMemoryPrefetch<FamilyType>::programMemoryPrefetch(linearStream, 1, 2);
EXPECT_EQ(0u, linearStream.getUsed());
EXPECT_EQ(0u, EncodeMemoryPrefetch<FamilyType>::getSizeForMemoryPrefetch());
}