2019-08-07 00:01:26 +08:00
|
|
|
/*
|
2023-01-04 21:32:37 +08:00
|
|
|
* Copyright (C) 2019-2023 Intel Corporation
|
2019-08-07 00:01:26 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
2022-11-19 01:53:37 +08:00
|
|
|
#include "shared/source/aub/aub_subcapture.h"
|
2021-09-23 06:03:07 +08:00
|
|
|
#include "shared/source/command_stream/aub_command_stream_receiver_hw.h"
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/execution_environment/execution_environment.h"
|
2021-05-21 18:22:13 +08:00
|
|
|
#include "shared/test/common/mocks/mock_experimental_command_buffer.h"
|
2020-02-24 17:22:30 +08:00
|
|
|
|
2019-08-07 00:01:26 +08:00
|
|
|
namespace NEO {
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
|
|
|
class UltAubCommandStreamReceiver : public AUBCommandStreamReceiverHw<GfxFamily>, public NonCopyableOrMovableClass {
|
|
|
|
using BaseClass = AUBCommandStreamReceiverHw<GfxFamily>;
|
|
|
|
|
|
|
|
public:
|
|
|
|
using BaseClass::osContext;
|
2020-09-24 12:35:53 +08:00
|
|
|
using BaseClass::useGpuIdleImplicitFlush;
|
|
|
|
using BaseClass::useNewResourceImplicitFlush;
|
2019-08-07 00:01:26 +08:00
|
|
|
|
2020-10-29 22:33:35 +08:00
|
|
|
UltAubCommandStreamReceiver(const std::string &fileName,
|
|
|
|
bool standalone,
|
|
|
|
ExecutionEnvironment &executionEnvironment,
|
|
|
|
uint32_t rootDeviceIndex,
|
|
|
|
const DeviceBitfield deviceBitfield)
|
2020-10-28 23:08:37 +08:00
|
|
|
: BaseClass(fileName, standalone, executionEnvironment, rootDeviceIndex, deviceBitfield) {
|
2019-08-07 00:01:26 +08:00
|
|
|
}
|
|
|
|
|
2020-10-29 22:33:35 +08:00
|
|
|
UltAubCommandStreamReceiver(ExecutionEnvironment &executionEnvironment,
|
|
|
|
uint32_t rootDeviceIndex,
|
|
|
|
const DeviceBitfield deviceBitfield)
|
2020-10-28 23:08:37 +08:00
|
|
|
: BaseClass("aubfile", true, executionEnvironment, rootDeviceIndex, deviceBitfield) {
|
2019-08-07 00:01:26 +08:00
|
|
|
}
|
|
|
|
|
2020-10-29 22:33:35 +08:00
|
|
|
static CommandStreamReceiver *create(bool withAubDump,
|
|
|
|
ExecutionEnvironment &executionEnvironment,
|
|
|
|
uint32_t rootDeviceIndex,
|
|
|
|
const DeviceBitfield deviceBitfield) {
|
2020-10-28 23:08:37 +08:00
|
|
|
auto csr = new UltAubCommandStreamReceiver<GfxFamily>("aubfile", true, executionEnvironment, rootDeviceIndex, deviceBitfield);
|
2019-08-07 00:01:26 +08:00
|
|
|
|
|
|
|
if (!csr->subCaptureManager->isSubCaptureMode()) {
|
|
|
|
csr->openFile("aubfile");
|
|
|
|
}
|
|
|
|
|
|
|
|
return csr;
|
|
|
|
}
|
|
|
|
|
2022-11-22 21:53:59 +08:00
|
|
|
TaskCountType flushBcsTask(const BlitPropertiesContainer &blitPropertiesContainer, bool blocking, bool profilingEnabled, Device &device) override {
|
2019-08-07 00:01:26 +08:00
|
|
|
blitBufferCalled++;
|
2022-02-03 21:29:48 +08:00
|
|
|
return BaseClass::flushBcsTask(blitPropertiesContainer, blocking, profilingEnabled, device);
|
2019-08-07 00:01:26 +08:00
|
|
|
}
|
|
|
|
|
2021-10-02 02:19:37 +08:00
|
|
|
void pollForCompletion() override {
|
|
|
|
pollForCompletionCalled++;
|
|
|
|
BaseClass::pollForCompletion();
|
|
|
|
}
|
|
|
|
|
2019-08-07 00:01:26 +08:00
|
|
|
uint32_t blitBufferCalled = 0;
|
2021-10-02 02:19:37 +08:00
|
|
|
uint32_t pollForCompletionCalled = 0;
|
2019-08-07 00:01:26 +08:00
|
|
|
};
|
|
|
|
} // namespace NEO
|