mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 21:42:53 +08:00
Allocate command buffers with proper allocation type.
Change-Id: I912dd41cf68fa16ab481bb003c4f5ae63f1f04c4
This commit is contained in:
@@ -332,7 +332,7 @@ TEST_F(CommandQueueCommandStreamTest, givenCommandStreamReceiverWithReusableAllo
|
||||
|
||||
auto memoryManager = pDevice->getMemoryManager();
|
||||
size_t requiredSize = alignUp(100 + CSRequirements::minCommandQueueCommandStreamSize + CSRequirements::csOverfetchSize, MemoryConstants::pageSize64k);
|
||||
auto allocation = memoryManager->allocateGraphicsMemoryWithProperties({requiredSize, GraphicsAllocation::AllocationType::LINEAR_STREAM});
|
||||
auto allocation = memoryManager->allocateGraphicsMemoryWithProperties({requiredSize, GraphicsAllocation::AllocationType::COMMAND_BUFFER});
|
||||
auto &commandStreamReceiver = cmdQ.getCommandStreamReceiver();
|
||||
commandStreamReceiver.getInternalAllocationStorage()->storeAllocation(std::unique_ptr<GraphicsAllocation>(allocation), REUSABLE_ALLOCATION);
|
||||
|
||||
@@ -376,7 +376,7 @@ TEST_F(CommandQueueCommandStreamTest, CommandQueueWhenAskedForNewCommandStreamSt
|
||||
EXPECT_TRUE(pDevice->getDefaultEngine().commandStreamReceiver->getAllocationsForReuse().peekContains(*graphicsAllocation));
|
||||
}
|
||||
|
||||
TEST_F(CommandQueueCommandStreamTest, givenCommandQueueWhenGetCSIsCalledThenCommandStreamAllocationTypeShouldBeSetToLinearStream) {
|
||||
TEST_F(CommandQueueCommandStreamTest, givenCommandQueueWhenGetCSIsCalledThenCommandStreamAllocationTypeShouldBeSetToCommandBuffer) {
|
||||
const cl_queue_properties props[3] = {CL_QUEUE_PROPERTIES, 0, 0};
|
||||
CommandQueue cmdQ(context.get(), pDevice, props);
|
||||
|
||||
@@ -384,7 +384,7 @@ TEST_F(CommandQueueCommandStreamTest, givenCommandQueueWhenGetCSIsCalledThenComm
|
||||
auto commandStreamAllocation = commandStream.getGraphicsAllocation();
|
||||
ASSERT_NE(nullptr, commandStreamAllocation);
|
||||
|
||||
EXPECT_EQ(GraphicsAllocation::AllocationType::LINEAR_STREAM, commandStreamAllocation->getAllocationType());
|
||||
EXPECT_EQ(GraphicsAllocation::AllocationType::COMMAND_BUFFER, commandStreamAllocation->getAllocationType());
|
||||
}
|
||||
|
||||
struct CommandQueueIndirectHeapTest : public CommandQueueMemoryDevice,
|
||||
|
||||
Reference in New Issue
Block a user