mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-10 07:08:04 +08:00
KM DAF AubCapture to recapture fill pattern allocations
The commit introduces a recapture of fill pattern allocations on every submit. Change-Id: I634af075348dbc59c7809f58b8495326cab804e1
This commit is contained in:
@@ -389,6 +389,28 @@ TEST_F(WddmCommandStreamTest, givenWddmWithKmDafEnabledWhenFlushIsCalledWithAllo
|
||||
memManager->freeGraphicsMemory(linearStreamAllocation);
|
||||
}
|
||||
|
||||
TEST_F(WddmCommandStreamTest, givenWddmWithKmDafEnabledWhenFlushIsCalledWithAllocationsForResidencyThenFillPatternAllocationsShouldBeKmDafLocked) {
|
||||
GraphicsAllocation *commandBuffer = memManager->allocateGraphicsMemory(4096, 4096);
|
||||
ASSERT_NE(nullptr, commandBuffer);
|
||||
LinearStream cs(commandBuffer);
|
||||
BatchBuffer batchBuffer{cs.getGraphicsAllocation(), 0, 0, nullptr, false, false, QueueThrottle::MEDIUM, cs.getUsed(), &cs};
|
||||
|
||||
auto fillPatternAllocation = memManager->allocateGraphicsMemory(sizeof(uint32_t), sizeof(uint32_t), false, false);
|
||||
ASSERT_NE(nullptr, fillPatternAllocation);
|
||||
fillPatternAllocation->setAllocationType(GraphicsAllocation::ALLOCATION_TYPE_FILL_PATTERN);
|
||||
ResidencyContainer allocationsForResidency = {fillPatternAllocation};
|
||||
|
||||
wddm->setKmDafEnabled(true);
|
||||
auto flushStamp = csr->flush(batchBuffer, EngineType::ENGINE_RCS, &allocationsForResidency);
|
||||
|
||||
EXPECT_EQ(1u, wddm->kmDafLockResult.called);
|
||||
EXPECT_EQ(1u, wddm->kmDafLockResult.lockedAllocations.size());
|
||||
EXPECT_EQ(fillPatternAllocation, wddm->kmDafLockResult.lockedAllocations[0]);
|
||||
|
||||
memManager->freeGraphicsMemory(commandBuffer);
|
||||
memManager->freeGraphicsMemory(fillPatternAllocation);
|
||||
}
|
||||
|
||||
TEST_F(WddmCommandStreamTest, givenWddmWithKmDafEnabledWhenFlushIsCalledWithAllocationsForResidencyThenNonLinearStreamAllocationShouldNotBeKmDafLocked) {
|
||||
GraphicsAllocation *commandBuffer = memManager->allocateGraphicsMemory(4096, 4096);
|
||||
ASSERT_NE(nullptr, commandBuffer);
|
||||
|
||||
Reference in New Issue
Block a user