mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
test: cmd buffer prealloc without flag test
Add missing test with debug flag SetAmountOfReusableAllocationsPerCmdQueue unset. Related-To: NEO-8152 Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
fad9ad729d
commit
87a1fda1a7
@@ -173,6 +173,19 @@ HWTEST_F(CommandStreamReceiverTest, givenFlagDisabledWhenCallFillReusableAllocat
|
||||
EXPECT_EQ(0u, commandStreamReceiver->getResidencyAllocations().size());
|
||||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverTest, givenUnsetPreallocationsPerQueueWhenRequestPreallocationCalledThenDoNotAllocateCommandBuffer) {
|
||||
EXPECT_TRUE(commandStreamReceiver->getAllocationsForReuse().peekIsEmpty());
|
||||
EXPECT_EQ(0u, commandStreamReceiver->getResidencyAllocations().size());
|
||||
|
||||
commandStreamReceiver->requestPreallocation();
|
||||
EXPECT_TRUE(commandStreamReceiver->getAllocationsForReuse().peekIsEmpty());
|
||||
EXPECT_EQ(0u, commandStreamReceiver->getResidencyAllocations().size());
|
||||
|
||||
commandStreamReceiver->releasePreallocationRequest();
|
||||
EXPECT_TRUE(commandStreamReceiver->getAllocationsForReuse().peekIsEmpty());
|
||||
EXPECT_EQ(0u, commandStreamReceiver->getResidencyAllocations().size());
|
||||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverTest, givenPreallocationsPerQueueEqualZeroWhenRequestPreallocationCalledThenDoNotAllocateCommandBuffer) {
|
||||
DebugManagerStateRestore restorer;
|
||||
DebugManager.flags.SetAmountOfReusableAllocationsPerCmdQueue.set(0);
|
||||
|
||||
Reference in New Issue
Block a user