Files
compute-runtime/runtime/command_stream/tbx_command_stream_receiver.cpp
Stefanowski, Adam 16aee8cc46 [2/n] Move Hardware Info to Execution Environment
- remove hwInfo from the csr functions where it was passed as a parameter,
now csr functions have access to hwInfo by Execution Environment

Change-Id: I756ae63d9728c9c963571147bab97f9e1c15797b
Signed-off-by: Adam Stefanowski <adam.stefanowski@intel.com>
2019-03-22 10:08:26 +01:00

33 lines
958 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 OCLRT {
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 OCLRT