Update getInternalEngine() implementation and remove unused method

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2021-06-25 11:34:12 +00:00
committed by Compute-Runtime-Automation
parent cfd3945b7e
commit 5c7955b1d0
9 changed files with 35 additions and 82 deletions

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2020 Intel Corporation
# Copyright (C) 2020-2021 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
@@ -9,7 +9,6 @@ set(NEO_CORE_DEVICE
${CMAKE_CURRENT_SOURCE_DIR}/device.cpp
${CMAKE_CURRENT_SOURCE_DIR}/device.h
${CMAKE_CURRENT_SOURCE_DIR}/device_caps.cpp
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/device_get_engine.cpp
${CMAKE_CURRENT_SOURCE_DIR}/device_info.h
${CMAKE_CURRENT_SOURCE_DIR}/root_device.cpp
${CMAKE_CURRENT_SOURCE_DIR}/root_device.h

View File

@@ -543,6 +543,16 @@ const std::vector<EngineControl> &Device::getEngines() const {
return this->engines;
}
EngineControl &Device::getInternalEngine() {
if (this->engines[0].commandStreamReceiver->getType() != CommandStreamReceiverType::CSR_HW) {
return this->getDefaultEngine();
}
auto engineType = getChosenEngineType(getHardwareInfo());
return this->getDeviceById(0)->getEngine(engineType, EngineUsage::Internal);
}
void Device::initializeRayTracing() {
if (rtMemoryBackedBuffer == nullptr) {
auto size = RayTracingHelper::getTotalMemoryBackedFifoSize(*this);

View File

@@ -64,7 +64,6 @@ class Device : public ReferenceTrackedObject<Device> {
EngineControl &getEngine(uint32_t index);
EngineControl &getDefaultEngine();
EngineControl &getInternalEngine();
EngineControl *getInternalCopyEngine();
SelectorCopyEngine &getSelectorCopyEngine();
MemoryManager *getMemoryManager() const;
GmmHelper *getGmmHelper() const;

View File

@@ -1,28 +0,0 @@
/*
* Copyright (C) 2020-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/command_stream/command_stream_receiver.h"
#include "shared/source/device/device.h"
#include "shared/source/helpers/hw_helper.h"
namespace NEO {
EngineControl &Device::getInternalEngine() {
if (this->engines[0].commandStreamReceiver->getType() != CommandStreamReceiverType::CSR_HW) {
return this->getDefaultEngine();
}
auto engineType = getChosenEngineType(getHardwareInfo());
return this->getDeviceById(0)->getEngine(engineType, EngineUsage::Internal);
}
EngineControl *Device::getInternalCopyEngine() {
return nullptr;
}
} // namespace NEO