diff --git a/runtime/command_stream/tbx_command_stream_receiver_hw.inl b/runtime/command_stream/tbx_command_stream_receiver_hw.inl index d84bacd058..e863f4a4bb 100644 --- a/runtime/command_stream/tbx_command_stream_receiver_hw.inl +++ b/runtime/command_stream/tbx_command_stream_receiver_hw.inl @@ -404,7 +404,8 @@ void TbxCommandStreamReceiverHw::processResidency(ResidencyContainer template void TbxCommandStreamReceiverHw::makeCoherent(GraphicsAllocation &gfxAllocation) { if (hardwareContext) { - hardwareContext->readMemory(gfxAllocation.getGpuAddress(), gfxAllocation.getUnderlyingBuffer(), gfxAllocation.getUnderlyingBufferSize()); + hardwareContext->readMemory(gfxAllocation.getGpuAddress(), gfxAllocation.getUnderlyingBuffer(), gfxAllocation.getUnderlyingBufferSize(), + this->getMemoryBank(&gfxAllocation), MemoryConstants::pageSize64k); return; } diff --git a/third_party/aub_stream/headers/hardware_context.h b/third_party/aub_stream/headers/hardware_context.h index c23f473374..ee3e0067fb 100644 --- a/third_party/aub_stream/headers/hardware_context.h +++ b/third_party/aub_stream/headers/hardware_context.h @@ -18,7 +18,7 @@ struct HardwareContext { virtual void writeMemory(uint64_t gfxAddress, const void *memory, size_t size, uint32_t memoryBanks, int hint, size_t pageSize) = 0; virtual void freeMemory(uint64_t gfxAddress, size_t size) = 0; virtual void expectMemory(uint64_t gfxAddress, const void *memory, size_t size, uint32_t compareOperation) = 0; - virtual void readMemory(uint64_t gfxAddress, void *memory, size_t size) = 0; + virtual void readMemory(uint64_t gfxAddress, void *memory, size_t size, uint32_t memoryBanks, size_t pageSize) = 0; virtual void dumpBufferBIN(uint64_t gfxAddress, size_t size) = 0; virtual ~HardwareContext() = default; }; diff --git a/unit_tests/mocks/mock_aub_manager.h b/unit_tests/mocks/mock_aub_manager.h index 8391f04f2c..b867c22e5a 100644 --- a/unit_tests/mocks/mock_aub_manager.h +++ b/unit_tests/mocks/mock_aub_manager.h @@ -19,7 +19,7 @@ struct MockHardwareContext : public aub_stream::HardwareContext { void writeMemory(uint64_t gfxAddress, const void *memory, size_t size, uint32_t memoryBanks, int hint, size_t pageSize = 65536) override { writeMemoryCalled = true; } void freeMemory(uint64_t gfxAddress, size_t size) override { freeMemoryCalled = true; } void expectMemory(uint64_t gfxAddress, const void *memory, size_t size, uint32_t compareOperation) override { expectMemoryCalled = true; } - void readMemory(uint64_t gfxAddress, void *memory, size_t size) override { readMemoryCalled = true; }; + void readMemory(uint64_t gfxAddress, void *memory, size_t size, uint32_t memoryBank, size_t pageSize) override { readMemoryCalled = true; }; void dumpBufferBIN(uint64_t gfxAddress, size_t size) override { dumpBufferBINCalled = true; }; bool initializeCalled = false;