diff --git a/shared/source/command_container/command_encoder.h b/shared/source/command_container/command_encoder.h index 4f6446d932..986b321645 100644 --- a/shared/source/command_container/command_encoder.h +++ b/shared/source/command_container/command_encoder.h @@ -233,7 +233,7 @@ struct EncodeMiFlushDW { template 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 diff --git a/shared/source/command_container/command_encoder.inl b/shared/source/command_container/command_encoder.inl index 7b7542fcd2..76f501fa49 100644 --- a/shared/source/command_container/command_encoder.inl +++ b/shared/source/command_container/command_encoder.inl @@ -412,7 +412,7 @@ size_t EncodeMiFlushDW::getMiFlushDwCmdSizeForDataWrite() { } template -void EncodeMemoryPrefetch::programMemoryPrefetch(LinearStream &commandStream, uint64_t gpuVa, uint32_t size) {} +void EncodeMemoryPrefetch::programMemoryPrefetch(LinearStream &commandStream, const GraphicsAllocation &graphicsAllocation, uint32_t size) {} template size_t EncodeMemoryPrefetch::getSizeForMemoryPrefetch() { return 0; } diff --git a/shared/test/unit_test/command_container/command_encoder_tests.cpp b/shared/test/unit_test/command_container/command_encoder_tests.cpp index b0c11f8993..f86bbefe64 100644 --- a/shared/test/unit_test/command_container/command_encoder_tests.cpp +++ b/shared/test/unit_test/command_container/command_encoder_tests.cpp @@ -60,7 +60,9 @@ HWTEST_F(CommandEncoderTests, whenEncodeMemoryPrefetchCalledThenDoNothing) { uint8_t buffer[MemoryConstants::pageSize] = {}; LinearStream linearStream(buffer, sizeof(buffer)); - EncodeMemoryPrefetch::programMemoryPrefetch(linearStream, 1, 2); + GraphicsAllocation allocation(0, GraphicsAllocation::AllocationType::UNKNOWN, nullptr, 123, 456, 789, MemoryPool::LocalMemory); + + EncodeMemoryPrefetch::programMemoryPrefetch(linearStream, allocation, 2); EXPECT_EQ(0u, linearStream.getUsed()); EXPECT_EQ(0u, EncodeMemoryPrefetch::getSizeForMemoryPrefetch());