Refactor UltCommandStreamReceiverTest test

- remove unnecessary dynamic allocations

Change-Id: I2580244c91fd3f6864c55807090823556b4c7906
This commit is contained in:
Hoppe, Mateusz
2018-12-05 07:11:43 +01:00
parent 1bf98c7f80
commit 13f23dffdb

View File

@@ -68,16 +68,14 @@ HWCMDTEST_F(IGFX_GEN8_CORE, UltCommandStreamReceiverTest, givenNotSentStateSipWh
DispatchFlags dispatchFlags;
dispatchFlags.preemptionMode = PreemptionMode::MidThread;
void *buffer = alignedMalloc(MemoryConstants::pageSize, MemoryConstants::pageSize64k);
std::unique_ptr<MockGraphicsAllocation> allocation(new MockGraphicsAllocation(buffer, MemoryConstants::pageSize));
std::unique_ptr<IndirectHeap> heap(new IndirectHeap(allocation.get()));
MockGraphicsAllocation allocation(nullptr, 0);
IndirectHeap heap(&allocation);
csr.flushTask(commandStream,
0,
*heap.get(),
*heap.get(),
*heap.get(),
heap,
heap,
heap,
0,
dispatchFlags,
*mockDevice);
@@ -89,8 +87,6 @@ HWCMDTEST_F(IGFX_GEN8_CORE, UltCommandStreamReceiverTest, givenNotSentStateSipWh
auto stateSipItor = find<STATE_SIP *>(hwParser.cmdList.begin(), hwParser.cmdList.end());
EXPECT_NE(hwParser.cmdList.end(), stateSipItor);
alignedFree(buffer);
}
}