2018-01-19 17:00:51 +08:00
|
|
|
/*
|
2020-01-08 16:04:20 +08:00
|
|
|
* Copyright (C) 2018-2020 Intel Corporation
|
2018-01-19 17:00:51 +08:00
|
|
|
*
|
2018-09-18 15:11:08 +08:00
|
|
|
* SPDX-License-Identifier: MIT
|
2018-01-19 17:00:51 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
#include "runtime/command_stream/command_stream_receiver.h"
|
2019-02-27 18:39:32 +08:00
|
|
|
|
2019-02-11 23:49:23 +08:00
|
|
|
#include <memory>
|
2018-01-19 17:00:51 +08:00
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2018-01-19 17:00:51 +08:00
|
|
|
|
|
|
|
template <typename BaseCSR>
|
|
|
|
class CommandStreamReceiverWithAUBDump : public BaseCSR {
|
2018-12-03 17:05:36 +08:00
|
|
|
protected:
|
|
|
|
using BaseCSR::osContext;
|
|
|
|
|
2018-01-19 17:00:51 +08:00
|
|
|
public:
|
2019-10-29 15:01:53 +08:00
|
|
|
CommandStreamReceiverWithAUBDump(const std::string &baseName, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
2018-01-19 17:00:51 +08:00
|
|
|
|
|
|
|
CommandStreamReceiverWithAUBDump(const CommandStreamReceiverWithAUBDump &) = delete;
|
|
|
|
CommandStreamReceiverWithAUBDump &operator=(const CommandStreamReceiverWithAUBDump &) = delete;
|
|
|
|
|
2019-11-24 21:50:41 +08:00
|
|
|
bool flush(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency) override;
|
2018-09-28 01:55:09 +08:00
|
|
|
void makeNonResident(GraphicsAllocation &gfxAllocation) override;
|
2018-01-19 17:00:51 +08:00
|
|
|
|
2019-06-03 15:57:27 +08:00
|
|
|
AubSubCaptureStatus checkAndActivateAubSubCapture(const MultiDispatchInfo &dispatchInfo) override;
|
2019-01-10 16:37:56 +08:00
|
|
|
void setupContext(OsContext &osContext) override;
|
2018-06-13 02:33:03 +08:00
|
|
|
|
2019-12-02 15:37:42 +08:00
|
|
|
CommandStreamReceiverType getType() override {
|
|
|
|
if (BaseCSR::getType() == CommandStreamReceiverType::CSR_TBX) {
|
|
|
|
return CommandStreamReceiverType::CSR_TBX_WITH_AUB;
|
|
|
|
}
|
|
|
|
return CommandStreamReceiverType::CSR_HW_WITH_AUB;
|
|
|
|
}
|
|
|
|
|
2020-01-08 16:04:20 +08:00
|
|
|
void waitForTaskCountWithKmdNotifyFallback(uint32_t taskCountToWait, FlushStamp flushStampToWait,
|
|
|
|
bool useQuickKmdSleep, bool forcePowerSavingMode) override;
|
|
|
|
|
2019-12-03 19:22:13 +08:00
|
|
|
size_t getPreferredTagPoolSize() const override { return 1; }
|
|
|
|
|
2019-02-11 23:49:23 +08:00
|
|
|
std::unique_ptr<CommandStreamReceiver> aubCSR;
|
2018-01-19 17:00:51 +08:00
|
|
|
};
|
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|