mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-22 10:17:01 +08:00
Command stream receiver: use memory manager from execution environment
Change-Id: I236218a73bd7dac6e5744e3596f146b77b5ca1c8 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
97c56b9de0
commit
4f028d13a1
@@ -160,26 +160,6 @@ HWTEST_F(MockExperimentalCommandBufferTest, givenEnabledExperimentalCmdBufferWhe
|
||||
EXPECT_EQ(expectedExOffset, mockExCmdBuffer->experimentalAllocationOffset);
|
||||
}
|
||||
|
||||
HWTEST_F(MockExperimentalCommandBufferTest, givenEnabledExperimentalCmdBufferWhenMemoryManagerIsNotAvailableThenExperimentalBufferAllocationsRemainAllocated) {
|
||||
auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||
MockExperimentalCommandBuffer *mockExCmdBuffer = static_cast<MockExperimentalCommandBuffer *>(commandStreamReceiver.experimentalCmdBuffer.get());
|
||||
|
||||
EXPECT_NE(nullptr, mockExCmdBuffer->experimentalAllocation);
|
||||
EXPECT_NE(nullptr, mockExCmdBuffer->timestamps);
|
||||
|
||||
auto experimentalAllocation = mockExCmdBuffer->experimentalAllocation;
|
||||
auto timestamps = mockExCmdBuffer->timestamps;
|
||||
auto memoryManager = commandStreamReceiver.getMemoryManager();
|
||||
|
||||
//null memManager
|
||||
commandStreamReceiver.setMemoryManager(nullptr);
|
||||
//delete experimental cmd buffer and verify its allocations remain intact
|
||||
commandStreamReceiver.setExperimentalCmdBuffer(std::move(std::unique_ptr<ExperimentalCommandBuffer>(nullptr)));
|
||||
memoryManager->freeGraphicsMemory(experimentalAllocation);
|
||||
memoryManager->freeGraphicsMemory(timestamps);
|
||||
commandStreamReceiver.setMemoryManager(memoryManager);
|
||||
}
|
||||
|
||||
HWTEST_F(MockExperimentalCommandBufferTest, givenEnabledExperimentalCmdBufferWhenCsrIsFlushedTwiceThenExpectProperlyFilledExperimentalCmdBufferAndTimestampOffset) {
|
||||
using MI_BATCH_BUFFER_START = typename FamilyType::MI_BATCH_BUFFER_START;
|
||||
using MI_BATCH_BUFFER_END = typename FamilyType::MI_BATCH_BUFFER_END;
|
||||
|
||||
Reference in New Issue
Block a user