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