2017-12-21 00:45:38 +01:00
|
|
|
/*
|
2019-02-05 17:38:57 +01:00
|
|
|
* Copyright (C) 2017-2019 Intel Corporation
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
2018-09-18 09:11:08 +02:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "runtime/command_stream/tbx_command_stream_receiver.h"
|
2019-02-27 11:39:32 +01:00
|
|
|
|
2019-02-27 10:06:14 +01:00
|
|
|
#include "runtime/execution_environment/execution_environment.h"
|
2018-01-09 10:55:47 +01:00
|
|
|
#include "runtime/helpers/hw_info.h"
|
2017-12-21 00:45:38 +01:00
|
|
|
#include "runtime/helpers/options.h"
|
2019-02-27 11:39:32 +01:00
|
|
|
|
2017-12-21 00:45:38 +01:00
|
|
|
#include <string>
|
|
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
namespace NEO {
|
2017-12-21 00:45:38 +01:00
|
|
|
|
|
|
|
|
TbxCommandStreamReceiverCreateFunc tbxCommandStreamReceiverFactory[IGFX_MAX_CORE] = {};
|
|
|
|
|
|
2019-02-27 10:06:14 +01:00
|
|
|
CommandStreamReceiver *TbxCommandStreamReceiver::create(const std::string &baseName, bool withAubDump, ExecutionEnvironment &executionEnvironment) {
|
|
|
|
|
auto hwInfo = executionEnvironment.getHardwareInfo();
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2019-05-08 16:00:24 +02:00
|
|
|
if (hwInfo->platform.eRenderCoreFamily >= IGFX_MAX_CORE) {
|
2017-12-21 00:45:38 +01:00
|
|
|
DEBUG_BREAK_IF(!false);
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
|
2019-05-08 16:00:24 +02:00
|
|
|
auto pCreate = tbxCommandStreamReceiverFactory[hwInfo->platform.eRenderCoreFamily];
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2019-02-27 10:06:14 +01:00
|
|
|
return pCreate ? pCreate(baseName, withAubDump, executionEnvironment) : nullptr;
|
2017-12-21 00:45:38 +01:00
|
|
|
}
|
2019-03-26 11:59:46 +01:00
|
|
|
} // namespace NEO
|