Skip to content

Commit

Permalink
Decouple aub stream memoryFree from makeNonResident
Browse files Browse the repository at this point in the history
Change-Id: Ic4614441aff131356ce3ec03330d7dc42b5b0ecb
  • Loading branch information
smilczar committed Nov 29, 2018
1 parent 0131e66 commit 80fa9d0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
3 changes: 0 additions & 3 deletions runtime/command_stream/aub_command_stream_receiver_hw.inl
Original file line number Diff line number Diff line change
Expand Up @@ -769,9 +769,6 @@ void AUBCommandStreamReceiverHw<GfxFamily>::processResidency(ResidencyContainer
template <typename GfxFamily>
void AUBCommandStreamReceiverHw<GfxFamily>::makeNonResident(GraphicsAllocation &gfxAllocation) {
if (gfxAllocation.isResident(this->deviceIndex)) {
if (hardwareContext) {
hardwareContext->freeMemory(gfxAllocation.getGpuAddress(), gfxAllocation.getUnderlyingBufferSize());
}
this->getEvictionAllocations().push_back(&gfxAllocation);
gfxAllocation.resetResidencyTaskCount(this->deviceIndex);
}
Expand Down
2 changes: 0 additions & 2 deletions unit_tests/command_stream/aub_file_stream_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,8 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenMakeResidentIsCall
MockGraphicsAllocation allocation(reinterpret_cast<void *>(0x1000), 0x1000);
ResidencyContainer allocationsForResidency = {&allocation};
aubCsr->processResidency(allocationsForResidency);
aubCsr->makeNonResident(allocation);

EXPECT_TRUE(mockHardwareContext->writeMemoryCalled);
EXPECT_TRUE(mockHardwareContext->freeMemoryCalled);
}

HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenFlushIsCalledThenFileStreamShouldBeFlushed) {
Expand Down

0 comments on commit 80fa9d0

Please sign in to comment.