2018-09-26 21:28:11 +08:00
|
|
|
/*
|
2021-02-11 22:25:48 +08:00
|
|
|
* Copyright (C) 2018-2021 Intel Corporation
|
2018-09-26 21:28:11 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
2020-10-16 18:10:52 +08:00
|
|
|
#include "shared/source/aub/aub_stream_provider.h"
|
|
|
|
#include "shared/source/aub/aub_subcapture.h"
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/helpers/options.h"
|
2020-10-15 01:22:01 +08:00
|
|
|
#include "shared/source/memory_manager/address_mapper.h"
|
|
|
|
#include "shared/source/memory_manager/physical_address_allocator.h"
|
2020-02-24 17:22:30 +08:00
|
|
|
|
2018-10-31 01:29:32 +08:00
|
|
|
#include "third_party/aub_stream/headers/aub_manager.h"
|
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2018-11-11 05:25:48 +08:00
|
|
|
struct HardwareInfo;
|
2021-03-05 19:14:21 +08:00
|
|
|
class GmmHelper;
|
2018-09-26 21:28:11 +08:00
|
|
|
|
|
|
|
class AubCenter {
|
|
|
|
public:
|
2021-03-05 19:14:21 +08:00
|
|
|
AubCenter(const HardwareInfo *pHwInfo, const GmmHelper &gmmHelper, bool localMemoryEnabled, const std::string &aubFileName, CommandStreamReceiverType csrType);
|
2019-02-05 21:16:37 +08:00
|
|
|
|
2018-12-11 00:12:32 +08:00
|
|
|
AubCenter();
|
2020-10-15 22:49:28 +08:00
|
|
|
virtual ~AubCenter() = default;
|
2018-09-26 21:28:11 +08:00
|
|
|
|
|
|
|
void initPhysicalAddressAllocator(PhysicalAddressAllocator *pPhysicalAddressAllocator) {
|
|
|
|
physicalAddressAllocator = std::unique_ptr<PhysicalAddressAllocator>(pPhysicalAddressAllocator);
|
|
|
|
}
|
|
|
|
|
|
|
|
PhysicalAddressAllocator *getPhysicalAddressAllocator() const {
|
|
|
|
return physicalAddressAllocator.get();
|
|
|
|
}
|
|
|
|
|
2018-10-02 16:37:17 +08:00
|
|
|
AddressMapper *getAddressMapper() const {
|
|
|
|
return addressMapper.get();
|
|
|
|
}
|
|
|
|
|
2018-09-26 21:28:11 +08:00
|
|
|
AubStreamProvider *getStreamProvider() const {
|
|
|
|
return streamProvider.get();
|
|
|
|
}
|
|
|
|
|
2019-06-03 15:57:27 +08:00
|
|
|
AubSubCaptureCommon *getSubCaptureCommon() const {
|
|
|
|
return subCaptureCommon.get();
|
2019-02-20 05:50:52 +08:00
|
|
|
}
|
|
|
|
|
2019-01-19 04:44:23 +08:00
|
|
|
aub_stream::AubManager *getAubManager() const {
|
2018-11-27 10:17:57 +08:00
|
|
|
return aubManager.get();
|
|
|
|
}
|
|
|
|
|
2019-02-05 21:16:37 +08:00
|
|
|
static uint32_t getAubStreamMode(const std::string &aubFileName, uint32_t csrType);
|
|
|
|
|
2018-09-26 21:28:11 +08:00
|
|
|
protected:
|
|
|
|
std::unique_ptr<PhysicalAddressAllocator> physicalAddressAllocator;
|
2018-10-02 16:37:17 +08:00
|
|
|
std::unique_ptr<AddressMapper> addressMapper;
|
2018-09-26 21:28:11 +08:00
|
|
|
std::unique_ptr<AubStreamProvider> streamProvider;
|
2018-10-31 01:29:32 +08:00
|
|
|
|
2019-06-03 15:57:27 +08:00
|
|
|
std::unique_ptr<AubSubCaptureCommon> subCaptureCommon;
|
2019-01-19 04:44:23 +08:00
|
|
|
std::unique_ptr<aub_stream::AubManager> aubManager;
|
2019-02-08 22:08:35 +08:00
|
|
|
uint32_t aubStreamMode = 0;
|
2021-02-11 22:25:48 +08:00
|
|
|
uint32_t stepping = 0;
|
2018-09-26 21:28:11 +08:00
|
|
|
};
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|