Update interface for memory prefetch

Change-Id: I1dfbbd93b97dae100de489319dcfd7d19fe1fc65
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski 2020-04-08 17:44:12 +02:00 committed by sys_ocldev
parent 42bf1d7e61
commit 3ce0450a9c
3 changed files with 5 additions and 3 deletions

View File

@ -233,7 +233,7 @@ struct EncodeMiFlushDW {
template <typename GfxFamily>
struct EncodeMemoryPrefetch {
static void programMemoryPrefetch(LinearStream &commandStream, uint64_t gpuVa, uint32_t size);
static void programMemoryPrefetch(LinearStream &commandStream, const GraphicsAllocation &graphicsAllocation, uint32_t size);
static size_t getSizeForMemoryPrefetch();
};
} // namespace NEO

View File

@ -412,7 +412,7 @@ size_t EncodeMiFlushDW<GfxFamily>::getMiFlushDwCmdSizeForDataWrite() {
}
template <typename GfxFamily>
void EncodeMemoryPrefetch<GfxFamily>::programMemoryPrefetch(LinearStream &commandStream, uint64_t gpuVa, uint32_t size) {}
void EncodeMemoryPrefetch<GfxFamily>::programMemoryPrefetch(LinearStream &commandStream, const GraphicsAllocation &graphicsAllocation, uint32_t size) {}
template <typename GfxFamily>
size_t EncodeMemoryPrefetch<GfxFamily>::getSizeForMemoryPrefetch() { return 0; }

View File

@ -60,7 +60,9 @@ HWTEST_F(CommandEncoderTests, whenEncodeMemoryPrefetchCalledThenDoNothing) {
uint8_t buffer[MemoryConstants::pageSize] = {};
LinearStream linearStream(buffer, sizeof(buffer));
EncodeMemoryPrefetch<FamilyType>::programMemoryPrefetch(linearStream, 1, 2);
GraphicsAllocation allocation(0, GraphicsAllocation::AllocationType::UNKNOWN, nullptr, 123, 456, 789, MemoryPool::LocalMemory);
EncodeMemoryPrefetch<FamilyType>::programMemoryPrefetch(linearStream, allocation, 2);
EXPECT_EQ(0u, linearStream.getUsed());
EXPECT_EQ(0u, EncodeMemoryPrefetch<FamilyType>::getSizeForMemoryPrefetch());