2017-12-21 07:45:38 +08:00
|
|
|
/*
|
2021-05-17 02:51:16 +08:00
|
|
|
* Copyright (C) 2018-2021 Intel Corporation
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
2018-09-18 15:11:08 +08:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2020-03-03 18:59:49 +08:00
|
|
|
#include "shared/source/command_stream/device_command_stream.h"
|
2021-01-21 20:10:13 +08:00
|
|
|
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
2020-03-03 18:59:49 +08:00
|
|
|
|
2020-02-23 05:50:57 +08:00
|
|
|
#include "opencl/source/command_stream/command_stream_receiver_with_aub_dump.h"
|
|
|
|
#include "opencl/source/os_interface/linux/drm_command_stream.h"
|
2019-02-27 18:39:32 +08:00
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2017-12-21 07:45:38 +08:00
|
|
|
|
|
|
|
template <typename GfxFamily>
|
2020-10-29 22:33:35 +08:00
|
|
|
CommandStreamReceiver *DeviceCommandStreamReceiver<GfxFamily>::create(bool withAubDump,
|
|
|
|
ExecutionEnvironment &executionEnvironment,
|
|
|
|
uint32_t rootDeviceIndex,
|
|
|
|
const DeviceBitfield deviceBitfield) {
|
2018-01-19 17:00:51 +08:00
|
|
|
if (withAubDump) {
|
2020-10-29 22:33:35 +08:00
|
|
|
return new CommandStreamReceiverWithAUBDump<DrmCommandStreamReceiver<GfxFamily>>("aubfile",
|
|
|
|
executionEnvironment,
|
|
|
|
rootDeviceIndex,
|
|
|
|
deviceBitfield);
|
2018-01-19 17:00:51 +08:00
|
|
|
} else {
|
2021-02-19 20:05:32 +08:00
|
|
|
auto gemMode = gemCloseWorkerMode::gemCloseWorkerActive;
|
|
|
|
|
|
|
|
if (DebugManager.flags.EnableDirectSubmission.get() == 1) {
|
|
|
|
gemMode = gemCloseWorkerMode::gemCloseWorkerInactive;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (DebugManager.flags.EnableGemCloseWorker.get() != -1) {
|
|
|
|
gemMode = DebugManager.flags.EnableGemCloseWorker.get() ? gemCloseWorkerMode::gemCloseWorkerActive : gemCloseWorkerMode::gemCloseWorkerInactive;
|
|
|
|
}
|
|
|
|
|
2020-10-29 22:33:35 +08:00
|
|
|
return new DrmCommandStreamReceiver<GfxFamily>(executionEnvironment,
|
|
|
|
rootDeviceIndex,
|
|
|
|
deviceBitfield,
|
|
|
|
gemMode);
|
2018-01-19 17:00:51 +08:00
|
|
|
}
|
2017-12-21 07:45:38 +08:00
|
|
|
};
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|