Files
compute-runtime/shared/test/common/fixtures/command_stream_receiver_fixture.cpp
Warchulski, Jaroslaw c275008e51 Cleanup includes 32
Cleaned up files:
level_zero/core/source/cmdlist/cmdlist_hw.h
level_zero/core/source/cmdqueue/cmdqueue.h
level_zero/core/source/event/event.h
opencl/source/helpers/get_info_status_mapper.h
opencl/source/helpers/hardware_commands_helper.h
shared/source/helpers/per_thread_data.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-16 20:41:37 +01:00

46 lines
1.5 KiB
C++

/*
* Copyright (C) 2022-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/test/common/fixtures/command_stream_receiver_fixture.h"
#include "shared/source/command_stream/preemption.h"
#include "shared/test/common/mocks/mock_device.h"
#include "shared/test/common/mocks/mock_graphics_allocation.h"
using namespace NEO;
void CommandStreamReceiverFixture::setUp() {
DeviceFixture::setUp();
commandStream.replaceBuffer(cmdBuffer, bufferSize);
auto graphicsAllocation = new MockGraphicsAllocation(cmdBuffer, bufferSize);
commandStream.replaceGraphicsAllocation(graphicsAllocation);
dsh.replaceBuffer(dshBuffer, bufferSize);
graphicsAllocation = new MockGraphicsAllocation(dshBuffer, bufferSize);
dsh.replaceGraphicsAllocation(graphicsAllocation);
ioh.replaceBuffer(iohBuffer, bufferSize);
graphicsAllocation = new MockGraphicsAllocation(iohBuffer, bufferSize);
ioh.replaceGraphicsAllocation(graphicsAllocation);
ssh.replaceBuffer(sshBuffer, bufferSize);
graphicsAllocation = new MockGraphicsAllocation(sshBuffer, bufferSize);
ssh.replaceGraphicsAllocation(graphicsAllocation);
flushTaskFlags.preemptionMode = PreemptionHelper::getDefaultPreemptionMode(pDevice->getHardwareInfo());
}
void CommandStreamReceiverFixture::tearDown() {
DeviceFixture::tearDown();
delete dsh.getGraphicsAllocation();
delete ioh.getGraphicsAllocation();
delete ssh.getGraphicsAllocation();
delete commandStream.getGraphicsAllocation();
}