mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Allocate command buffers with proper allocation type.
Change-Id: I912dd41cf68fa16ab481bb003c4f5ae63f1f04c4
This commit is contained in:
@@ -135,7 +135,7 @@ TEST_F(CommandStreamReceiverTest, givenCommandStreamReceiverWhenGetCSIsCalledThe
|
||||
auto commandStreamAllocation = commandStream.getGraphicsAllocation();
|
||||
ASSERT_NE(nullptr, commandStreamAllocation);
|
||||
|
||||
EXPECT_EQ(GraphicsAllocation::AllocationType::LINEAR_STREAM, commandStreamAllocation->getAllocationType());
|
||||
EXPECT_EQ(GraphicsAllocation::AllocationType::COMMAND_BUFFER, commandStreamAllocation->getAllocationType());
|
||||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverTest, givenPtrAndSizeThatMeetL3CriteriaWhenMakeResidentHostPtrThenCsrEnableL3) {
|
||||
|
||||
@@ -247,9 +247,9 @@ HWTEST_F(MockExperimentalCommandBufferTest, givenEnabledExperimentalCmdBufferWhe
|
||||
MemoryManager *memoryManager = commandStreamReceiver.getMemoryManager();
|
||||
|
||||
//Make two allocations, since CSR will try to reuse it also
|
||||
auto allocation = memoryManager->allocateGraphicsMemoryWithProperties({3 * MemoryConstants::pageSize64k, GraphicsAllocation::AllocationType::LINEAR_STREAM});
|
||||
auto allocation = memoryManager->allocateGraphicsMemoryWithProperties({3 * MemoryConstants::pageSize64k, GraphicsAllocation::AllocationType::COMMAND_BUFFER});
|
||||
storage->storeAllocation(std::unique_ptr<GraphicsAllocation>(allocation), REUSABLE_ALLOCATION);
|
||||
allocation = memoryManager->allocateGraphicsMemoryWithProperties({3 * MemoryConstants::pageSize64k, GraphicsAllocation::AllocationType::LINEAR_STREAM});
|
||||
allocation = memoryManager->allocateGraphicsMemoryWithProperties({3 * MemoryConstants::pageSize64k, GraphicsAllocation::AllocationType::COMMAND_BUFFER});
|
||||
storage->storeAllocation(std::unique_ptr<GraphicsAllocation>(allocation), REUSABLE_ALLOCATION);
|
||||
|
||||
MockExperimentalCommandBuffer *mockExCmdBuffer = static_cast<MockExperimentalCommandBuffer *>(commandStreamReceiver.experimentalCmdBuffer.get());
|
||||
|
||||
Reference in New Issue
Block a user