mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-22 10:17:01 +08:00
Change-Id: If965c79d70392db26597aea4c2f3b7ae2820fe96 Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
33 lines
954 B
C++
33 lines
954 B
C++
/*
|
|
* Copyright (C) 2017-2019 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "runtime/command_stream/tbx_command_stream_receiver.h"
|
|
|
|
#include "runtime/execution_environment/execution_environment.h"
|
|
#include "runtime/helpers/hw_info.h"
|
|
#include "runtime/helpers/options.h"
|
|
|
|
#include <string>
|
|
|
|
namespace NEO {
|
|
|
|
TbxCommandStreamReceiverCreateFunc tbxCommandStreamReceiverFactory[IGFX_MAX_CORE] = {};
|
|
|
|
CommandStreamReceiver *TbxCommandStreamReceiver::create(const std::string &baseName, bool withAubDump, ExecutionEnvironment &executionEnvironment) {
|
|
auto hwInfo = executionEnvironment.getHardwareInfo();
|
|
|
|
if (hwInfo->pPlatform->eRenderCoreFamily >= IGFX_MAX_CORE) {
|
|
DEBUG_BREAK_IF(!false);
|
|
return nullptr;
|
|
}
|
|
|
|
auto pCreate = tbxCommandStreamReceiverFactory[hwInfo->pPlatform->eRenderCoreFamily];
|
|
|
|
return pCreate ? pCreate(baseName, withAubDump, executionEnvironment) : nullptr;
|
|
}
|
|
} // namespace NEO
|