2017-12-21 00:45:38 +01:00
|
|
|
/*
|
2018-09-18 09:11:08 +02:00
|
|
|
* Copyright (C) 2017-2018 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"
|
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"
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
|
namespace OCLRT {
|
|
|
|
|
|
|
|
|
|
TbxCommandStreamReceiverCreateFunc tbxCommandStreamReceiverFactory[IGFX_MAX_CORE] = {};
|
|
|
|
|
|
2018-08-08 13:49:09 +02:00
|
|
|
CommandStreamReceiver *TbxCommandStreamReceiver::create(const HardwareInfo &hwInfo, bool withAubDump, ExecutionEnvironment &executionEnvironment) {
|
2017-12-21 00:45:38 +01:00
|
|
|
|
|
|
|
|
if (hwInfo.pPlatform->eRenderCoreFamily >= IGFX_MAX_CORE) {
|
|
|
|
|
DEBUG_BREAK_IF(!false);
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
auto pCreate = tbxCommandStreamReceiverFactory[hwInfo.pPlatform->eRenderCoreFamily];
|
|
|
|
|
|
2018-08-08 13:49:09 +02:00
|
|
|
return pCreate ? pCreate(hwInfo, withAubDump, executionEnvironment) : nullptr;
|
2017-12-21 00:45:38 +01:00
|
|
|
}
|
2018-06-12 21:54:39 +02:00
|
|
|
} // namespace OCLRT
|