Add DeviceBitfield argument to CSR constructor
Related-To: NEO-5225 Change-Id: I8cf0aef3ec16314cfb1a787852b6c20ce0f65955 Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
parent
609f97d752
commit
30a67618f8
|
@ -210,7 +210,7 @@ using CommandQueueCommands = Test<DeviceFixture>;
|
|||
HWTEST_F(CommandQueueCommands, givenCommandQueueWhenExecutingCommandListsThenHardwareContextIsProgrammedAndGlobalAllocationResident) {
|
||||
const ze_command_queue_desc_t desc = {};
|
||||
|
||||
MockCsrHw2<FamilyType> csr(*neoDevice->getExecutionEnvironment(), 0);
|
||||
MockCsrHw2<FamilyType> csr(*neoDevice->getExecutionEnvironment(), 0, neoDevice->getDeviceBitfield());
|
||||
csr.initializeTagAllocation();
|
||||
csr.setupContext(*neoDevice->getDefaultEngine().osContext);
|
||||
|
||||
|
@ -246,7 +246,7 @@ using CommandQueueIndirectAllocations = Test<ModuleFixture>;
|
|||
HWTEST_F(CommandQueueIndirectAllocations, givenCommandQueueWhenExecutingCommandListsThenExpectedIndirectAllocationsAddedToResidencyContainer) {
|
||||
const ze_command_queue_desc_t desc = {};
|
||||
|
||||
MockCsrHw2<FamilyType> csr(*neoDevice->getExecutionEnvironment(), 0);
|
||||
MockCsrHw2<FamilyType> csr(*neoDevice->getExecutionEnvironment(), 0, neoDevice->getDeviceBitfield());
|
||||
csr.initializeTagAllocation();
|
||||
csr.setupContext(*neoDevice->getDefaultEngine().osContext);
|
||||
|
||||
|
@ -443,7 +443,8 @@ HWTEST_F(CommandQueueSynchronizeTest, givenCallToSynchronizeThenCorrectEnableTim
|
|||
~SynchronizeCsr() override {
|
||||
delete tagAddress;
|
||||
}
|
||||
SynchronizeCsr(const NEO::ExecutionEnvironment &executionEnvironment) : NEO::UltCommandStreamReceiver<FamilyType>(const_cast<NEO::ExecutionEnvironment &>(executionEnvironment), 0) {
|
||||
SynchronizeCsr(const NEO::ExecutionEnvironment &executionEnvironment, DeviceBitfield deviceBitfield)
|
||||
: NEO::UltCommandStreamReceiver<FamilyType>(const_cast<NEO::ExecutionEnvironment &>(executionEnvironment), 0, deviceBitfield) {
|
||||
tagAddress = new uint32_t;
|
||||
}
|
||||
bool waitForCompletionWithTimeout(bool enableTimeout, int64_t timeoutMs, uint32_t taskCountToWait) override {
|
||||
|
@ -458,7 +459,8 @@ HWTEST_F(CommandQueueSynchronizeTest, givenCallToSynchronizeThenCorrectEnableTim
|
|||
uint32_t *tagAddress;
|
||||
};
|
||||
|
||||
auto csr = std::unique_ptr<SynchronizeCsr>(new SynchronizeCsr(*device->getNEODevice()->getExecutionEnvironment()));
|
||||
auto csr = std::unique_ptr<SynchronizeCsr>(new SynchronizeCsr(*device->getNEODevice()->getExecutionEnvironment(),
|
||||
device->getNEODevice()->getDeviceBitfield()));
|
||||
ze_command_queue_desc_t desc = {};
|
||||
ze_command_queue_handle_t commandQueue = {};
|
||||
ze_result_t res = context->createCommandQueue(device, &desc, &commandQueue);
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace ult {
|
|||
|
||||
using FenceTest = Test<DeviceFixture>;
|
||||
TEST_F(FenceTest, whenQueryingStatusThenCsrAllocationsAreDownloaded) {
|
||||
auto csr = std::make_unique<MockCommandStreamReceiver>(*neoDevice->getExecutionEnvironment(), 0);
|
||||
auto csr = std::make_unique<MockCommandStreamReceiver>(*neoDevice->getExecutionEnvironment(), 0, neoDevice->getDeviceBitfield());
|
||||
|
||||
Mock<CommandQueue> cmdQueue(device, csr.get());
|
||||
auto fence = Fence::create(&cmdQueue, nullptr);
|
||||
|
|
|
@ -51,7 +51,11 @@ std::string AUBCommandStreamReceiver::createFullFilePath(const HardwareInfo &hwI
|
|||
return filePath;
|
||||
}
|
||||
|
||||
CommandStreamReceiver *AUBCommandStreamReceiver::create(const std::string &baseName, bool standalone, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) {
|
||||
CommandStreamReceiver *AUBCommandStreamReceiver::create(const std::string &baseName,
|
||||
bool standalone,
|
||||
ExecutionEnvironment &executionEnvironment,
|
||||
uint32_t rootDeviceIndex,
|
||||
DeviceBitfield deviceBitfield) {
|
||||
auto hwInfo = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->getHardwareInfo();
|
||||
std::string filePath = AUBCommandStreamReceiver::createFullFilePath(*hwInfo, baseName);
|
||||
if (DebugManager.flags.AUBDumpCaptureFileName.get() != "unk") {
|
||||
|
@ -64,7 +68,7 @@ CommandStreamReceiver *AUBCommandStreamReceiver::create(const std::string &baseN
|
|||
}
|
||||
|
||||
auto pCreate = aubCommandStreamReceiverFactory[hwInfo->platform.eRenderCoreFamily];
|
||||
return pCreate ? pCreate(filePath, standalone, executionEnvironment, rootDeviceIndex) : nullptr;
|
||||
return pCreate ? pCreate(filePath, standalone, executionEnvironment, rootDeviceIndex, deviceBitfield) : nullptr;
|
||||
}
|
||||
} // namespace NEO
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#pragma once
|
||||
#include "shared/source/aub_mem_dump/aub_mem_dump.h"
|
||||
#include "shared/source/helpers/common_types.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
|
@ -16,11 +17,19 @@ class CommandStreamReceiver;
|
|||
class ExecutionEnvironment;
|
||||
|
||||
struct AUBCommandStreamReceiver {
|
||||
static CommandStreamReceiver *create(const std::string &filename, bool standalone, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
static CommandStreamReceiver *create(const std::string &filename,
|
||||
bool standalone,
|
||||
ExecutionEnvironment &executionEnvironment,
|
||||
uint32_t rootDeviceIndex,
|
||||
DeviceBitfield deviceBitfield);
|
||||
static std::string createFullFilePath(const HardwareInfo &hwInfo, const std::string &filename);
|
||||
|
||||
using AubFileStream = AubMemDump::AubFileStream;
|
||||
};
|
||||
|
||||
typedef CommandStreamReceiver *(*AubCommandStreamReceiverCreateFunc)(const std::string &fileName, bool standalone, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
typedef CommandStreamReceiver *(*AubCommandStreamReceiverCreateFunc)(const std::string &fileName,
|
||||
bool standalone,
|
||||
ExecutionEnvironment &executionEnvironment,
|
||||
uint32_t rootDeviceIndex,
|
||||
DeviceBitfield deviceBitfield);
|
||||
} // namespace NEO
|
||||
|
|
|
@ -68,9 +68,13 @@ class AUBCommandStreamReceiverHw : public CommandStreamReceiverSimulatedHw<GfxFa
|
|||
MOCKABLE_VIRTUAL void addContextToken(uint32_t dumpHandle);
|
||||
void dumpAllocation(GraphicsAllocation &gfxAllocation) override;
|
||||
|
||||
static CommandStreamReceiver *create(const std::string &fileName, bool standalone, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
static CommandStreamReceiver *create(const std::string &fileName,
|
||||
bool standalone,
|
||||
ExecutionEnvironment &executionEnvironment,
|
||||
uint32_t rootDeviceIndex,
|
||||
DeviceBitfield deviceBitfield);
|
||||
|
||||
AUBCommandStreamReceiverHw(const std::string &fileName, bool standalone, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
AUBCommandStreamReceiverHw(const std::string &fileName, bool standalone, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield);
|
||||
~AUBCommandStreamReceiverHw() override;
|
||||
|
||||
AUBCommandStreamReceiverHw(const AUBCommandStreamReceiverHw &) = delete;
|
||||
|
|
|
@ -43,8 +43,12 @@
|
|||
namespace NEO {
|
||||
|
||||
template <typename GfxFamily>
|
||||
AUBCommandStreamReceiverHw<GfxFamily>::AUBCommandStreamReceiverHw(const std::string &fileName, bool standalone, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex)
|
||||
: BaseClass(executionEnvironment, rootDeviceIndex),
|
||||
AUBCommandStreamReceiverHw<GfxFamily>::AUBCommandStreamReceiverHw(const std::string &fileName,
|
||||
bool standalone,
|
||||
ExecutionEnvironment &executionEnvironment,
|
||||
uint32_t rootDeviceIndex,
|
||||
DeviceBitfield deviceBitfield)
|
||||
: BaseClass(executionEnvironment, rootDeviceIndex, deviceBitfield),
|
||||
standalone(standalone) {
|
||||
|
||||
executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->initAubCenter(this->isLocalMemoryEnabled(), fileName, this->getType());
|
||||
|
@ -279,8 +283,12 @@ void AUBCommandStreamReceiverHw<GfxFamily>::initializeEngine() {
|
|||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
CommandStreamReceiver *AUBCommandStreamReceiverHw<GfxFamily>::create(const std::string &fileName, bool standalone, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) {
|
||||
auto csr = std::make_unique<AUBCommandStreamReceiverHw<GfxFamily>>(fileName, standalone, executionEnvironment, rootDeviceIndex);
|
||||
CommandStreamReceiver *AUBCommandStreamReceiverHw<GfxFamily>::create(const std::string &fileName,
|
||||
bool standalone,
|
||||
ExecutionEnvironment &executionEnvironment,
|
||||
uint32_t rootDeviceIndex,
|
||||
DeviceBitfield deviceBitfield) {
|
||||
auto csr = std::make_unique<AUBCommandStreamReceiverHw<GfxFamily>>(fileName, standalone, executionEnvironment, rootDeviceIndex, deviceBitfield);
|
||||
|
||||
if (!csr->subCaptureManager->isSubCaptureMode()) {
|
||||
csr->openFile(fileName);
|
||||
|
|
|
@ -33,7 +33,7 @@ class CommandStreamReceiverSimulatedCommonHw : public CommandStreamReceiverHw<Gf
|
|||
MOCKABLE_VIRTUAL uint32_t getDeviceIndex() const;
|
||||
|
||||
public:
|
||||
CommandStreamReceiverSimulatedCommonHw(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
CommandStreamReceiverSimulatedCommonHw(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield);
|
||||
~CommandStreamReceiverSimulatedCommonHw() override;
|
||||
uint64_t getGTTBits() const {
|
||||
return 0u;
|
||||
|
|
|
@ -104,7 +104,10 @@ uint32_t CommandStreamReceiverSimulatedCommonHw<GfxFamily>::getDeviceIndex() con
|
|||
return osContext->getDeviceBitfield().any() ? static_cast<uint32_t>(Math::log2(static_cast<uint32_t>(osContext->getDeviceBitfield().to_ulong()))) : 0u;
|
||||
}
|
||||
template <typename GfxFamily>
|
||||
CommandStreamReceiverSimulatedCommonHw<GfxFamily>::CommandStreamReceiverSimulatedCommonHw(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) : CommandStreamReceiverHw<GfxFamily>(executionEnvironment, rootDeviceIndex) {
|
||||
CommandStreamReceiverSimulatedCommonHw<GfxFamily>::CommandStreamReceiverSimulatedCommonHw(ExecutionEnvironment &executionEnvironment,
|
||||
uint32_t rootDeviceIndex,
|
||||
DeviceBitfield deviceBitfield)
|
||||
: CommandStreamReceiverHw<GfxFamily>(executionEnvironment, rootDeviceIndex, deviceBitfield) {
|
||||
this->useNewResourceImplicitFlush = false;
|
||||
this->useGpuIdleImplicitFlush = false;
|
||||
}
|
||||
|
|
|
@ -18,7 +18,10 @@ class CommandStreamReceiverWithAUBDump : public BaseCSR {
|
|||
using BaseCSR::osContext;
|
||||
|
||||
public:
|
||||
CommandStreamReceiverWithAUBDump(const std::string &baseName, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
CommandStreamReceiverWithAUBDump(const std::string &baseName,
|
||||
ExecutionEnvironment &executionEnvironment,
|
||||
uint32_t rootDeviceIndex,
|
||||
DeviceBitfield deviceBitfield);
|
||||
|
||||
CommandStreamReceiverWithAUBDump(const CommandStreamReceiverWithAUBDump &) = delete;
|
||||
CommandStreamReceiverWithAUBDump &operator=(const CommandStreamReceiverWithAUBDump &) = delete;
|
||||
|
|
|
@ -17,13 +17,16 @@ namespace NEO {
|
|||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[IGFX_MAX_CORE];
|
||||
|
||||
template <typename BaseCSR>
|
||||
CommandStreamReceiverWithAUBDump<BaseCSR>::CommandStreamReceiverWithAUBDump(const std::string &baseName, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex)
|
||||
: BaseCSR(executionEnvironment, rootDeviceIndex) {
|
||||
CommandStreamReceiverWithAUBDump<BaseCSR>::CommandStreamReceiverWithAUBDump(const std::string &baseName,
|
||||
ExecutionEnvironment &executionEnvironment,
|
||||
uint32_t rootDeviceIndex,
|
||||
DeviceBitfield deviceBitfield)
|
||||
: BaseCSR(executionEnvironment, rootDeviceIndex, deviceBitfield) {
|
||||
bool isAubManager = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->aubCenter && executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->aubCenter->getAubManager();
|
||||
bool isTbxMode = CommandStreamReceiverType::CSR_TBX == BaseCSR::getType();
|
||||
bool createAubCsr = (isAubManager && isTbxMode) ? false : true;
|
||||
if (createAubCsr) {
|
||||
aubCSR.reset(AUBCommandStreamReceiver::create(baseName, false, executionEnvironment, rootDeviceIndex));
|
||||
aubCSR.reset(AUBCommandStreamReceiver::create(baseName, false, executionEnvironment, rootDeviceIndex, deviceBitfield));
|
||||
UNRECOVERABLE_IF(!aubCSR->initializeTagAllocation());
|
||||
*aubCSR->getTagAddress() = std::numeric_limits<uint32_t>::max();
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace NEO {
|
|||
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[IGFX_MAX_CORE];
|
||||
|
||||
CommandStreamReceiver *createCommandStreamImpl(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) {
|
||||
CommandStreamReceiver *createCommandStreamImpl(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield) {
|
||||
auto funcCreate = commandStreamReceiverFactory[executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->getHardwareInfo()->platform.eRenderCoreFamily];
|
||||
if (funcCreate == nullptr) {
|
||||
return nullptr;
|
||||
|
@ -29,19 +29,19 @@ CommandStreamReceiver *createCommandStreamImpl(ExecutionEnvironment &executionEn
|
|||
}
|
||||
switch (csr) {
|
||||
case CSR_HW:
|
||||
commandStreamReceiver = funcCreate(false, executionEnvironment, rootDeviceIndex);
|
||||
commandStreamReceiver = funcCreate(false, executionEnvironment, rootDeviceIndex, deviceBitfield);
|
||||
break;
|
||||
case CSR_AUB:
|
||||
commandStreamReceiver = AUBCommandStreamReceiver::create("aubfile", true, executionEnvironment, rootDeviceIndex);
|
||||
commandStreamReceiver = AUBCommandStreamReceiver::create("aubfile", true, executionEnvironment, rootDeviceIndex, deviceBitfield);
|
||||
break;
|
||||
case CSR_TBX:
|
||||
commandStreamReceiver = TbxCommandStreamReceiver::create("", false, executionEnvironment, rootDeviceIndex);
|
||||
commandStreamReceiver = TbxCommandStreamReceiver::create("", false, executionEnvironment, rootDeviceIndex, deviceBitfield);
|
||||
break;
|
||||
case CSR_HW_WITH_AUB:
|
||||
commandStreamReceiver = funcCreate(true, executionEnvironment, rootDeviceIndex);
|
||||
commandStreamReceiver = funcCreate(true, executionEnvironment, rootDeviceIndex, deviceBitfield);
|
||||
break;
|
||||
case CSR_TBX_WITH_AUB:
|
||||
commandStreamReceiver = TbxCommandStreamReceiver::create("aubfile", true, executionEnvironment, rootDeviceIndex);
|
||||
commandStreamReceiver = TbxCommandStreamReceiver::create("aubfile", true, executionEnvironment, rootDeviceIndex, deviceBitfield);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -10,6 +10,6 @@
|
|||
|
||||
namespace NEO {
|
||||
class ExecutionEnvironment;
|
||||
extern CommandStreamReceiver *createCommandStreamImpl(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
extern CommandStreamReceiver *createCommandStreamImpl(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield);
|
||||
extern bool prepareDeviceEnvironmentsImpl(ExecutionEnvironment &executionEnvironment);
|
||||
} // namespace NEO
|
||||
|
|
|
@ -17,7 +17,11 @@ namespace NEO {
|
|||
|
||||
TbxCommandStreamReceiverCreateFunc tbxCommandStreamReceiverFactory[IGFX_MAX_CORE] = {};
|
||||
|
||||
CommandStreamReceiver *TbxCommandStreamReceiver::create(const std::string &baseName, bool withAubDump, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) {
|
||||
CommandStreamReceiver *TbxCommandStreamReceiver::create(const std::string &baseName,
|
||||
bool withAubDump,
|
||||
ExecutionEnvironment &executionEnvironment,
|
||||
uint32_t rootDeviceIndex,
|
||||
DeviceBitfield deviceBitfield) {
|
||||
auto hwInfo = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->getHardwareInfo();
|
||||
|
||||
if (hwInfo->platform.eRenderCoreFamily >= IGFX_MAX_CORE) {
|
||||
|
@ -27,6 +31,6 @@ CommandStreamReceiver *TbxCommandStreamReceiver::create(const std::string &baseN
|
|||
|
||||
auto pCreate = tbxCommandStreamReceiverFactory[hwInfo->platform.eRenderCoreFamily];
|
||||
|
||||
return pCreate ? pCreate(baseName, withAubDump, executionEnvironment, rootDeviceIndex) : nullptr;
|
||||
return pCreate ? pCreate(baseName, withAubDump, executionEnvironment, rootDeviceIndex, deviceBitfield) : nullptr;
|
||||
}
|
||||
} // namespace NEO
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#pragma once
|
||||
#include "shared/source/aub_mem_dump/aub_mem_dump.h"
|
||||
#include "shared/source/helpers/common_types.h"
|
||||
|
||||
namespace NEO {
|
||||
class CommandStreamReceiver;
|
||||
|
@ -37,10 +38,18 @@ class TbxStream : public AubMemDump::AubStream {
|
|||
};
|
||||
|
||||
struct TbxCommandStreamReceiver {
|
||||
static CommandStreamReceiver *create(const std::string &baseName, bool withAubDump, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
static CommandStreamReceiver *create(const std::string &baseName,
|
||||
bool withAubDump,
|
||||
ExecutionEnvironment &executionEnvironment,
|
||||
uint32_t rootDeviceIndex,
|
||||
DeviceBitfield deviceBitfield);
|
||||
|
||||
using TbxStream = NEO::TbxStream;
|
||||
};
|
||||
|
||||
typedef CommandStreamReceiver *(*TbxCommandStreamReceiverCreateFunc)(const std::string &baseName, bool withAubDump, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
typedef CommandStreamReceiver *(*TbxCommandStreamReceiverCreateFunc)(const std::string &baseName,
|
||||
bool withAubDump,
|
||||
ExecutionEnvironment &executionEnvironment,
|
||||
uint32_t rootDeviceIndex,
|
||||
DeviceBitfield deviceBitfield);
|
||||
} // namespace NEO
|
||||
|
|
|
@ -62,9 +62,9 @@ class TbxCommandStreamReceiverHw : public CommandStreamReceiverSimulatedHw<GfxFa
|
|||
|
||||
void dumpAllocation(GraphicsAllocation &gfxAllocation) override;
|
||||
|
||||
static CommandStreamReceiver *create(const std::string &baseName, bool withAubDump, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
static CommandStreamReceiver *create(const std::string &baseName, bool withAubDump, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield);
|
||||
|
||||
TbxCommandStreamReceiverHw(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
TbxCommandStreamReceiverHw(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield);
|
||||
~TbxCommandStreamReceiverHw() override;
|
||||
|
||||
void initializeEngine();
|
||||
|
|
|
@ -36,8 +36,10 @@
|
|||
namespace NEO {
|
||||
|
||||
template <typename GfxFamily>
|
||||
TbxCommandStreamReceiverHw<GfxFamily>::TbxCommandStreamReceiverHw(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex)
|
||||
: BaseClass(executionEnvironment, rootDeviceIndex) {
|
||||
TbxCommandStreamReceiverHw<GfxFamily>::TbxCommandStreamReceiverHw(ExecutionEnvironment &executionEnvironment,
|
||||
uint32_t rootDeviceIndex,
|
||||
DeviceBitfield deviceBitfield)
|
||||
: BaseClass(executionEnvironment, rootDeviceIndex, deviceBitfield) {
|
||||
|
||||
physicalAddressAllocator.reset(this->createPhysicalAddressAllocator(&this->peekHwInfo()));
|
||||
executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->initAubCenter(this->localMemoryEnabled, "", this->getType());
|
||||
|
@ -152,7 +154,7 @@ void TbxCommandStreamReceiverHw<GfxFamily>::initializeEngine() {
|
|||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
CommandStreamReceiver *TbxCommandStreamReceiverHw<GfxFamily>::create(const std::string &baseName, bool withAubDump, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) {
|
||||
CommandStreamReceiver *TbxCommandStreamReceiverHw<GfxFamily>::create(const std::string &baseName, bool withAubDump, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield) {
|
||||
TbxCommandStreamReceiverHw<GfxFamily> *csr;
|
||||
if (withAubDump) {
|
||||
auto hwInfo = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->getHardwareInfo();
|
||||
|
@ -164,7 +166,7 @@ CommandStreamReceiver *TbxCommandStreamReceiverHw<GfxFamily>::create(const std::
|
|||
}
|
||||
executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->initAubCenter(localMemoryEnabled, fullName, CommandStreamReceiverType::CSR_TBX_WITH_AUB);
|
||||
|
||||
csr = new CommandStreamReceiverWithAUBDump<TbxCommandStreamReceiverHw<GfxFamily>>(baseName, executionEnvironment, rootDeviceIndex);
|
||||
csr = new CommandStreamReceiverWithAUBDump<TbxCommandStreamReceiverHw<GfxFamily>>(baseName, executionEnvironment, rootDeviceIndex, deviceBitfield);
|
||||
|
||||
auto aubCenter = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->aubCenter.get();
|
||||
UNRECOVERABLE_IF(nullptr == aubCenter);
|
||||
|
@ -183,7 +185,7 @@ CommandStreamReceiver *TbxCommandStreamReceiverHw<GfxFamily>::create(const std::
|
|||
}
|
||||
}
|
||||
} else {
|
||||
csr = new TbxCommandStreamReceiverHw<GfxFamily>(executionEnvironment, rootDeviceIndex);
|
||||
csr = new TbxCommandStreamReceiverHw<GfxFamily>(executionEnvironment, rootDeviceIndex, deviceBitfield);
|
||||
}
|
||||
|
||||
if (!csr->aubManager) {
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
|
||||
namespace NEO {
|
||||
|
||||
CommandStreamReceiver *createCommandStream(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) {
|
||||
return createCommandStreamImpl(executionEnvironment, rootDeviceIndex);
|
||||
CommandStreamReceiver *createCommandStream(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield) {
|
||||
return createCommandStreamImpl(executionEnvironment, rootDeviceIndex, deviceBitfield);
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
|
|
@ -14,12 +14,12 @@
|
|||
namespace NEO {
|
||||
|
||||
template <typename GfxFamily>
|
||||
CommandStreamReceiver *DeviceCommandStreamReceiver<GfxFamily>::create(bool withAubDump, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) {
|
||||
CommandStreamReceiver *DeviceCommandStreamReceiver<GfxFamily>::create(bool withAubDump, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield) {
|
||||
if (withAubDump) {
|
||||
return new CommandStreamReceiverWithAUBDump<DrmCommandStreamReceiver<GfxFamily>>("aubfile", executionEnvironment, rootDeviceIndex);
|
||||
return new CommandStreamReceiverWithAUBDump<DrmCommandStreamReceiver<GfxFamily>>("aubfile", executionEnvironment, rootDeviceIndex, deviceBitfield);
|
||||
} else {
|
||||
auto gemMode = DebugManager.flags.EnableGemCloseWorker.get() ? gemCloseWorkerMode::gemCloseWorkerActive : gemCloseWorkerMode::gemCloseWorkerInactive;
|
||||
return new DrmCommandStreamReceiver<GfxFamily>(executionEnvironment, rootDeviceIndex, gemMode);
|
||||
return new DrmCommandStreamReceiver<GfxFamily>(executionEnvironment, rootDeviceIndex, deviceBitfield, gemMode);
|
||||
}
|
||||
};
|
||||
} // namespace NEO
|
||||
|
|
|
@ -34,7 +34,7 @@ class DrmCommandStreamReceiver : public DeviceCommandStreamReceiver<GfxFamily> {
|
|||
public:
|
||||
// When drm is null default implementation is used. In this case DrmCommandStreamReceiver is responsible to free drm.
|
||||
// When drm is passed, DCSR will not free it at destruction
|
||||
DrmCommandStreamReceiver(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex,
|
||||
DrmCommandStreamReceiver(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield,
|
||||
gemCloseWorkerMode mode = gemCloseWorkerMode::gemCloseWorkerActive);
|
||||
|
||||
bool flush(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency) override;
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
namespace NEO {
|
||||
|
||||
template <typename GfxFamily>
|
||||
DrmCommandStreamReceiver<GfxFamily>::DrmCommandStreamReceiver(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, gemCloseWorkerMode mode)
|
||||
: BaseClass(executionEnvironment, rootDeviceIndex), gemCloseWorkerOperationMode(mode) {
|
||||
DrmCommandStreamReceiver<GfxFamily>::DrmCommandStreamReceiver(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield, gemCloseWorkerMode mode)
|
||||
: BaseClass(executionEnvironment, rootDeviceIndex, deviceBitfield), gemCloseWorkerOperationMode(mode) {
|
||||
|
||||
auto rootDeviceEnvironment = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex].get();
|
||||
|
||||
|
|
|
@ -20,11 +20,14 @@
|
|||
namespace NEO {
|
||||
|
||||
template <typename GfxFamily>
|
||||
CommandStreamReceiver *DeviceCommandStreamReceiver<GfxFamily>::create(bool withAubDump, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) {
|
||||
CommandStreamReceiver *DeviceCommandStreamReceiver<GfxFamily>::create(bool withAubDump,
|
||||
ExecutionEnvironment &executionEnvironment,
|
||||
uint32_t rootDeviceIndex,
|
||||
DeviceBitfield deviceBitfield) {
|
||||
if (withAubDump) {
|
||||
return new CommandStreamReceiverWithAUBDump<WddmCommandStreamReceiver<GfxFamily>>("aubfile", executionEnvironment, rootDeviceIndex);
|
||||
return new CommandStreamReceiverWithAUBDump<WddmCommandStreamReceiver<GfxFamily>>("aubfile", executionEnvironment, rootDeviceIndex, deviceBitfield);
|
||||
} else {
|
||||
return new WddmCommandStreamReceiver<GfxFamily>(executionEnvironment, rootDeviceIndex);
|
||||
return new WddmCommandStreamReceiver<GfxFamily>(executionEnvironment, rootDeviceIndex, deviceBitfield);
|
||||
}
|
||||
}
|
||||
} // namespace NEO
|
||||
|
|
|
@ -21,7 +21,7 @@ class WddmCommandStreamReceiver : public DeviceCommandStreamReceiver<GfxFamily>
|
|||
typedef DeviceCommandStreamReceiver<GfxFamily> BaseClass;
|
||||
|
||||
public:
|
||||
WddmCommandStreamReceiver(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
WddmCommandStreamReceiver(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield);
|
||||
virtual ~WddmCommandStreamReceiver();
|
||||
|
||||
bool flush(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency) override;
|
||||
|
|
|
@ -37,8 +37,8 @@ namespace NEO {
|
|||
DECLARE_COMMAND_BUFFER(CommandBufferHeader, UMD_OCL, FALSE, FALSE, PERFTAG_OCL);
|
||||
|
||||
template <typename GfxFamily>
|
||||
WddmCommandStreamReceiver<GfxFamily>::WddmCommandStreamReceiver(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex)
|
||||
: BaseClass(executionEnvironment, rootDeviceIndex) {
|
||||
WddmCommandStreamReceiver<GfxFamily>::WddmCommandStreamReceiver(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield)
|
||||
: BaseClass(executionEnvironment, rootDeviceIndex, deviceBitfield) {
|
||||
|
||||
notifyAubCaptureImpl = DeviceCallbacks<GfxFamily>::notifyAubCapture;
|
||||
this->wddm = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->osInterface->get()->getWddm();
|
||||
|
|
|
@ -35,9 +35,9 @@ void AUBCommandStreamFixture::SetUp(CommandQueue *pCmdQ) {
|
|||
strfilename << testInfo->test_case_name() << "_" << testInfo->name() << "_" << hwHelper.getCsTraits(engineType).name;
|
||||
|
||||
if (testMode == TestMode::AubTestsWithTbx) {
|
||||
pCommandStreamReceiver = TbxCommandStreamReceiver::create(strfilename.str(), true, *device.executionEnvironment, device.getRootDeviceIndex());
|
||||
pCommandStreamReceiver = TbxCommandStreamReceiver::create(strfilename.str(), true, *device.executionEnvironment, device.getRootDeviceIndex(), device.getDeviceBitfield());
|
||||
} else {
|
||||
pCommandStreamReceiver = AUBCommandStreamReceiver::create(strfilename.str(), true, *device.executionEnvironment, device.getRootDeviceIndex());
|
||||
pCommandStreamReceiver = AUBCommandStreamReceiver::create(strfilename.str(), true, *device.executionEnvironment, device.getRootDeviceIndex(), device.getDeviceBitfield());
|
||||
}
|
||||
ASSERT_NE(nullptr, pCommandStreamReceiver);
|
||||
|
||||
|
|
|
@ -48,9 +48,9 @@ class AUBFixture : public CommandQueueHwFixture {
|
|||
device = std::make_unique<MockClDevice>(MockDevice::create<MockDevice>(executionEnvironment, rootDeviceIndex));
|
||||
|
||||
if (testMode == TestMode::AubTestsWithTbx) {
|
||||
this->csr = TbxCommandStreamReceiver::create(strfilename.str(), true, *executionEnvironment, 0);
|
||||
this->csr = TbxCommandStreamReceiver::create(strfilename.str(), true, *executionEnvironment, 0, device->getDeviceBitfield());
|
||||
} else {
|
||||
this->csr = AUBCommandStreamReceiver::create(strfilename.str(), true, *executionEnvironment, 0);
|
||||
this->csr = AUBCommandStreamReceiver::create(strfilename.str(), true, *executionEnvironment, 0, device->getDeviceBitfield());
|
||||
}
|
||||
|
||||
device->resetCommandStreamReceiver(this->csr);
|
||||
|
|
|
@ -38,7 +38,7 @@ struct BlitEnqueueTests : public ::testing::Test {
|
|||
BcsMockContext(ClDevice *device) : MockContext(device) {
|
||||
bcsOsContext.reset(OsContext::create(nullptr, 0, 0, aub_stream::ENGINE_BCS, PreemptionMode::Disabled,
|
||||
false, false, false));
|
||||
bcsCsr.reset(createCommandStream(*device->getExecutionEnvironment(), device->getRootDeviceIndex()));
|
||||
bcsCsr.reset(createCommandStream(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield()));
|
||||
bcsCsr->setupContext(*bcsOsContext);
|
||||
bcsCsr->initializeTagAllocation();
|
||||
|
||||
|
@ -1111,8 +1111,8 @@ struct BlitEnqueueFlushTests : public BlitEnqueueTests<1> {
|
|||
return UltCommandStreamReceiver<FamilyType>::flush(batchBuffer, allocationsForResidency);
|
||||
}
|
||||
|
||||
static CommandStreamReceiver *create(bool withAubDump, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) {
|
||||
return new MyUltCsr<FamilyType>(executionEnvironment, rootDeviceIndex);
|
||||
static CommandStreamReceiver *create(bool withAubDump, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield) {
|
||||
return new MyUltCsr<FamilyType>(executionEnvironment, rootDeviceIndex, deviceBitfield);
|
||||
}
|
||||
|
||||
uint32_t *flushCounter = nullptr;
|
||||
|
|
|
@ -377,7 +377,7 @@ HWTEST_F(CommandQueueHwTest, GivenEventsWaitlistOnBlockingMapBufferWillWaitForEv
|
|||
|
||||
HWTEST_F(CommandQueueHwTest, GivenNotCompleteUserEventPassedToEnqueueWhenEventIsUnblockedThenAllSurfacesForBlockedCommandsAreMadeResident) {
|
||||
int32_t executionStamp = 0;
|
||||
auto mockCSR = new MockCsr<FamilyType>(executionStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCSR = new MockCsr<FamilyType>(executionStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCSR);
|
||||
|
||||
auto userEvent = make_releaseable<UserEvent>(context);
|
||||
|
@ -1074,7 +1074,7 @@ HWTEST_F(CommandQueueHwTest, givenBlockedInOrderCmdQueueAndAsynchronouslyComplet
|
|||
CommandQueueHw<FamilyType> *cmdQHw = static_cast<CommandQueueHw<FamilyType> *>(this->pCmdQ);
|
||||
|
||||
int32_t executionStamp = 0;
|
||||
auto mockCSR = new MockCsr<FamilyType>(executionStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCSR = new MockCsr<FamilyType>(executionStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
|
||||
pDevice->resetCommandStreamReceiver(mockCSR);
|
||||
|
||||
|
@ -1154,7 +1154,7 @@ HWTEST_F(OOQueueHwTest, givenBlockedOutOfOrderCmdQueueAndAsynchronouslyCompleted
|
|||
CommandQueueHw<FamilyType> *cmdQHw = static_cast<CommandQueueHw<FamilyType> *>(this->pCmdQ);
|
||||
|
||||
int32_t executionStamp = 0;
|
||||
auto mockCSR = new MockCsr<FamilyType>(executionStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCSR = new MockCsr<FamilyType>(executionStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCSR);
|
||||
|
||||
MockKernelWithInternals mockKernelWithInternals(*pClDevice);
|
||||
|
@ -1315,9 +1315,8 @@ struct MockCommandQueueHwWithOverwrittenCsr : public CommandQueueHw<GfxFamily> {
|
|||
};
|
||||
|
||||
HWTEST_F(CommandQueueHwTest, givenFlushWhenFlushBatchedSubmissionsFailsThenErrorIsRetured) {
|
||||
|
||||
MockCommandQueueHwWithOverwrittenCsr<FamilyType> cmdQueue(context, pClDevice, nullptr, false);
|
||||
MockCommandStreamReceiverWithFailingFlushBatchedSubmission csr(*pDevice->executionEnvironment, 0);
|
||||
MockCommandStreamReceiverWithFailingFlushBatchedSubmission csr(*pDevice->executionEnvironment, 0, pDevice->getDeviceBitfield());
|
||||
cmdQueue.csr = &csr;
|
||||
cl_int errorCode = cmdQueue.flush();
|
||||
EXPECT_EQ(CL_OUT_OF_RESOURCES, errorCode);
|
||||
|
@ -1325,7 +1324,7 @@ HWTEST_F(CommandQueueHwTest, givenFlushWhenFlushBatchedSubmissionsFailsThenError
|
|||
|
||||
HWTEST_F(CommandQueueHwTest, givenFinishWhenFlushBatchedSubmissionsFailsThenErrorIsRetured) {
|
||||
MockCommandQueueHwWithOverwrittenCsr<FamilyType> cmdQueue(context, pClDevice, nullptr, false);
|
||||
MockCommandStreamReceiverWithFailingFlushBatchedSubmission csr(*pDevice->executionEnvironment, 0);
|
||||
MockCommandStreamReceiverWithFailingFlushBatchedSubmission csr(*pDevice->executionEnvironment, 0, pDevice->getDeviceBitfield());
|
||||
cmdQueue.csr = &csr;
|
||||
cl_int errorCode = cmdQueue.finish();
|
||||
EXPECT_EQ(CL_OUT_OF_RESOURCES, errorCode);
|
||||
|
|
|
@ -32,7 +32,7 @@ using namespace NEO;
|
|||
|
||||
HWTEST_F(EnqueueHandlerTest, WhenEnqueingHandlerWithKernelThenProcessEvictionOnCsrIsCalled) {
|
||||
int32_t tag;
|
||||
auto csr = new MockCsrBase<FamilyType>(tag, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto csr = new MockCsrBase<FamilyType>(tag, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(csr);
|
||||
|
||||
MockKernelWithInternals mockKernel(*pClDevice);
|
||||
|
@ -46,7 +46,7 @@ HWTEST_F(EnqueueHandlerTest, WhenEnqueingHandlerWithKernelThenProcessEvictionOnC
|
|||
|
||||
HWTEST_F(EnqueueHandlerTest, givenEnqueueHandlerWithKernelWhenAubCsrIsActiveThenAddCommentWithKernelName) {
|
||||
int32_t tag;
|
||||
auto aubCsr = new MockCsrAub<FamilyType>(tag, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = new MockCsrAub<FamilyType>(tag, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(aubCsr);
|
||||
|
||||
MockKernelWithInternals mockKernel(*pClDevice);
|
||||
|
@ -64,7 +64,7 @@ HWTEST_F(EnqueueHandlerTest, givenEnqueueHandlerWithKernelWhenAubCsrIsActiveThen
|
|||
|
||||
HWTEST_F(EnqueueHandlerTest, givenEnqueueHandlerWithKernelSplitWhenAubCsrIsActiveThenAddCommentWithKernelName) {
|
||||
int32_t tag;
|
||||
auto aubCsr = new MockCsrAub<FamilyType>(tag, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = new MockCsrAub<FamilyType>(tag, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(aubCsr);
|
||||
|
||||
MockKernelWithInternals kernel1(*pClDevice);
|
||||
|
@ -86,7 +86,7 @@ HWTEST_F(EnqueueHandlerTest, givenEnqueueHandlerWithKernelSplitWhenAubCsrIsActiv
|
|||
|
||||
HWTEST_F(EnqueueHandlerTest, givenEnqueueHandlerWithEmptyDispatchInfoWhenAubCsrIsActiveThenDontAddCommentWithKernelName) {
|
||||
int32_t tag;
|
||||
auto aubCsr = new MockCsrAub<FamilyType>(tag, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = new MockCsrAub<FamilyType>(tag, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(aubCsr);
|
||||
|
||||
MockKernelWithInternals mockKernel(*pClDevice);
|
||||
|
@ -124,7 +124,7 @@ HWTEST_F(EnqueueHandlerWithAubSubCaptureTests, givenEnqueueHandlerWithAubSubCapt
|
|||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.AUBDumpSubCaptureMode.set(1);
|
||||
|
||||
auto aubCsr = new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(aubCsr);
|
||||
|
||||
AubSubCaptureCommon subCaptureCommon;
|
||||
|
@ -146,7 +146,7 @@ HWTEST_F(EnqueueHandlerWithAubSubCaptureTests, givenEnqueueHandlerWithAubSubCapt
|
|||
DebugManager.flags.AUBDumpSubCaptureMode.set(1);
|
||||
DebugManager.flags.EnableTimestampPacket.set(true);
|
||||
|
||||
auto aubCsr = new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(aubCsr);
|
||||
|
||||
AubSubCaptureCommon subCaptureCommon;
|
||||
|
@ -191,7 +191,7 @@ class MyCommandQueueHw : public CommandQueueHw<GfxFamily> {
|
|||
|
||||
HWTEST_F(EnqueueHandlerTest, givenLocalWorkgroupSizeGreaterThenGlobalWorkgroupSizeWhenEnqueueKernelThenLwsIsClamped) {
|
||||
int32_t tag;
|
||||
auto csr = new MockCsrBase<FamilyType>(tag, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto csr = new MockCsrBase<FamilyType>(tag, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(csr);
|
||||
MockKernelWithInternals mockKernel(*pClDevice);
|
||||
auto mockProgram = mockKernel.mockProgram;
|
||||
|
@ -225,7 +225,7 @@ HWTEST_F(EnqueueHandlerTest, givenLocalWorkgroupSizeGreaterThenGlobalWorkgroupSi
|
|||
|
||||
HWTEST_F(EnqueueHandlerTest, givenLocalWorkgroupSizeGreaterThenGlobalWorkgroupSizeAndNonUniformWorkGroupWhenEnqueueKernelThenClIvalidWorkGroupSizeIsReturned) {
|
||||
int32_t tag;
|
||||
auto csr = new MockCsrBase<FamilyType>(tag, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto csr = new MockCsrBase<FamilyType>(tag, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(csr);
|
||||
MockKernelWithInternals mockKernel(*pClDevice);
|
||||
auto mockProgram = mockKernel.mockProgram;
|
||||
|
@ -240,7 +240,7 @@ HWTEST_F(EnqueueHandlerTest, givenLocalWorkgroupSizeGreaterThenGlobalWorkgroupSi
|
|||
|
||||
HWTEST_F(EnqueueHandlerTest, WhenEnqueuingHandlerCallOnEnqueueMarkerThenCallProcessEvictionOnCsrIsNotCalled) {
|
||||
int32_t tag;
|
||||
auto csr = new MockCsrBase<FamilyType>(tag, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto csr = new MockCsrBase<FamilyType>(tag, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(csr);
|
||||
|
||||
auto mockCmdQ = std::unique_ptr<MockCommandQueueHw<FamilyType>>(new MockCommandQueueHw<FamilyType>(context, pClDevice, 0));
|
||||
|
@ -257,7 +257,7 @@ HWTEST_F(EnqueueHandlerTest, WhenEnqueuingHandlerCallOnEnqueueMarkerThenCallProc
|
|||
|
||||
HWTEST_F(EnqueueHandlerTest, WhenEnqueuingHandlerForMarkerOnUnblockedQueueThenTaskLevelIsNotIncremented) {
|
||||
int32_t tag;
|
||||
auto csr = new MockCsrBase<FamilyType>(tag, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto csr = new MockCsrBase<FamilyType>(tag, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(csr);
|
||||
|
||||
auto mockCmdQ = std::unique_ptr<MockCommandQueueHw<FamilyType>>(new MockCommandQueueHw<FamilyType>(context, pClDevice, 0));
|
||||
|
@ -275,7 +275,7 @@ HWTEST_F(EnqueueHandlerTest, WhenEnqueuingHandlerForMarkerOnUnblockedQueueThenTa
|
|||
|
||||
HWTEST_F(EnqueueHandlerTest, WhenEnqueuingHandlerForMarkerOnBlockedQueueThenTaskLevelIsNotIncremented) {
|
||||
int32_t tag;
|
||||
auto csr = new MockCsrBase<FamilyType>(tag, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto csr = new MockCsrBase<FamilyType>(tag, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(csr);
|
||||
|
||||
auto mockCmdQ = std::unique_ptr<MockCommandQueueHw<FamilyType>>(new MockCommandQueueHw<FamilyType>(context, pClDevice, 0));
|
||||
|
@ -379,7 +379,7 @@ HWTEST_F(EnqueueHandlerTest, WhenEnqueuingWithOutputEventThenEventIsRegistered)
|
|||
}
|
||||
|
||||
HWTEST_F(EnqueueHandlerTest, givenEnqueueHandlerWhenAddPatchInfoCommentsForAUBDumpIsNotSetThenPatchInfoDataIsNotTransferredToCSR) {
|
||||
auto csr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto csr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
auto mockHelper = new MockFlatBatchBufferHelper<FamilyType>(*pDevice->executionEnvironment);
|
||||
csr->overwriteFlatBatchBufferHelper(mockHelper);
|
||||
pDevice->resetCommandStreamReceiver(csr);
|
||||
|
@ -401,7 +401,7 @@ HWTEST_F(EnqueueHandlerTest, givenEnqueueHandlerWhenAddPatchInfoCommentsForAUBDu
|
|||
DebugManager.flags.AddPatchInfoCommentsForAUBDump.set(true);
|
||||
DebugManager.flags.FlattenBatchBufferForAUBDump.set(true);
|
||||
|
||||
auto csr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto csr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
auto mockHelper = new MockFlatBatchBufferHelper<FamilyType>(*pDevice->executionEnvironment);
|
||||
csr->overwriteFlatBatchBufferHelper(mockHelper);
|
||||
pDevice->resetCommandStreamReceiver(csr);
|
||||
|
|
|
@ -574,7 +574,7 @@ HWTEST_F(EnqueueKernelTest, givenEnqueueWithGlobalWorkSizeWhenZeroValueIsPassedI
|
|||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenCommandStreamReceiverInBatchingModeWhenEnqueueKernelIsCalledThenKernelIsRecorded) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
|
@ -606,7 +606,7 @@ HWTEST_F(EnqueueKernelTest, givenReducedAddressSpaceGraphicsAllocationForHostPtr
|
|||
auto hwInfoToModify = *defaultHwInfo;
|
||||
hwInfoToModify.capabilityTable.gpuAddressSpace = MemoryConstants::max36BitAddress;
|
||||
device.reset(new MockClDevice{MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfoToModify)});
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->executionEnvironment, device->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->executionEnvironment, device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
device->resetCommandStreamReceiver(mockCsr);
|
||||
auto memoryManager = mockCsr->getMemoryManager();
|
||||
uint32_t hostPtr[10]{};
|
||||
|
@ -630,7 +630,7 @@ HWTEST_F(EnqueueKernelTest, givenReducedAddressSpaceGraphicsAllocationForHostPtr
|
|||
auto hwInfoToModify = *defaultHwInfo;
|
||||
hwInfoToModify.capabilityTable.gpuAddressSpace = MemoryConstants::max36BitAddress;
|
||||
device.reset(new MockClDevice{MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfoToModify)});
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->executionEnvironment, device->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->executionEnvironment, device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
device->resetCommandStreamReceiver(mockCsr);
|
||||
auto memoryManager = mockCsr->getMemoryManager();
|
||||
uint32_t hostPtr[10]{};
|
||||
|
@ -655,7 +655,7 @@ HWTEST_F(EnqueueKernelTest, givenFullAddressSpaceGraphicsAllocationWhenEnqueueKe
|
|||
hwInfoToModify = *defaultHwInfo;
|
||||
hwInfoToModify.capabilityTable.gpuAddressSpace = MemoryConstants::max48BitAddress;
|
||||
device.reset(new MockClDevice{MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfoToModify)});
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->executionEnvironment, device->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->executionEnvironment, device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
device->resetCommandStreamReceiver(mockCsr);
|
||||
auto memoryManager = mockCsr->getMemoryManager();
|
||||
uint32_t hostPtr[10]{};
|
||||
|
@ -691,7 +691,7 @@ HWTEST_F(EnqueueKernelTest, givenDefaultCommandStreamReceiverWhenClFlushIsCalled
|
|||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenCommandStreamReceiverInBatchingModeAndBatchedKernelWhenFlushIsCalledThenKernelIsSubmitted) {
|
||||
auto mockCsrmockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsrmockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
mockCsrmockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
mockCsrmockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsrmockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -714,7 +714,7 @@ HWTEST_F(EnqueueKernelTest, givenCommandStreamReceiverInBatchingModeAndBatchedKe
|
|||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenCommandStreamReceiverInBatchingModeAndBatchedKernelWhenFlushIsCalledTwiceThenNothingChanges) {
|
||||
auto mockCsrmockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsrmockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
mockCsrmockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsrmockCsr);
|
||||
|
||||
|
@ -763,7 +763,7 @@ HWTEST_F(EnqueueKernelTest, givenCommandStreamReceiverInBatchingModeWhenKernelIs
|
|||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenCommandStreamReceiverInBatchingModeWhenFlushIsCalledOnTwoBatchedKernelsThenTheyAreExecutedInOrder) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -783,7 +783,7 @@ HWTEST_F(EnqueueKernelTest, givenCommandStreamReceiverInBatchingModeWhenFlushIsC
|
|||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenFinishIsCalledThenBatchesSubmissionsAreFlushed) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -804,7 +804,7 @@ HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenFinishIsCalledThenBatchesS
|
|||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenThressEnqueueKernelsAreCalledThenBatchesSubmissionsAreFlushed) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -826,7 +826,7 @@ HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenThressEnqueueKernelsAreCal
|
|||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenWaitForEventsIsCalledThenBatchedSubmissionsAreFlushed) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -852,7 +852,7 @@ HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenWaitForEventsIsCalledThenB
|
|||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenCommandIsFlushedThenFlushStampIsUpdatedInCommandQueueCsrAndEvent) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -886,7 +886,7 @@ HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenCommandIsFlushedThenFlushS
|
|||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenNonBlockingMapFollowsNdrCallThenFlushStampIsUpdatedProperly) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
|
@ -904,7 +904,7 @@ HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenNonBlockingMapFollowsNdrCa
|
|||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenCommandWithEventIsFollowedByCommandWithoutEventThenFlushStampIsUpdatedInCommandQueueCsrAndEvent) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -938,7 +938,7 @@ HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenCommandWithEventIsFollowed
|
|||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenClFlushIsCalledThenQueueFlushStampIsUpdated) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -957,7 +957,7 @@ HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenClFlushIsCalledThenQueueFl
|
|||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenWaitForEventsIsCalledWithUnflushedTaskCountThenBatchedSubmissionsAreFlushed) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
|
@ -981,7 +981,7 @@ HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenWaitForEventsIsCalledWithU
|
|||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenFinishIsCalledWithUnflushedTaskCountThenBatchedSubmissionsAreFlushed) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
|
@ -1008,7 +1008,7 @@ HWTEST_F(EnqueueKernelTest, givenOutOfOrderCommandQueueWhenEnqueueKernelIsMadeTh
|
|||
const cl_queue_properties props[3] = {CL_QUEUE_PROPERTIES, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, 0};
|
||||
auto ooq = clCreateCommandQueueWithProperties(context, pClDevice, props, nullptr);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -1054,7 +1054,7 @@ HWTEST_F(EnqueueKernelTest, givenInOrderCommandQueueWhenEnqueueKernelThatHasShar
|
|||
const cl_queue_properties props[] = {0};
|
||||
auto inOrderQueue = clCreateCommandQueueWithProperties(context, pClDevice, props, nullptr);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -1077,7 +1077,7 @@ HWTEST_F(EnqueueKernelTest, givenInOrderCommandQueueWhenEnqueueKernelThatHasShar
|
|||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenInOrderCommandQueueWhenEnqueueKernelThatHasSharedObjectsAsArgIsMadeThenPipeControlDoesntHaveDcFlush) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
|
@ -1093,7 +1093,7 @@ HWTEST_F(EnqueueKernelTest, givenInOrderCommandQueueWhenEnqueueKernelReturningEv
|
|||
const cl_queue_properties props[] = {0};
|
||||
auto inOrderQueue = clCreateCommandQueueWithProperties(context, pClDevice, props, nullptr);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -1122,7 +1122,7 @@ HWTEST_F(EnqueueKernelTest, givenInOrderCommandQueueWhenEnqueueKernelReturningEv
|
|||
const cl_queue_properties props[] = {0};
|
||||
auto inOrderQueue = clCreateCommandQueueWithProperties(context, pClDevice, props, nullptr);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -1148,7 +1148,7 @@ HWTEST_F(EnqueueKernelTest, givenInOrderCommandQueueWhenEnqueueKernelReturningEv
|
|||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenOutOfOrderCommandQueueWhenEnqueueKernelReturningEventIsMadeThenPipeControlPositionIsRecorded) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -1178,7 +1178,7 @@ HWTEST_F(EnqueueKernelTest, givenOutOfOrderCommandQueueWhenEnqueueKernelReturnin
|
|||
HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenBlockingCallIsMadeThenEventAssociatedWithCommandHasProperFlushStamp) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.MakeEachEnqueueBlocking.set(true);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
|
@ -1195,7 +1195,7 @@ HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenBlockingCallIsMadeThenEven
|
|||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenKernelWhenItIsEnqueuedThenAllResourceGraphicsAllocationsAreUpdatedWithCsrTaskCount) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
MockKernelWithInternals mockKernel(*pClDevice);
|
||||
|
@ -1271,7 +1271,7 @@ TEST_F(EnqueueKernelTest, givenEnqueueCommandThatLocalWorkgroupSizeContainsZeroW
|
|||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenVMEKernelWhenEnqueueKernelThenDispatchFlagsHaveMediaSamplerRequired) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
|
@ -1283,7 +1283,7 @@ HWTEST_F(EnqueueKernelTest, givenVMEKernelWhenEnqueueKernelThenDispatchFlagsHave
|
|||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenNonVMEKernelWhenEnqueueKernelThenDispatchFlagsDoesntHaveMediaSamplerRequired) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
|
|
|
@ -439,7 +439,7 @@ INSTANTIATE_TEST_CASE_P(EnqueueKernel,
|
|||
typedef EnqueueKernelTypeTest<int> EnqueueKernelWithScratch;
|
||||
|
||||
HWTEST_P(EnqueueKernelWithScratch, GivenKernelRequiringScratchWhenItIsEnqueuedWithDifferentScratchSizesThenPreviousScratchAllocationIsMadeNonResidentPriorStoringOnResueList) {
|
||||
auto mockCsr = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
SPatchMediaVFEState mediaVFEstate;
|
||||
|
|
|
@ -14,7 +14,7 @@ typedef HelloWorldFixture<HelloWorldFixtureFactory> EnqueueKernelFixture;
|
|||
typedef Test<EnqueueKernelFixture> EnqueueKernelTest;
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenFinishIsCalledThenBatchesSubmissionsAreFlushed) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
|
|
@ -1786,7 +1786,7 @@ HWTEST_F(EnqueueSvmTest, GivenDstHostPtrWhenHostPtrAllocationCreationFailsThenRe
|
|||
void *pDstSVM = dstHostPtr;
|
||||
void *pSrcSVM = ptrSVM;
|
||||
MockCommandQueueHw<FamilyType> cmdQ(context, pClDevice, nullptr);
|
||||
auto failCsr = std::make_unique<FailCsr<FamilyType>>(*pDevice->getExecutionEnvironment(), pDevice->getRootDeviceIndex());
|
||||
auto failCsr = std::make_unique<FailCsr<FamilyType>>(*pDevice->getExecutionEnvironment(), pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
CommandStreamReceiver *oldCommandStreamReceiver = cmdQ.gpgpuEngine->commandStreamReceiver;
|
||||
cmdQ.gpgpuEngine->commandStreamReceiver = failCsr.get();
|
||||
retVal = cmdQ.enqueueSVMMemcpy(
|
||||
|
@ -1807,7 +1807,7 @@ HWTEST_F(EnqueueSvmTest, GivenSrcHostPtrAndSizeZeroWhenHostPtrAllocationCreation
|
|||
void *pDstSVM = ptrSVM;
|
||||
void *pSrcSVM = srcHostPtr;
|
||||
MockCommandQueueHw<FamilyType> cmdQ(context, pClDevice, nullptr);
|
||||
auto failCsr = std::make_unique<FailCsr<FamilyType>>(*pDevice->getExecutionEnvironment(), pDevice->getRootDeviceIndex());
|
||||
auto failCsr = std::make_unique<FailCsr<FamilyType>>(*pDevice->getExecutionEnvironment(), pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
CommandStreamReceiver *oldCommandStreamReceiver = cmdQ.gpgpuEngine->commandStreamReceiver;
|
||||
cmdQ.gpgpuEngine->commandStreamReceiver = failCsr.get();
|
||||
retVal = cmdQ.enqueueSVMMemcpy(
|
||||
|
@ -1829,7 +1829,7 @@ HWTEST_F(EnqueueSvmTest, givenDstHostPtrAndSrcHostPtrWhenHostPtrAllocationCreati
|
|||
void *pDstSVM = dstHostPtr;
|
||||
void *pSrcSVM = srcHostPtr;
|
||||
MockCommandQueueHw<FamilyType> cmdQ(context, pClDevice, nullptr);
|
||||
auto failCsr = std::make_unique<FailCsr<FamilyType>>(*pDevice->getExecutionEnvironment(), pDevice->getRootDeviceIndex());
|
||||
auto failCsr = std::make_unique<FailCsr<FamilyType>>(*pDevice->getExecutionEnvironment(), pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
CommandStreamReceiver *oldCommandStreamReceiver = cmdQ.gpgpuEngine->commandStreamReceiver;
|
||||
cmdQ.gpgpuEngine->commandStreamReceiver = failCsr.get();
|
||||
retVal = cmdQ.enqueueSVMMemcpy(
|
||||
|
|
|
@ -32,7 +32,7 @@ class CommandStreamReceiverMock : public UltCommandStreamReceiver<FamilyType> {
|
|||
|
||||
public:
|
||||
size_t expectedToFreeCount = (size_t)-1;
|
||||
CommandStreamReceiverMock(Device *pDevice) : UltCommandStreamReceiver<FamilyType>(*pDevice->getExecutionEnvironment(), pDevice->getRootDeviceIndex()) {
|
||||
CommandStreamReceiverMock(Device *pDevice) : UltCommandStreamReceiver<FamilyType>(*pDevice->getExecutionEnvironment(), pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()) {
|
||||
this->pDevice = pDevice;
|
||||
this->pClDevice = pDevice->getSpecializedDevice<ClDevice>();
|
||||
}
|
||||
|
|
|
@ -133,7 +133,7 @@ HWTEST_F(OOQTaskTests, givenCommandQueueWithLowerTaskLevelThenCsrWhenItIsSubmitt
|
|||
}
|
||||
|
||||
HWTEST_F(OOQTaskTests, givenCommandQueueAtTaskLevel100WhenMultipleEnqueueAreDoneThenTaskLevelDoesntChange) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
|
@ -150,7 +150,7 @@ HWTEST_F(OOQTaskTests, givenCommandQueueAtTaskLevel100WhenMultipleEnqueueAreDone
|
|||
}
|
||||
|
||||
HWTEST_F(OOQTaskTests, givenCommandQueueAtTaskLevel100WhenItIsFlushedAndFollowedByNewCommandsThenTheyHaveHigherTaskLevel) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
|
@ -171,7 +171,7 @@ HWTEST_F(OOQTaskTests, givenCommandQueueAtTaskLevel100WhenItIsFlushedAndFollowed
|
|||
}
|
||||
|
||||
HWTEST_F(OOQTaskTests, givenCommandQueueAtTaskLevel100WhenItIsFlushedAndFollowedByNewCommandsAndBarrierThenCsrTaskLevelIncreases) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
|
@ -193,7 +193,7 @@ HWTEST_F(OOQTaskTests, givenCommandQueueAtTaskLevel100WhenItIsFlushedAndFollowed
|
|||
}
|
||||
|
||||
HWTEST_F(OOQTaskTests, givenCommandQueueAtTaskLevel100WhenItIsFlushedAndFollowedByNewCommandsAndMarkerThenCsrTaskLevelIsNotIncreasing) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
|
@ -215,7 +215,7 @@ HWTEST_F(OOQTaskTests, givenCommandQueueAtTaskLevel100WhenItIsFlushedAndFollowed
|
|||
}
|
||||
|
||||
HWTEST_F(OOQTaskTests, givenTwoEnqueueCommandSynchronizedByEventsWhenTheyAreEnqueueThenSecondHasHigherTaskLevelThenFirst) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
|
|
|
@ -68,12 +68,12 @@ TEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenItIsCreat
|
|||
|
||||
hwInfo->platform.eRenderCoreFamily = GFXCORE_FAMILY_FORCE_ULONG; // wrong gfx core family
|
||||
|
||||
CommandStreamReceiver *aubCsr = AUBCommandStreamReceiver::create("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
CommandStreamReceiver *aubCsr = AUBCommandStreamReceiver::create("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
EXPECT_EQ(nullptr, aubCsr);
|
||||
}
|
||||
|
||||
TEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenTypeIsCheckedThenAubCsrIsReturned) {
|
||||
std::unique_ptr<CommandStreamReceiver> aubCsr(AUBCommandStreamReceiver::create("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<CommandStreamReceiver> aubCsr(AUBCommandStreamReceiver::create("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
EXPECT_NE(nullptr, aubCsr);
|
||||
EXPECT_EQ(CommandStreamReceiverType::CSR_AUB, aubCsr->getType());
|
||||
}
|
||||
|
@ -83,8 +83,8 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenItIsCre
|
|||
DebugManager.flags.UseAubStream.set(false);
|
||||
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get(), false, 1);
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, executionEnvironment, 0);
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, executionEnvironment, 0, deviceBitfield);
|
||||
ASSERT_NE(nullptr, aubCsr);
|
||||
|
||||
EXPECT_EQ(nullptr, aubCsr->aubManager);
|
||||
|
@ -94,64 +94,64 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenItIsCre
|
|||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCsrWhenItIsCreatedWithDefaultSettingsThenItHasBatchedDispatchModeEnabled) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.CsrDispatchMode.set(0);
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
EXPECT_EQ(DispatchMode::BatchedDispatch, aubCsr->peekDispatchMode());
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCsrWhenItIsCreatedWithDebugSettingsThenItHasProperDispatchModeEnabled) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.CsrDispatchMode.set(static_cast<uint32_t>(DispatchMode::ImmediateDispatch));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
EXPECT_EQ(DispatchMode::ImmediateDispatch, aubCsr->peekDispatchMode());
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenItIsCreatedThenMemoryManagerIsNotNull) {
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
std::unique_ptr<MemoryManager> memoryManager(new OsAgnosticMemoryManager(*pDevice->executionEnvironment));
|
||||
EXPECT_NE(nullptr, memoryManager.get());
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenMultipleInstancesAreCreatedThenTheyOperateOnSingleFileStream) {
|
||||
auto aubCsr1 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr2 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr1 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
auto aubCsr2 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
EXPECT_EQ(aubCsr1->stream, aubCsr2->stream);
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenMultipleInstancesAreCreatedThenTheyUseTheSameFileStream) {
|
||||
auto aubCsr1 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr1 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
auto streamProvider1 = pDevice->executionEnvironment->rootDeviceEnvironments[0]->aubCenter->getStreamProvider();
|
||||
EXPECT_NE(nullptr, streamProvider1);
|
||||
auto aubCsr2 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr2 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
auto streamProvider2 = pDevice->executionEnvironment->rootDeviceEnvironments[0]->aubCenter->getStreamProvider();
|
||||
EXPECT_NE(nullptr, streamProvider2);
|
||||
EXPECT_EQ(streamProvider1, streamProvider2);
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenMultipleInstancesAreCreatedThenTheyUseTheSamePhysicalAddressAllocator) {
|
||||
auto aubCsr1 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr1 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
auto physicalAddressAlocator1 = pDevice->executionEnvironment->rootDeviceEnvironments[0]->aubCenter->getPhysicalAddressAllocator();
|
||||
EXPECT_NE(nullptr, physicalAddressAlocator1);
|
||||
auto aubCsr2 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr2 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
auto physicalAddressAlocator2 = pDevice->executionEnvironment->rootDeviceEnvironments[0]->aubCenter->getPhysicalAddressAllocator();
|
||||
EXPECT_NE(nullptr, physicalAddressAlocator2);
|
||||
EXPECT_EQ(physicalAddressAlocator1, physicalAddressAlocator2);
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenMultipleInstancesAreCreatedThenTheyUseTheSameAddressMapper) {
|
||||
auto aubCsr1 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr1 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
auto addressMapper1 = pDevice->executionEnvironment->rootDeviceEnvironments[0]->aubCenter->getAddressMapper();
|
||||
EXPECT_NE(nullptr, addressMapper1);
|
||||
auto aubCsr2 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr2 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
auto addressMapper2 = pDevice->executionEnvironment->rootDeviceEnvironments[0]->aubCenter->getAddressMapper();
|
||||
EXPECT_NE(nullptr, addressMapper2);
|
||||
EXPECT_EQ(addressMapper1, addressMapper2);
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenMultipleInstancesAreCreatedThenTheyUseTheSameSubCaptureCommon) {
|
||||
auto aubCsr1 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr1 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
auto subCaptureCommon1 = pDevice->executionEnvironment->rootDeviceEnvironments[0]->aubCenter->getSubCaptureCommon();
|
||||
EXPECT_NE(nullptr, subCaptureCommon1);
|
||||
auto aubCsr2 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr2 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
auto subCaptureCommon2 = pDevice->executionEnvironment->rootDeviceEnvironments[0]->aubCenter->getSubCaptureCommon();
|
||||
EXPECT_NE(nullptr, subCaptureCommon2);
|
||||
EXPECT_EQ(subCaptureCommon1, subCaptureCommon2);
|
||||
|
@ -164,7 +164,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWithAubMana
|
|||
mockAubCenter->aubManager = std::unique_ptr<MockAubManager>(mockManager);
|
||||
pDevice->executionEnvironment->rootDeviceEnvironments[0]->aubCenter = std::unique_ptr<MockAubCenter>(mockAubCenter);
|
||||
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(static_cast<AUBCommandStreamReceiverHw<FamilyType> *>(AUBCommandStreamReceiver::create(fileName, true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex())));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(static_cast<AUBCommandStreamReceiverHw<FamilyType> *>(AUBCommandStreamReceiver::create(fileName, true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield())));
|
||||
ASSERT_NE(nullptr, aubCsr);
|
||||
|
||||
EXPECT_TRUE(aubCsr->isFileOpen());
|
||||
|
@ -180,7 +180,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCsrWhenOsContextIsSetThenCreateH
|
|||
mockAubCenter->aubManager = std::unique_ptr<MockAubManager>(mockManager);
|
||||
pDevice->executionEnvironment->rootDeviceEnvironments[0]->aubCenter = std::unique_ptr<MockAubCenter>(mockAubCenter);
|
||||
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(static_cast<AUBCommandStreamReceiverHw<FamilyType> *>(AUBCommandStreamReceiver::create(fileName, true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex())));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(static_cast<AUBCommandStreamReceiverHw<FamilyType> *>(AUBCommandStreamReceiver::create(fileName, true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield())));
|
||||
EXPECT_EQ(nullptr, aubCsr->hardwareContextController.get());
|
||||
|
||||
aubCsr->setupContext(osContext);
|
||||
|
@ -197,7 +197,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCsrWhenLowPriorityOsContextIsSet
|
|||
mockAubCenter->aubManager = std::unique_ptr<MockAubManager>(mockManager);
|
||||
pDevice->executionEnvironment->rootDeviceEnvironments[0]->aubCenter = std::unique_ptr<MockAubCenter>(mockAubCenter);
|
||||
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(static_cast<AUBCommandStreamReceiverHw<FamilyType> *>(AUBCommandStreamReceiver::create(fileName, true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex())));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(static_cast<AUBCommandStreamReceiverHw<FamilyType> *>(AUBCommandStreamReceiver::create(fileName, true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield())));
|
||||
EXPECT_EQ(nullptr, aubCsr->hardwareContextController.get());
|
||||
|
||||
aubCsr->setupContext(osContext);
|
||||
|
@ -210,14 +210,15 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptur
|
|||
std::string fileName = "file_name.aub";
|
||||
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get());
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(static_cast<AUBCommandStreamReceiverHw<FamilyType> *>(AUBCommandStreamReceiver::create(fileName, true, executionEnvironment, 0)));
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(static_cast<AUBCommandStreamReceiverHw<FamilyType> *>(AUBCommandStreamReceiver::create(fileName, true, executionEnvironment, 0, deviceBitfield)));
|
||||
EXPECT_NE(nullptr, aubCsr);
|
||||
EXPECT_FALSE(aubCsr->isFileOpen());
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenGraphicsAllocationWhenMakeResidentCalledMultipleTimesAffectsResidencyOnce) {
|
||||
std::unique_ptr<MemoryManager> memoryManager(nullptr);
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
memoryManager.reset(new OsAgnosticMemoryManager(*pDevice->executionEnvironment));
|
||||
aubCsr->setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
auto gfxAllocation = memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{pDevice->getRootDeviceIndex(), MemoryConstants::pageSize});
|
||||
|
@ -258,8 +259,8 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenMultipl
|
|||
auto engineInstance = HwHelper::get(hwInfo.platform.eRenderCoreFamily).getGpgpuEngineInstances(hwInfo)[0];
|
||||
MockOsContext osContext(0, 1, engineInstance.first, PreemptionMode::Disabled, false, false, false);
|
||||
|
||||
auto aubCsr1 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr2 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr1 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
auto aubCsr2 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
|
||||
aubCsr1->setupContext(osContext);
|
||||
aubCsr1->initializeEngine();
|
||||
|
@ -708,7 +709,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenProcess
|
|||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenWriteMemoryIsCalledOnBufferAndImageTypeAllocationsThenAllocationsHaveAubWritableSetToFalse) {
|
||||
std::unique_ptr<MemoryManager> memoryManager(nullptr);
|
||||
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
aubCsr->setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
memoryManager.reset(new OsAgnosticMemoryManager(*pDevice->executionEnvironment));
|
||||
|
||||
|
@ -742,7 +743,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenWriteMe
|
|||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenProcessResidencyIsCalledOnBufferAndImageAllocationsThenAllocationsTypesShouldBeMadeNonAubWritable) {
|
||||
std::unique_ptr<MemoryManager> memoryManager(nullptr);
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
memoryManager.reset(new OsAgnosticMemoryManager(*pDevice->executionEnvironment));
|
||||
aubCsr->setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
|
||||
|
@ -763,7 +764,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenProcess
|
|||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptureModWhenProcessResidencyIsCalledWithDumpAubNonWritableFlagThenAllocationsTypesShouldBeMadeAubWritable) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
std::unique_ptr<MemoryManager> memoryManager(nullptr);
|
||||
std::unique_ptr<MockAubCsrToTestDumpAubNonWritable<FamilyType>> aubCsr(new MockAubCsrToTestDumpAubNonWritable<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<MockAubCsrToTestDumpAubNonWritable<FamilyType>> aubCsr(new MockAubCsrToTestDumpAubNonWritable<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
memoryManager.reset(new OsAgnosticMemoryManager(*pDevice->executionEnvironment));
|
||||
aubCsr->setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
|
||||
|
@ -788,7 +789,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptur
|
|||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenProcessResidencyIsCalledWithoutDumpAubWritableFlagThenAllocationsTypesShouldBeKeptNonAubWritable) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
std::unique_ptr<MemoryManager> memoryManager(nullptr);
|
||||
std::unique_ptr<MockAubCsrToTestDumpAubNonWritable<FamilyType>> aubCsr(new MockAubCsrToTestDumpAubNonWritable<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<MockAubCsrToTestDumpAubNonWritable<FamilyType>> aubCsr(new MockAubCsrToTestDumpAubNonWritable<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
memoryManager.reset(new OsAgnosticMemoryManager(*pDevice->executionEnvironment));
|
||||
aubCsr->setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
|
||||
|
@ -812,7 +813,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenProcess
|
|||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenOsContextWithMultipleDevicesSupportedWhenSetupIsCalledThenCreateMultipleHardwareContexts) {
|
||||
MockOsContext osContext(1, 0b11, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
aubCsr->setupContext(osContext);
|
||||
|
||||
EXPECT_EQ(2u, aubCsr->hardwareContextController->hardwareContexts.size());
|
||||
|
@ -820,7 +821,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenOsContextWithMultipleDevicesSupport
|
|||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenGraphicsAllocationTypeIsntNonAubWritableThenWriteMemoryIsAllowed) {
|
||||
std::unique_ptr<MemoryManager> memoryManager(nullptr);
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
aubCsr->setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
|
||||
memoryManager.reset(new OsAgnosticMemoryManager(*pDevice->executionEnvironment));
|
||||
|
@ -834,7 +835,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenGraphic
|
|||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenGraphicsAllocationTypeIsNonAubWritableThenWriteMemoryIsNotAllowed) {
|
||||
std::unique_ptr<MemoryManager> memoryManager(nullptr);
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
memoryManager.reset(new OsAgnosticMemoryManager(*pDevice->executionEnvironment));
|
||||
aubCsr->setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
auto gfxAllocation = memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{pDevice->getRootDeviceIndex(), MemoryConstants::pageSize});
|
||||
|
@ -846,14 +847,14 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenGraphic
|
|||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenGraphicsAllocationSizeIsZeroThenWriteMemoryIsNotAllowed) {
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
MockGraphicsAllocation gfxAllocation((void *)0x1234, 0);
|
||||
aubCsr->setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
EXPECT_FALSE(aubCsr->writeMemory(gfxAllocation));
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenAllocationDataIsPassedInAllocationViewThenWriteMemoryIsAllowed) {
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
aubCsr->setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
size_t size = 100;
|
||||
auto ptr = std::make_unique<char[]>(size);
|
||||
|
@ -864,7 +865,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenAllocat
|
|||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenAllocationSizeInAllocationViewIsZeroThenWriteMemoryIsNotAllowed) {
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
AllocationView allocationView(0x1234, 0);
|
||||
aubCsr->setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
EXPECT_FALSE(aubCsr->writeMemory(allocationView));
|
||||
|
@ -874,7 +875,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenAUBDump
|
|||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.AUBDumpCaptureFileName.set("file_name.aub");
|
||||
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(static_cast<MockAubCsr<FamilyType> *>(AUBCommandStreamReceiver::create("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex())));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(static_cast<MockAubCsr<FamilyType> *>(AUBCommandStreamReceiver::create("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield())));
|
||||
EXPECT_NE(nullptr, aubCsr);
|
||||
|
||||
EXPECT_TRUE(aubCsr->isFileOpen());
|
||||
|
@ -883,7 +884,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenAUBDump
|
|||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptureModeWhenAubSubCaptureIsActivatedThenFileIsOpened) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
|
@ -906,7 +907,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptur
|
|||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptureModeWhenAubSubCaptureRemainsActivedThenTheSameFileShouldBeKeptOpened) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
|
@ -930,7 +931,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptur
|
|||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptureModeWhenAubSubCaptureIsActivatedWithNewFileNameThenNewFileShouldBeReOpened) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
std::string newFileName = "new_file_name.aub";
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
|
@ -959,7 +960,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptur
|
|||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptureModeWhenAubSubCaptureIsActivatedForNewFileThenOldEngineInfoShouldBeFreed) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
std::string newFileName = "new_file_name.aub";
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
|
@ -988,7 +989,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptur
|
|||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptureModeWhenAubSubCaptureIsActivatedThenForceDumpingAllocationsAubNonWritable) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
std::unique_ptr<MockAubCsrToTestDumpAubNonWritable<FamilyType>> aubCsr(new MockAubCsrToTestDumpAubNonWritable<FamilyType>("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<MockAubCsrToTestDumpAubNonWritable<FamilyType>> aubCsr(new MockAubCsrToTestDumpAubNonWritable<FamilyType>("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
|
@ -1008,7 +1009,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptur
|
|||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptureModeWhenAubSubCaptureRemainsActivatedThenDontForceDumpingAllocationsAubNonWritable) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
std::unique_ptr<MockAubCsrToTestDumpAubNonWritable<FamilyType>> aubCsr(new MockAubCsrToTestDumpAubNonWritable<FamilyType>("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<MockAubCsrToTestDumpAubNonWritable<FamilyType>> aubCsr(new MockAubCsrToTestDumpAubNonWritable<FamilyType>("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
|
@ -1028,7 +1029,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptur
|
|||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptureModeWhenSubCaptureModeRemainsDeactivatedThenSubCaptureIsDisabled) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
|
@ -1049,7 +1050,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptur
|
|||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptureModeWhenSubCaptureIsToggledOnThenSubCaptureGetsEnabled) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
|
@ -1069,7 +1070,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptur
|
|||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInStandaloneAndSubCaptureModeWhenSubCaptureRemainsDeactivatedThenNeitherProgrammingFlagsAreInitializedNorCsrIsFlushed) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
|
@ -1089,7 +1090,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInStandalon
|
|||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInStandaloneAndSubCaptureModeWhenSubCaptureRemainsActivatedThenNeitherProgrammingFlagsAreInitializedNorCsrIsFlushed) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
|
@ -1109,7 +1110,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInStandalon
|
|||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInStandaloneAndSubCaptureModeWhenSubCaptureGetsActivatedThenProgrammingFlagsAreInitialized) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
|
@ -1130,7 +1131,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInStandalon
|
|||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInStandaloneAndSubCaptureModeWhenSubCaptureGetsDeactivatedThenCsrIsFlushed) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
|
|
|
@ -40,7 +40,7 @@ using namespace NEO;
|
|||
using AubCommandStreamReceiverTests = Test<AubCommandStreamReceiverFixture>;
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenForcedBatchBufferFlatteningInImmediateDispatchModeThenNewCombinedBatchBufferIsCreated) {
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
std::unique_ptr<MemoryManager> memoryManager(new OsAgnosticMemoryManager(*pDevice->executionEnvironment));
|
||||
auto flatBatchBufferHelper = new FlatBatchBufferHelperHw<FamilyType>(*pDevice->executionEnvironment);
|
||||
aubCsr->overwriteFlatBatchBufferHelper(flatBatchBufferHelper);
|
||||
|
@ -69,7 +69,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenForcedB
|
|||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenForcedBatchBufferInImmediateDispatchModeAndNoChainedBatchBufferThenCombinedBatchBufferIsNotCreated) {
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
std::unique_ptr<MemoryManager> memoryManager(new OsAgnosticMemoryManager(*pDevice->executionEnvironment));
|
||||
auto flatBatchBufferHelper = new FlatBatchBufferHelperHw<FamilyType>(*pDevice->executionEnvironment);
|
||||
aubCsr->overwriteFlatBatchBufferHelper(flatBatchBufferHelper);
|
||||
|
@ -92,7 +92,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenForcedB
|
|||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenForcedBatchBufferAndNotImmediateOrBatchedDispatchModeThenCombinedBatchBufferIsNotCreated) {
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
std::unique_ptr<MemoryManager> memoryManager(new OsAgnosticMemoryManager(*pDevice->executionEnvironment));
|
||||
auto flatBatchBufferHelper = new FlatBatchBufferHelperHw<FamilyType>(*pDevice->executionEnvironment);
|
||||
aubCsr->overwriteFlatBatchBufferHelper(flatBatchBufferHelper);
|
||||
|
@ -375,7 +375,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenGetIndi
|
|||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenGetIndirectPatchCommandsIsCalledForNonEmptyPatchInfoListThenIndirectPatchCommandBufferIsCreated) {
|
||||
typedef typename FamilyType::MI_STORE_DATA_IMM MI_STORE_DATA_IMM;
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
|
||||
PatchInfoData patchInfo1(0xA000, 0u, PatchInfoAllocationType::KernelArg, 0x6000, 0x100, PatchInfoAllocationType::IndirectObjectHeap);
|
||||
PatchInfoData patchInfo2(0xB000, 0u, PatchInfoAllocationType::KernelArg, 0x6000, 0x200, PatchInfoAllocationType::IndirectObjectHeap);
|
||||
|
@ -397,7 +397,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenGetIndi
|
|||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, GivenAubCommandStreamReceiverWhenGetIndirectPatchCommandsIsCalledFor64BitAddressingModeThenDwordLengthAndStoreQwordAreSetCorrectly) {
|
||||
using MI_STORE_DATA_IMM = typename FamilyType::MI_STORE_DATA_IMM;
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
|
||||
PatchInfoData patchInfo(0xA000, 0u, PatchInfoAllocationType::KernelArg, 0x6000, 0x100, PatchInfoAllocationType::IndirectObjectHeap, sizeof(uint64_t));
|
||||
aubCsr->getFlatBatchBufferHelper().setPatchInfoData(patchInfo);
|
||||
|
@ -416,7 +416,7 @@ HWTEST_F(AubCommandStreamReceiverTests, GivenAubCommandStreamReceiverWhenGetIndi
|
|||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, GivenAubCommandStreamReceiverWhenGetIndirectPatchCommandsIsCalledFor32BitAddressingModeThenDwordLengthAndSetStoreDwordAreSetCorrectly) {
|
||||
using MI_STORE_DATA_IMM = typename FamilyType::MI_STORE_DATA_IMM;
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
|
||||
PatchInfoData patchInfo(0xA000, 0u, PatchInfoAllocationType::KernelArg, 0x6000, 0x100, PatchInfoAllocationType::IndirectObjectHeap, sizeof(uint32_t));
|
||||
aubCsr->getFlatBatchBufferHelper().setPatchInfoData(patchInfo);
|
||||
|
@ -438,7 +438,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenAddBatc
|
|||
DebugManagerStateRestore dbgRestore;
|
||||
DebugManager.flags.FlattenBatchBufferForAUBDump.set(true);
|
||||
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
|
||||
MI_BATCH_BUFFER_START bbStart;
|
||||
|
||||
|
@ -500,10 +500,10 @@ HWTEST_F(AubCommandStreamReceiverNoHostPtrTests, givenAubCommandStreamReceiverWh
|
|||
executionEnvironment->memoryManager.reset(memoryManager);
|
||||
auto hwInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo();
|
||||
auto engineInstance = HwHelper::get(hwInfo->platform.eRenderCoreFamily).getGpgpuEngineInstances(*hwInfo)[0];
|
||||
|
||||
MockOsContext osContext(0, 1, engineInstance.first, PreemptionMode::Disabled,
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
MockOsContext osContext(0, deviceBitfield, engineInstance.first, PreemptionMode::Disabled,
|
||||
false, false, false);
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *executionEnvironment, 0));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *executionEnvironment, 0, deviceBitfield));
|
||||
aubCsr->setupContext(osContext);
|
||||
|
||||
cl_image_desc imgDesc = {};
|
||||
|
@ -533,9 +533,9 @@ HWTEST_F(AubCommandStreamReceiverNoHostPtrTests, givenAubCommandStreamReceiverWh
|
|||
ExecutionEnvironment *executionEnvironment = platform()->peekExecutionEnvironment();
|
||||
auto memoryManager = new OsAgnosticMemoryManagerForImagesWithNoHostPtr(*executionEnvironment);
|
||||
executionEnvironment->memoryManager.reset(memoryManager);
|
||||
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *executionEnvironment, 0));
|
||||
auto osContext = memoryManager->createAndRegisterOsContext(aubCsr.get(), getChosenEngineType(*defaultHwInfo), 0,
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *executionEnvironment, 0, deviceBitfield));
|
||||
auto osContext = memoryManager->createAndRegisterOsContext(aubCsr.get(), getChosenEngineType(*defaultHwInfo), deviceBitfield,
|
||||
PreemptionMode::Disabled,
|
||||
false, false, false);
|
||||
aubCsr->setupContext(*osContext);
|
||||
|
@ -549,19 +549,19 @@ HWTEST_F(AubCommandStreamReceiverNoHostPtrTests, givenAubCommandStreamReceiverWh
|
|||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenNoDbgDeviceIdFlagWhenAubCsrIsCreatedThenUseDefaultDeviceId) {
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
EXPECT_EQ(pDevice->getHardwareInfo().capabilityTable.aubDeviceId, aubCsr->aubDeviceId);
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenDbgDeviceIdFlagIsSetWhenAubCsrIsCreatedThenUseDebugDeviceId) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.OverrideAubDeviceId.set(9); //this is Hsw, not used
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
EXPECT_EQ(9u, aubCsr->aubDeviceId);
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenGetGTTDataIsCalledThenLocalMemoryIsSetAccordingToCsrFeature) {
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
AubGTTData data = {};
|
||||
aubCsr->getGTTData(nullptr, data);
|
||||
EXPECT_TRUE(data.present);
|
||||
|
@ -587,7 +587,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenPhysicalAddressWhenSetGttEntryIsCal
|
|||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, whenGetMemoryBankForGttIsCalledThenCorrectBankIsReturned) {
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
aubCsr->localMemoryEnabled = false;
|
||||
|
||||
aubCsr->setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
|
@ -596,7 +596,7 @@ HWTEST_F(AubCommandStreamReceiverTests, whenGetMemoryBankForGttIsCalledThenCorre
|
|||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenEntryBitsPresentAndWritableWhenGetAddressSpaceFromPTEBitsIsCalledThenTraceNonLocalIsReturned) {
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
|
||||
auto space = aubCsr->getAddressSpaceFromPTEBits(PageTableEntry::presentBit | PageTableEntry::writableBit);
|
||||
EXPECT_EQ(AubMemDump::AddressSpaceValues::TraceNonlocal, space);
|
||||
|
@ -621,7 +621,7 @@ struct MockAubCsrToTestExternalAllocations : public AUBCommandStreamReceiverHw<G
|
|||
};
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenMakeResidentExternalIsCalledThenGivenAllocationViewShouldBeAddedToExternalAllocations) {
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestExternalAllocations<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestExternalAllocations<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
size_t size = 100;
|
||||
auto ptr = std::make_unique<char[]>(size);
|
||||
auto addr = reinterpret_cast<uint64_t>(ptr.get());
|
||||
|
@ -635,7 +635,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenMakeRes
|
|||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenMakeNonResidentExternalIsCalledThenMatchingAllocationViewShouldBeRemovedFromExternalAllocations) {
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestExternalAllocations<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestExternalAllocations<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
size_t size = 100;
|
||||
auto ptr = std::make_unique<char[]>(size);
|
||||
auto addr = reinterpret_cast<uint64_t>(ptr.get());
|
||||
|
@ -648,7 +648,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenMakeNon
|
|||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenMakeNonResidentExternalIsCalledThenNonMatchingAllocationViewShouldNotBeRemovedFromExternalAllocations) {
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestExternalAllocations<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestExternalAllocations<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
size_t size = 100;
|
||||
auto ptr = std::make_unique<char[]>(size);
|
||||
auto addr = reinterpret_cast<uint64_t>(ptr.get());
|
||||
|
@ -661,7 +661,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenMakeNon
|
|||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenProcessResidencyIsCalledThenExternalAllocationsShouldBeMadeResident) {
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestExternalAllocations<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestExternalAllocations<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
size_t size = 100;
|
||||
auto ptr = std::make_unique<char[]>(size);
|
||||
auto addr = reinterpret_cast<uint64_t>(ptr.get());
|
||||
|
@ -679,7 +679,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenProcess
|
|||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenProcessResidencyIsCalledThenExternalAllocationWithZeroSizeShouldNotBeMadeResident) {
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestExternalAllocations<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestExternalAllocations<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
AllocationView externalAllocation(0, 0);
|
||||
aubCsr->makeResidentExternal(externalAllocation);
|
||||
|
||||
|
@ -696,7 +696,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenProcess
|
|||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenWriteMemoryIsCalledThenGraphicsAllocationSizeIsReadCorrectly) {
|
||||
pDevice->executionEnvironment->rootDeviceEnvironments[0]->aubCenter.reset(new AubCenter());
|
||||
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
aubCsr->setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
std::unique_ptr<MemoryManager> memoryManager(new OsAgnosticMemoryManager(*pDevice->executionEnvironment));
|
||||
|
||||
|
@ -735,7 +735,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenWriteMe
|
|||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, whenAubCommandStreamReceiverIsCreatedThenPPGTTAndGGTTCreatedHavePhysicalAddressAllocatorSet) {
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
ASSERT_NE(nullptr, aubCsr->ppgtt.get());
|
||||
ASSERT_NE(nullptr, aubCsr->ggtt.get());
|
||||
|
||||
|
@ -751,11 +751,12 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenEngineI
|
|||
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get());
|
||||
auto hwInfo = executionEnvironment.rootDeviceEnvironments[0]->getHardwareInfo();
|
||||
auto engineInstance = HwHelper::get(hwInfo->platform.eRenderCoreFamily).getGpgpuEngineInstances(*hwInfo)[0];
|
||||
MockOsContext osContext(0, 1, engineInstance.first, PreemptionMode::Disabled,
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
MockOsContext osContext(0, deviceBitfield, engineInstance.first, PreemptionMode::Disabled,
|
||||
false, false, false);
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestDumpContext<FamilyType>>("", true, executionEnvironment, 0);
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestDumpContext<FamilyType>>("", true, executionEnvironment, 0, deviceBitfield);
|
||||
EXPECT_NE(nullptr, aubCsr);
|
||||
EXPECT_EQ(nullptr, aubCsr->hardwareContextController.get());
|
||||
aubCsr->aubManager = nullptr;
|
||||
|
@ -771,7 +772,7 @@ HWTEST_F(InjectMmmioTest, givenAddMmioKeySetToZeroWhenInitAdditionalMmioCalledTh
|
|||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.AubDumpAddMmioRegistersList.set("");
|
||||
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestDumpContext<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestDumpContext<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
EXPECT_NE(nullptr, aubCsr);
|
||||
|
||||
auto stream = std::make_unique<MockAubFileStreamMockMmioWrite>();
|
||||
|
@ -788,7 +789,7 @@ HWTEST_F(InjectMmmioTest, givenAddMmioRegistersListSetWhenInitAdditionalMmioCall
|
|||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.AubDumpAddMmioRegistersList.set(registers);
|
||||
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestDumpContext<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestDumpContext<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
EXPECT_NE(nullptr, aubCsr);
|
||||
|
||||
auto stream = std::make_unique<MockAubFileStreamMockMmioWrite>();
|
||||
|
@ -805,7 +806,7 @@ HWTEST_F(InjectMmmioTest, givenLongSequenceOfAddMmioRegistersListSetWhenInitAddi
|
|||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.AubDumpAddMmioRegistersList.set(registers);
|
||||
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestDumpContext<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestDumpContext<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
EXPECT_NE(nullptr, aubCsr);
|
||||
|
||||
auto stream = std::make_unique<MockAubFileStreamMockMmioWrite>();
|
||||
|
@ -823,7 +824,7 @@ HWTEST_F(InjectMmmioTest, givenSequenceWithIncompletePairOfAddMmioRegistersListS
|
|||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.AubDumpAddMmioRegistersList.set(registers);
|
||||
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestDumpContext<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestDumpContext<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
EXPECT_NE(nullptr, aubCsr);
|
||||
|
||||
auto stream = std::make_unique<MockAubFileStreamMockMmioWrite>();
|
||||
|
@ -842,7 +843,7 @@ HWTEST_F(InjectMmmioTest, givenAddMmioRegistersListSetWithSemicolonAtTheEndWhenI
|
|||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.AubDumpAddMmioRegistersList.set(registers);
|
||||
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestDumpContext<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestDumpContext<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
EXPECT_NE(nullptr, aubCsr);
|
||||
|
||||
auto stream = std::make_unique<MockAubFileStreamMockMmioWrite>();
|
||||
|
@ -859,7 +860,7 @@ HWTEST_F(InjectMmmioTest, givenAddMmioRegistersListSetWithInvalidValueWhenInitAd
|
|||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.AubDumpAddMmioRegistersList.set(registers);
|
||||
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestDumpContext<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestDumpContext<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
EXPECT_NE(nullptr, aubCsr);
|
||||
|
||||
auto stream = std::make_unique<MockAubFileStreamMockMmioWrite>();
|
||||
|
@ -885,7 +886,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCsrWhenAskedForMemoryExpectation
|
|||
uint32_t compareEqual = AubMemDump::CmdServicesMemTraceMemoryCompare::CompareOperationValues::CompareEqual;
|
||||
|
||||
auto mockStream = std::make_unique<MockAubFileStream>();
|
||||
MyMockAubCsr myMockCsr(std::string(), true, *pDevice->getExecutionEnvironment(), pDevice->getRootDeviceIndex());
|
||||
MyMockAubCsr myMockCsr(std::string(), true, *pDevice->getExecutionEnvironment(), pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
myMockCsr.setupContext(pDevice->commandStreamReceivers[0]->getOsContext());
|
||||
myMockCsr.stream = mockStream.get();
|
||||
|
||||
|
@ -899,17 +900,17 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCsrWhenAskedForMemoryExpectation
|
|||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenObtainingPreferredTagPoolSizeThenReturnOne) {
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
EXPECT_EQ(1u, aubCsr->getPreferredTagPoolSize());
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenSshSizeIsObtainedItEqualsTo64KB) {
|
||||
auto aubCsr = std::make_unique<MockAubCsr<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = std::make_unique<MockAubCsr<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
EXPECT_EQ(64 * KB, aubCsr->defaultSshSize);
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenPhysicalAddressAllocatorIsCreatedThenItIsNotNull) {
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
std::unique_ptr<PhysicalAddressAllocator> allocator(aubCsr.createPhysicalAddressAllocator(&hardwareInfo));
|
||||
ASSERT_NE(nullptr, allocator);
|
||||
}
|
||||
|
@ -918,7 +919,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenGraphicsAllocationWritableWhenDumpA
|
|||
DebugManagerStateRestore dbgRestore;
|
||||
DebugManager.flags.AUBDumpBufferFormat.set("BIN");
|
||||
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled,
|
||||
false, false, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
|
@ -941,7 +942,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenBcsEngineWhenDumpAllocationCalledTh
|
|||
DebugManagerStateRestore dbgRestore;
|
||||
DebugManager.flags.AUBDumpBufferFormat.set("BIN");
|
||||
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_BCS, PreemptionMode::Disabled,
|
||||
false, false, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
|
@ -969,7 +970,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenCompressedGraphicsAllocationWritabl
|
|||
mockAubCenter->aubManager = std::make_unique<MockAubManager>();
|
||||
|
||||
pDevice->executionEnvironment->rootDeviceEnvironments[0]->aubCenter.reset(mockAubCenter);
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled,
|
||||
false, false, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
|
@ -991,7 +992,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenCompressedGraphicsAllocationWritabl
|
|||
HWTEST_F(AubCommandStreamReceiverTests, givenGraphicsAllocationWritableWhenDumpAllocationIsCalledButDumpFormatIsNotSpecifiedThenGraphicsAllocationShouldNotBeDumped) {
|
||||
DebugManagerStateRestore dbgRestore;
|
||||
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled,
|
||||
false, false, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
|
@ -1015,7 +1016,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenGraphicsAllocationNonWritableWhenDu
|
|||
DebugManagerStateRestore dbgRestore;
|
||||
DebugManager.flags.AUBDumpBufferFormat.set("BIN");
|
||||
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled,
|
||||
false, false, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
|
@ -1040,7 +1041,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenGraphicsAllocationNotDumpableWhenDu
|
|||
DebugManager.flags.AUBDumpAllocsOnEnqueueReadOnly.set(true);
|
||||
DebugManager.flags.AUBDumpBufferFormat.set("BIN");
|
||||
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled,
|
||||
false, false, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
|
@ -1066,7 +1067,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenGraphicsAllocationDumpableWhenDumpA
|
|||
DebugManager.flags.AUBDumpAllocsOnEnqueueReadOnly.set(true);
|
||||
DebugManager.flags.AUBDumpBufferFormat.set("BIN");
|
||||
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled,
|
||||
false, false, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
|
@ -1135,7 +1136,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenGraphicsAllocationWhenDumpAllocatio
|
|||
DebugManager.flags.AUBDumpAllocsOnEnqueueSVMMemcpyOnly.set(true);
|
||||
DebugManager.flags.AUBDumpBufferFormat.set("BIN");
|
||||
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
|
||||
|
@ -1163,7 +1164,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenGraphicsAllocationWritableWhenDumpA
|
|||
DebugManagerStateRestore dbgRestore;
|
||||
DebugManager.flags.AUBDumpBufferFormat.set("BIN");
|
||||
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled,
|
||||
false, false, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
|
@ -1196,8 +1197,8 @@ HWTEST_F(SimulatedCsrTest, givenAubCsrTypeWhenCreateCommandStreamReceiverThenPro
|
|||
|
||||
EXPECT_EQ(nullptr, executionEnvironment.rootDeviceEnvironments[expectedRootDeviceIndex]->aubCenter.get());
|
||||
EXPECT_FALSE(rootDeviceEnvironment->initAubCenterCalled);
|
||||
|
||||
auto csr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, executionEnvironment, expectedRootDeviceIndex);
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
auto csr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, executionEnvironment, expectedRootDeviceIndex, deviceBitfield);
|
||||
EXPECT_TRUE(rootDeviceEnvironment->initAubCenterCalled);
|
||||
EXPECT_NE(nullptr, executionEnvironment.rootDeviceEnvironments[expectedRootDeviceIndex]->aubCenter.get());
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ using ::testing::Return;
|
|||
using AubFileStreamTests = Test<AubCommandStreamReceiverFixture>;
|
||||
|
||||
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenInitFileIsCalledWithInvalidFileNameThenFileIsNotOpened) {
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
std::string invalidFileName = "";
|
||||
|
||||
EXPECT_THROW(aubCsr->initFile(invalidFileName), std::exception);
|
||||
|
@ -48,7 +48,8 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenInitFileIsCalledWi
|
|||
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWithoutAubManagerWhenInitFileIsCalledWithInvalidFileNameThenFileIsNotOpened) {
|
||||
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get());
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, executionEnvironment, 0);
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, executionEnvironment, 0, deviceBitfield);
|
||||
std::string invalidFileName = "";
|
||||
aubCsr->aubManager = nullptr;
|
||||
|
||||
|
@ -56,7 +57,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWithoutAubManagerWhenI
|
|||
}
|
||||
|
||||
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenInitFileIsCalledThenFileIsOpenedAndFileNameIsStored) {
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
std::string fileName = "file_name.aub";
|
||||
|
||||
aubCsr->initFile(fileName);
|
||||
|
@ -69,7 +70,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenInitFileIsCalledTh
|
|||
}
|
||||
|
||||
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenReopenFileIsCalledThenFileWithSpecifiedNameIsReopened) {
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
std::string fileName = "file_name.aub";
|
||||
std::string newFileName = "new_file_name.aub";
|
||||
|
||||
|
@ -84,7 +85,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenReopenFileIsCalled
|
|||
|
||||
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWithoutAubManagerWhenInitFileIsCalledThenFileShouldBeInitializedWithHeaderOnce) {
|
||||
auto mockAubFileStream = std::make_unique<MockAubFileStream>();
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
std::string fileName = "file_name.aub";
|
||||
aubCsr->aubManager = nullptr;
|
||||
aubCsr->stream = mockAubFileStream.get();
|
||||
|
@ -98,7 +99,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWithoutAubManagerWhenI
|
|||
|
||||
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWithAubManagerWhenInitFileIsCalledThenFileShouldBeInitializedOnce) {
|
||||
auto mockAubManager = std::make_unique<MockAubManager>();
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
std::string fileName = "file_name.aub";
|
||||
aubCsr->aubManager = mockAubManager.get();
|
||||
|
||||
|
@ -110,7 +111,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWithAubManagerWhenInit
|
|||
|
||||
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWithoutAubManagerWhenFileFunctionsAreCalledThenTheyShouldCallTheExpectedAubManagerFunctions) {
|
||||
auto mockAubFileStream = std::make_unique<MockAubFileStream>();
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
std::string fileName = "file_name.aub";
|
||||
aubCsr->aubManager = nullptr;
|
||||
aubCsr->stream = mockAubFileStream.get();
|
||||
|
@ -132,7 +133,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWithoutAubManagerWhenF
|
|||
|
||||
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWithAubManagerWhenFileFunctionsAreCalledThenTheyShouldCallTheExpectedAubManagerFunctions) {
|
||||
auto mockAubManager = std::make_unique<MockAubManager>();
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
std::string fileName = "file_name.aub";
|
||||
aubCsr->aubManager = mockAubManager.get();
|
||||
|
||||
|
@ -153,7 +154,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWithAubManagerWhenFile
|
|||
|
||||
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenOpenFileIsCalledThenFileStreamShouldBeLocked) {
|
||||
auto mockAubFileStream = std::make_unique<MockAubFileStream>();
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
std::string fileName = "file_name.aub";
|
||||
|
||||
aubCsr->stream = mockAubFileStream.get();
|
||||
|
@ -164,7 +165,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenOpenFileIsCalledTh
|
|||
|
||||
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenReopenFileIsCalledThenFileStreamShouldBeLocked) {
|
||||
auto mockAubFileStream = std::make_unique<MockAubFileStream>();
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
std::string fileName = "file_name.aub";
|
||||
|
||||
aubCsr->stream = mockAubFileStream.get();
|
||||
|
@ -298,7 +299,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenCallingAddAubComme
|
|||
}
|
||||
|
||||
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWithAubManagerWhenCallingAddAubCommentThenCallAddCommentOnAubManager) {
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled,
|
||||
false, false, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
|
@ -380,7 +381,7 @@ HWTEST_F(AubFileStreamTests, givenNoNewTaskSinceLastPollWhenDeletingAubCsrThenDo
|
|||
}
|
||||
|
||||
HWTEST_F(AubFileStreamTests, givenNewTasksAndHardwareContextPresentWhenCallingPollForCompletionThenCallPollForCompletion) {
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled,
|
||||
false, false, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
|
@ -395,7 +396,7 @@ HWTEST_F(AubFileStreamTests, givenNewTasksAndHardwareContextPresentWhenCallingPo
|
|||
}
|
||||
|
||||
HWTEST_F(AubFileStreamTests, givenNoNewTasksAndHardwareContextPresentWhenCallingPollForCompletionThenDontCallPollForCompletion) {
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled,
|
||||
false, false, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
|
@ -492,7 +493,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWithHardwareContextInS
|
|||
DebugManagerStateRestore stateRestore;
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto aubSubCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled,
|
||||
false, false, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
|
@ -517,7 +518,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWithHardwareContextInS
|
|||
DebugManagerStateRestore stateRestore;
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto aubSubCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled,
|
||||
false, false, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
|
@ -569,7 +570,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenExpectMemoryNotEqu
|
|||
}
|
||||
|
||||
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenFlushIsCalledThenItShouldCallTheExpectedHwContextFunctions) {
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled,
|
||||
false, false, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
|
@ -594,7 +595,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenFlushIsCalledThenI
|
|||
}
|
||||
|
||||
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenFlushIsCalledWithZeroSizedBufferThenSubmitIsNotCalledOnHwContext) {
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled,
|
||||
false, false, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
|
@ -615,7 +616,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenFlushIsCalledWithZ
|
|||
}
|
||||
|
||||
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenMakeResidentIsCalledThenItShouldCallTheExpectedHwContextFunctions) {
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled,
|
||||
false, false, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
|
@ -628,7 +629,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenMakeResidentIsCall
|
|||
}
|
||||
|
||||
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenExpectMemoryEqualIsCalledThenItShouldCallTheExpectedHwContextFunctions) {
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled,
|
||||
false, false, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
|
@ -641,7 +642,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenExpectMemoryEqualI
|
|||
}
|
||||
|
||||
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenExpectMemoryNotEqualIsCalledThenItShouldCallTheExpectedHwContextFunctions) {
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled,
|
||||
false, false, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
|
@ -670,7 +671,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenFlushIsCalledThenF
|
|||
|
||||
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenExpectMemoryIsCalledThenPageWalkIsCallingStreamsExpectMemory) {
|
||||
auto mockAubFileStream = std::make_unique<MockAubFileStream>();
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
aubCsr->setupContext(pDevice->commandStreamReceivers[0]->getOsContext());
|
||||
|
||||
aubCsr->stream = mockAubFileStream.get();
|
||||
|
@ -690,7 +691,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenExpectMemoryIsCall
|
|||
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWithoutAubManagerWhenExpectMMIOIsCalledThenTheCorrectFunctionIsCalledFromAubFileStream) {
|
||||
std::string fileName = "file_name.aub";
|
||||
auto mockAubFileStream = std::make_unique<MockAubFileStream>();
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>(fileName.c_str(), true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>(fileName.c_str(), true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
|
||||
aubCsr->aubManager = nullptr;
|
||||
aubCsr->stream = mockAubFileStream.get();
|
||||
|
@ -707,7 +708,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWithAubManagerWhenExpe
|
|||
std::string fileName = "file_name.aub";
|
||||
auto mockAubManager = std::make_unique<MockAubManager>();
|
||||
auto mockAubFileStream = std::make_unique<MockAubFileStream>();
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>(fileName.c_str(), true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>(fileName.c_str(), true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
|
||||
aubCsr->stream = mockAubFileStream.get();
|
||||
aubCsr->setupContext(pDevice->commandStreamReceivers[0]->getOsContext());
|
||||
|
|
|
@ -211,7 +211,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeAndMidThread
|
|||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInDefaultModeAndMidThreadPreemptionWhenFlushTaskIsCalledThenSipKernelIsMadeResident) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
|
@ -258,7 +258,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests, givenDeviceWith
|
|||
DebugManagerStateRestore dbgRestore;
|
||||
DebugManager.flags.ForcePreemptionMode.set(static_cast<int32_t>(PreemptionMode::ThreadGroup));
|
||||
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->setPreemptionMode(PreemptionMode::ThreadGroup);
|
||||
pDevice->resetCommandStreamReceiver(commandStreamReceiver);
|
||||
|
||||
|
@ -900,8 +900,10 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenEnoughMemoryOnlyForPreambleAn
|
|||
|
||||
template <typename FamilyType>
|
||||
struct CommandStreamReceiverHwLog : public UltCommandStreamReceiver<FamilyType> {
|
||||
CommandStreamReceiverHwLog(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) : UltCommandStreamReceiver<FamilyType>(executionEnvironment, rootDeviceIndex),
|
||||
flushCount(0) {
|
||||
CommandStreamReceiverHwLog(ExecutionEnvironment &executionEnvironment,
|
||||
uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield)
|
||||
: UltCommandStreamReceiver<FamilyType>(executionEnvironment, rootDeviceIndex, deviceBitfield),
|
||||
flushCount(0) {
|
||||
}
|
||||
|
||||
bool flush(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency) override {
|
||||
|
@ -913,7 +915,7 @@ struct CommandStreamReceiverHwLog : public UltCommandStreamReceiver<FamilyType>
|
|||
};
|
||||
|
||||
HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenBothCsWhenFlushingTaskThenFlushOnce) {
|
||||
CommandStreamReceiverHwLog<FamilyType> commandStreamReceiver(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
CommandStreamReceiverHwLog<FamilyType> commandStreamReceiver(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
commandStreamReceiver.setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
commandStreamReceiver.initializeTagAllocation();
|
||||
commandStreamReceiver.createPreemptionAllocation();
|
||||
|
@ -1008,7 +1010,7 @@ HWTEST_F(CommandStreamReceiverCQFlushTaskTests, WhenGettingCsThenReturnCsWithEno
|
|||
HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests, GivenBlockingWhenFlushingTaskThenAddPipeControlOnlyToTaskCs) {
|
||||
typedef typename FamilyType::PIPE_CONTROL PIPE_CONTROL;
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(commandStreamReceiver);
|
||||
|
||||
// Configure the CSR to not need to submit any state or commands
|
||||
|
@ -1150,7 +1152,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenBlockedKernelRequiringDCFlush
|
|||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverFlushTaskTests, givenDispatchFlagsWhenCallFlushTaskThenThreadArbitrationPolicyIsSetProperly) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
|
|
|
@ -358,7 +358,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests,
|
|||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverFlushTaskTests, givenDefaultCommandStreamReceiverThenRoundRobinPolicyIsSelected) {
|
||||
MockCsrHw<FamilyType> commandStreamReceiver(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockCsrHw<FamilyType> commandStreamReceiver(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
EXPECT_EQ(HwHelperHw<FamilyType>::get().getDefaultThreadArbitrationPolicy(), commandStreamReceiver.peekThreadArbitrationPolicy());
|
||||
}
|
||||
|
||||
|
@ -368,7 +368,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenKernelWithSlmWhenPreviousSLML
|
|||
MockContext ctx(pClDevice);
|
||||
MockKernelWithInternals kernel(*pClDevice);
|
||||
CommandQueueHw<FamilyType> commandQueue(&ctx, pClDevice, 0, false);
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(commandStreamReceiver);
|
||||
|
||||
auto &commandStreamCSR = commandStreamReceiver->getCS();
|
||||
|
@ -394,7 +394,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenKernelWithSlmWhenPreviousSLML
|
|||
|
||||
HWTEST_F(CommandStreamReceiverFlushTaskTests, WhenCreatingCommandStreamReceiverHwThenValidPointerIsReturned) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
auto csrHw = CommandStreamReceiverHw<FamilyType>::create(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto csrHw = CommandStreamReceiverHw<FamilyType>::create(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
EXPECT_NE(nullptr, csrHw);
|
||||
|
||||
GmmPageTableMngr *ptm = csrHw->createPageTableManager();
|
||||
|
@ -405,14 +405,14 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, WhenCreatingCommandStreamReceiverH
|
|||
int32_t GetCsr = DebugManager.flags.SetCommandStreamReceiver.get();
|
||||
EXPECT_EQ(0, GetCsr);
|
||||
|
||||
auto csr = NEO::createCommandStream(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto csr = NEO::createCommandStream(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
EXPECT_NE(nullptr, csr);
|
||||
delete csr;
|
||||
DebugManager.flags.SetCommandStreamReceiver.set(0);
|
||||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverFlushTaskTests, WhenFlushingThenScratchAllocationIsReused) {
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(commandStreamReceiver);
|
||||
|
||||
commandStreamReceiver->setRequiredScratchSizes(1024, 0); // whatever > 0
|
||||
|
@ -450,7 +450,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, WhenFlushingThenScratchAllocationI
|
|||
HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCommandStreamReceiverWhenFenceAllocationIsRequiredAndFlushTaskIsCalledThenFenceAllocationIsMadeResident) {
|
||||
RAIIHwHelperFactory<MockHwHelperWithFenceAllocation<FamilyType>> hwHelperBackup{pDevice->getHardwareInfo().platform.eRenderCoreFamily};
|
||||
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(commandStreamReceiver);
|
||||
|
||||
auto globalFenceAllocation = commandStreamReceiver->globalFenceAllocation;
|
||||
|
@ -502,7 +502,7 @@ struct MockScratchController : public ScratchSpaceController {
|
|||
};
|
||||
|
||||
HWTEST_F(CommandStreamReceiverFlushTaskTests, whenScratchIsRequiredForFirstFlushAndPrivateScratchForSecondFlushThenHandleResidencyProperly) {
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
auto scratchController = new MockScratchController(pDevice->getRootDeviceIndex(), *pDevice->executionEnvironment, *commandStreamReceiver->getInternalAllocationStorage());
|
||||
commandStreamReceiver->scratchSpaceController.reset(scratchController);
|
||||
pDevice->resetCommandStreamReceiver(commandStreamReceiver);
|
||||
|
@ -537,7 +537,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, whenScratchIsRequiredForFirstFlush
|
|||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverFlushTaskTests, whenPrivateScratchIsRequiredForFirstFlushAndCommonScratchForSecondFlushThenHandleResidencyProperly) {
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
auto scratchController = new MockScratchController(pDevice->getRootDeviceIndex(), *pDevice->executionEnvironment, *commandStreamReceiver->getInternalAllocationStorage());
|
||||
commandStreamReceiver->scratchSpaceController.reset(scratchController);
|
||||
pDevice->resetCommandStreamReceiver(commandStreamReceiver);
|
||||
|
@ -579,7 +579,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests, givenTwoConsecu
|
|||
MockContext ctx(pClDevice);
|
||||
MockKernelWithInternals kernel(*pClDevice);
|
||||
CommandQueueHw<FamilyType> commandQueue(&ctx, pClDevice, 0, false);
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(commandStreamReceiver);
|
||||
|
||||
size_t GWS = 1;
|
||||
|
@ -694,7 +694,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests, givenNDRangeKer
|
|||
MockContext ctx(pClDevice);
|
||||
MockKernelWithInternals kernel(*pClDevice);
|
||||
CommandQueueHw<FamilyType> commandQueue(&ctx, pClDevice, 0, false);
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(commandStreamReceiver);
|
||||
|
||||
size_t GWS = 1;
|
||||
|
@ -811,7 +811,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenForced32BitAllocationsModeSto
|
|||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.Force32bitAddressing.set(true);
|
||||
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
|
||||
pDevice->getMemoryManager()->setForce32BitAllocations(true);
|
||||
|
||||
|
@ -845,7 +845,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenForced32BitAllocationsModeSto
|
|||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.Force32bitAddressing.set(true);
|
||||
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
|
||||
pDevice->getMemoryManager()->setForce32BitAllocations(true);
|
||||
|
||||
|
@ -1128,7 +1128,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests, givenCsrInNonDi
|
|||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
configureCSRtoNonDirtyState<FamilyType>(false);
|
||||
|
@ -1152,7 +1152,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests, givenCsrInNonDi
|
|||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
|
|
|
@ -37,7 +37,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenFlushTas
|
|||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
|
@ -97,7 +97,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeAndTwoRecord
|
|||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -152,7 +152,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeAndThreeReco
|
|||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -217,7 +217,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeAndThreeReco
|
|||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -286,7 +286,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenFlushTas
|
|||
auto initialBase = commandStream.getCpuBase();
|
||||
auto initialUsed = commandStream.getUsed();
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -360,7 +360,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests, givenCsrInBatch
|
|||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -431,7 +431,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests, givenCsrInBatch
|
|||
HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrCreatedWithDedicatedDebugFlagWhenItIsCreatedThenItHasProperDispatchMode) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.CsrDispatchMode.set(static_cast<uint32_t>(DispatchMode::AdaptiveDispatch));
|
||||
std::unique_ptr<MockCsrHw2<FamilyType>> mockCsr(new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<MockCsrHw2<FamilyType>> mockCsr(new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
EXPECT_EQ(DispatchMode::AdaptiveDispatch, mockCsr->dispatchMode);
|
||||
}
|
||||
|
||||
|
@ -439,7 +439,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenBlocking
|
|||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -468,7 +468,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenBlocking
|
|||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverFlushTaskTests, givenBufferToFlushWhenFlushTaskCalledThenUpdateFlushStamp) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
commandStream.getSpace(1);
|
||||
|
@ -481,7 +481,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenBufferToFlushWhenFlushTaskCal
|
|||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests, givenNothingToFlushWhenFlushTaskCalledThenDontFlushStamp) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
configureCSRtoNonDirtyState<FamilyType>(false);
|
||||
|
@ -498,7 +498,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenFlushTas
|
|||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -609,7 +609,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenWaitForT
|
|||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -650,7 +650,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenEnqueueI
|
|||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -691,7 +691,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenSusbsequ
|
|||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -750,7 +750,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenTotalRes
|
|||
ExecutionEnvironment *executionEnvironment = platform()->peekExecutionEnvironment();
|
||||
auto mockedMemoryManager = new MockedMemoryManager(*executionEnvironment);
|
||||
executionEnvironment->memoryManager.reset(mockedMemoryManager);
|
||||
auto mockCsr = std::make_unique<MockCsrHw2<FamilyType>>(*executionEnvironment, 0);
|
||||
auto mockCsr = std::make_unique<MockCsrHw2<FamilyType>>(*executionEnvironment, 0, pDevice->getDeviceBitfield());
|
||||
mockCsr->setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
|
||||
if (pDevice->getPreemptionMode() == PreemptionMode::MidThread || pDevice->isDebuggerActive()) {
|
||||
|
@ -812,7 +812,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests,
|
|||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -894,7 +894,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenDcFlushI
|
|||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -923,7 +923,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenCommandA
|
|||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -955,7 +955,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWithOutOfOrd
|
|||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -987,7 +987,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenDcFlushI
|
|||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -1021,7 +1021,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenEpiloguePipeControlThenDcFlus
|
|||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -1061,7 +1061,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenEpiloguePipeControlWhendDcFlu
|
|||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -1097,7 +1097,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests,
|
|||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->timestampPacketWriteEnabled = false;
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
|
@ -1157,7 +1157,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeAndOoqFlagSe
|
|||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -1197,7 +1197,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenPipeCont
|
|||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -1260,7 +1260,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests,
|
|||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -1402,7 +1402,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenDispatchFlagsWithThrottleSetT
|
|||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -1435,7 +1435,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenDispatchFlagsWithThrottleSetT
|
|||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -1468,7 +1468,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCommandQueueWithThrottleHintW
|
|||
cl_queue_properties properties[] = {CL_QUEUE_THROTTLE_KHR, CL_QUEUE_THROTTLE_LOW_KHR, 0};
|
||||
CommandQueueHw<FamilyType> commandQueue(&context, pClDevice, properties, false);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
cl_int retVal = CL_SUCCESS;
|
||||
|
@ -1485,7 +1485,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenDispatchFlagsWithThrottleSetT
|
|||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -1567,7 +1567,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenDispatchFlagsWithNewSliceCoun
|
|||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
|
@ -1601,7 +1601,8 @@ class UltCommandStreamReceiverForDispatchFlags : public UltCommandStreamReceiver
|
|||
using BaseClass = UltCommandStreamReceiver<GfxFamily>;
|
||||
|
||||
public:
|
||||
UltCommandStreamReceiverForDispatchFlags(ExecutionEnvironment &executionEnvironment) : BaseClass(executionEnvironment, 0) {}
|
||||
UltCommandStreamReceiverForDispatchFlags(ExecutionEnvironment &executionEnvironment, DeviceBitfield deviceBitfield)
|
||||
: BaseClass(executionEnvironment, 0, deviceBitfield) {}
|
||||
|
||||
CompletionStamp flushTask(LinearStream &commandStream, size_t commandStreamStart,
|
||||
const IndirectHeap &dsh, const IndirectHeap &ioh, const IndirectHeap &ssh,
|
||||
|
@ -1615,7 +1616,7 @@ class UltCommandStreamReceiverForDispatchFlags : public UltCommandStreamReceiver
|
|||
|
||||
HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenBlockedKernelWhenItIsUnblockedThenDispatchFlagsAreSetCorrectly) {
|
||||
MockContext mockContext;
|
||||
auto csr = new UltCommandStreamReceiverForDispatchFlags<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto csr = new UltCommandStreamReceiverForDispatchFlags<FamilyType>(*pDevice->executionEnvironment, pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(csr);
|
||||
uint32_t numGrfRequired = 666u;
|
||||
|
||||
|
@ -1724,7 +1725,8 @@ class MockCsrWithFailingFlush : public CommandStreamReceiverHw<GfxFamily> {
|
|||
using CommandStreamReceiverHw<GfxFamily>::latestSentTaskCount;
|
||||
using CommandStreamReceiverHw<GfxFamily>::submissionAggregator;
|
||||
|
||||
MockCsrWithFailingFlush(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) : CommandStreamReceiverHw<GfxFamily>(executionEnvironment, rootDeviceIndex) {
|
||||
MockCsrWithFailingFlush(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield)
|
||||
: CommandStreamReceiverHw<GfxFamily>(executionEnvironment, rootDeviceIndex, deviceBitfield) {
|
||||
this->dispatchMode = DispatchMode::BatchedDispatch;
|
||||
this->tagAddress = &tag;
|
||||
}
|
||||
|
@ -1735,7 +1737,7 @@ class MockCsrWithFailingFlush : public CommandStreamReceiverHw<GfxFamily> {
|
|||
};
|
||||
|
||||
HWTEST_F(CommandStreamReceiverFlushTaskTests, givenWaitForCompletionWithTimeoutIsCalledWhenFlushBatchedSubmissionsReturnsFailureThenItIsPropagated) {
|
||||
MockCsrWithFailingFlush<FamilyType> mockCsr(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockCsrWithFailingFlush<FamilyType> mockCsr(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
MockOsContext osContext(0, 8, aub_stream::ENGINE_RCS, PreemptionMode::Disabled,
|
||||
false, false, false);
|
||||
mockCsr.setupContext(osContext);
|
||||
|
@ -1746,8 +1748,8 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenWaitForCompletionWithTimeoutI
|
|||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCommandStreamReceiverWhenFlushTaskIsCalledThenInitializePageTableManagerRegister) {
|
||||
auto csr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto csr2 = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto csr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
auto csr2 = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(csr);
|
||||
|
||||
MockGmmPageTableMngr *pageTableManager = new MockGmmPageTableMngr();
|
||||
|
@ -1781,7 +1783,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCommandStreamReceiverWhenFlus
|
|||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCommandStreamReceiverWhenInitializingPageTableManagerRegisterFailsThenPageTableManagerIsNotInitialized) {
|
||||
auto csr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto csr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(csr);
|
||||
|
||||
MockGmmPageTableMngr *pageTableManager = new MockGmmPageTableMngr();
|
||||
|
|
|
@ -64,7 +64,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskGmockTests, givenCsrInBatchingModeThreeRe
|
|||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
auto mockHelper = new MockFlatBatchBufferHelper<FamilyType>(*pDevice->executionEnvironment);
|
||||
mockCsr->overwriteFlatBatchBufferHelper(mockHelper);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
@ -132,7 +132,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskGmockTests, givenMockCommandStreamerWhenA
|
|||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
auto mockHelper = new MockFlatBatchBufferHelper<FamilyType>(*pDevice->executionEnvironment);
|
||||
mockCsr->overwriteFlatBatchBufferHelper(mockHelper);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
@ -159,7 +159,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskGmockTests, givenMockCommandStreamerWhenA
|
|||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
auto mockHelper = new MockFlatBatchBufferHelper<FamilyType>(*pDevice->executionEnvironment);
|
||||
mockCsr->overwriteFlatBatchBufferHelper(mockHelper);
|
||||
|
||||
|
@ -210,7 +210,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskGmockTests, givenMockCommandStreamerWhenA
|
|||
HWTEST_F(CommandStreamReceiverFlushTaskGmockTests, givenMockCsrWhenCollectStateBaseAddresPatchInfoIsCalledThenAppropriateAddressesAreTaken) {
|
||||
typedef typename FamilyType::STATE_BASE_ADDRESS STATE_BASE_ADDRESS;
|
||||
|
||||
std::unique_ptr<MockCsrHw2<FamilyType>> mockCsr(new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<MockCsrHw2<FamilyType>> mockCsr(new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
auto mockHelper = new MockFlatBatchBufferHelper<FamilyType>(*pDevice->executionEnvironment);
|
||||
mockCsr->overwriteFlatBatchBufferHelper(mockHelper);
|
||||
|
||||
|
@ -265,7 +265,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskGmockTests, givenPatch
|
|||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
std::unique_ptr<MockCsrHw2<FamilyType>> mockCsr(new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<MockCsrHw2<FamilyType>> mockCsr(new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
mockCsr->overwriteFlatBatchBufferHelper(new MockFlatBatchBufferHelper<FamilyType>(*pDevice->executionEnvironment));
|
||||
|
||||
bool stateBaseAddressDirty;
|
||||
|
@ -287,7 +287,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskGmockTests, givenPatch
|
|||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
std::unique_ptr<MockCsrHw2<FamilyType>> mockCsr(new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<MockCsrHw2<FamilyType>> mockCsr(new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
mockCsr->overwriteFlatBatchBufferHelper(new MockFlatBatchBufferHelper<FamilyType>(*pDevice->executionEnvironment));
|
||||
|
||||
bool stateBaseAddressDirty;
|
||||
|
@ -311,7 +311,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskGmockTests, givenPatch
|
|||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
std::unique_ptr<MockCsrHw2<FamilyType>> mockCsr(new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<MockCsrHw2<FamilyType>> mockCsr(new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
mockCsr->overwriteFlatBatchBufferHelper(new MockFlatBatchBufferHelper<FamilyType>(*pDevice->executionEnvironment));
|
||||
|
||||
DispatchFlags flags = DispatchFlagsHelper::createDefaultDispatchFlags();
|
||||
|
|
|
@ -453,7 +453,7 @@ HWTEST_F(CommandStreamReceiverFlushTests, WhenAligningCommandStreamReceiverToCac
|
|||
typedef Test<ClDeviceFixture> CommandStreamReceiverHwTest;
|
||||
|
||||
HWTEST_F(CommandStreamReceiverHwTest, givenCsrHwWhenTypeIsCheckedThenCsrHwIsReturned) {
|
||||
auto csr = std::unique_ptr<CommandStreamReceiver>(CommandStreamReceiverHw<FamilyType>::create(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
auto csr = std::unique_ptr<CommandStreamReceiver>(CommandStreamReceiverHw<FamilyType>::create(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
|
||||
EXPECT_EQ(CommandStreamReceiverType::CSR_HW, csr->getType());
|
||||
}
|
||||
|
@ -464,7 +464,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverHwTest, WhenCommandStreamReceiv
|
|||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverHwTest, WhenScratchSpaceIsNotRequiredThenScratchAllocationIsNotCreated) {
|
||||
auto commandStreamReceiver = std::make_unique<MockCsrHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto commandStreamReceiver = std::make_unique<MockCsrHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
auto scratchController = commandStreamReceiver->getScratchSpaceController();
|
||||
|
||||
bool stateBaseAddressDirty = false;
|
||||
|
@ -477,7 +477,7 @@ HWTEST_F(CommandStreamReceiverHwTest, WhenScratchSpaceIsNotRequiredThenScratchAl
|
|||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverHwTest, WhenScratchSpaceIsRequiredThenCorrectAddressIsReturned) {
|
||||
auto commandStreamReceiver = std::make_unique<MockCsrHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto commandStreamReceiver = std::make_unique<MockCsrHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
commandStreamReceiver->setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
auto scratchController = commandStreamReceiver->getScratchSpaceController();
|
||||
|
||||
|
@ -494,7 +494,7 @@ HWTEST_F(CommandStreamReceiverHwTest, WhenScratchSpaceIsRequiredThenCorrectAddre
|
|||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverHwTest, WhenScratchSpaceIsNotRequiredThenGshAddressZeroIsReturned) {
|
||||
auto commandStreamReceiver = std::make_unique<MockCsrHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto commandStreamReceiver = std::make_unique<MockCsrHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
auto scratchController = commandStreamReceiver->getScratchSpaceController();
|
||||
|
||||
EXPECT_EQ(nullptr, scratchController->getScratchSpaceAllocation());
|
||||
|
@ -502,7 +502,7 @@ HWTEST_F(CommandStreamReceiverHwTest, WhenScratchSpaceIsNotRequiredThenGshAddres
|
|||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverHwTest, givenDefaultPlatformCapabilityWhenNoDebugKeysSetThenExpectDefaultPlatformSettings) {
|
||||
auto commandStreamReceiver = std::make_unique<MockCsrHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto commandStreamReceiver = std::make_unique<MockCsrHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
if (commandStreamReceiver->checkPlatformSupportsNewResourceImplicitFlush()) {
|
||||
EXPECT_TRUE(commandStreamReceiver->useNewResourceImplicitFlush);
|
||||
} else {
|
||||
|
@ -511,7 +511,7 @@ HWTEST_F(CommandStreamReceiverHwTest, givenDefaultPlatformCapabilityWhenNoDebugK
|
|||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverHwTest, givenDefaultGpuIdleImplicitFlushWhenNoDebugKeysSetThenExpectDefaultPlatformSettings) {
|
||||
auto commandStreamReceiver = std::make_unique<MockCsrHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto commandStreamReceiver = std::make_unique<MockCsrHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
if (commandStreamReceiver->checkPlatformSupportsGpuIdleImplicitFlush()) {
|
||||
EXPECT_TRUE(commandStreamReceiver->useGpuIdleImplicitFlush);
|
||||
} else {
|
||||
|
@ -523,7 +523,7 @@ HWTEST_F(CommandStreamReceiverHwTest, WhenForceDisableNewResourceImplicitFlushTh
|
|||
DebugManagerStateRestore restore;
|
||||
DebugManager.flags.PerformImplicitFlushForNewResource.set(0);
|
||||
|
||||
auto commandStreamReceiver = std::make_unique<MockCsrHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto commandStreamReceiver = std::make_unique<MockCsrHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
EXPECT_FALSE(commandStreamReceiver->useNewResourceImplicitFlush);
|
||||
}
|
||||
|
||||
|
@ -531,7 +531,7 @@ HWTEST_F(CommandStreamReceiverHwTest, WhenForceEnableNewResourceImplicitFlushThe
|
|||
DebugManagerStateRestore restore;
|
||||
DebugManager.flags.PerformImplicitFlushForNewResource.set(1);
|
||||
|
||||
auto commandStreamReceiver = std::make_unique<MockCsrHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto commandStreamReceiver = std::make_unique<MockCsrHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
EXPECT_TRUE(commandStreamReceiver->useNewResourceImplicitFlush);
|
||||
}
|
||||
|
||||
|
@ -539,7 +539,7 @@ HWTEST_F(CommandStreamReceiverHwTest, WhenForceDisableGpuIdleImplicitFlushThenEx
|
|||
DebugManagerStateRestore restore;
|
||||
DebugManager.flags.PerformImplicitFlushForIdleGpu.set(0);
|
||||
|
||||
auto commandStreamReceiver = std::make_unique<MockCsrHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto commandStreamReceiver = std::make_unique<MockCsrHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
EXPECT_FALSE(commandStreamReceiver->useGpuIdleImplicitFlush);
|
||||
}
|
||||
|
||||
|
@ -547,7 +547,7 @@ HWTEST_F(CommandStreamReceiverHwTest, WhenForceEnableGpuIdleImplicitFlushThenExp
|
|||
DebugManagerStateRestore restore;
|
||||
DebugManager.flags.PerformImplicitFlushForIdleGpu.set(1);
|
||||
|
||||
auto commandStreamReceiver = std::make_unique<MockCsrHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto commandStreamReceiver = std::make_unique<MockCsrHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
EXPECT_TRUE(commandStreamReceiver->useGpuIdleImplicitFlush);
|
||||
}
|
||||
|
||||
|
|
|
@ -281,7 +281,7 @@ HWTEST_F(BcsTests, givenMultipleBlitPropertiesWhenDispatchingThenProgramCommands
|
|||
HWTEST_F(BcsTests, givenProfilingEnabledWhenBlitBufferThenCommandBufferIsConstructedProperly) {
|
||||
auto bcsOsContext = std::unique_ptr<OsContext>(OsContext::create(nullptr, 0, pDevice->getDeviceBitfield(), aub_stream::ENGINE_BCS, PreemptionMode::Disabled,
|
||||
false, false, false));
|
||||
auto bcsCsr = std::make_unique<UltCommandStreamReceiver<FamilyType>>(*pDevice->getExecutionEnvironment(), pDevice->getRootDeviceIndex());
|
||||
auto bcsCsr = std::make_unique<UltCommandStreamReceiver<FamilyType>>(*pDevice->getExecutionEnvironment(), pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
bcsCsr->setupContext(*bcsOsContext);
|
||||
bcsCsr->initializeTagAllocation();
|
||||
|
||||
|
@ -366,7 +366,7 @@ HWTEST_F(BcsTests, givenFenceAllocationIsRequiredWhenBlitDispatchedThenMakeAllAl
|
|||
|
||||
auto bcsOsContext = std::unique_ptr<OsContext>(OsContext::create(nullptr, 0, pDevice->getDeviceBitfield(), aub_stream::ENGINE_BCS, PreemptionMode::Disabled,
|
||||
false, false, false));
|
||||
auto bcsCsr = std::make_unique<UltCommandStreamReceiver<FamilyType>>(*pDevice->getExecutionEnvironment(), pDevice->getRootDeviceIndex());
|
||||
auto bcsCsr = std::make_unique<UltCommandStreamReceiver<FamilyType>>(*pDevice->getExecutionEnvironment(), pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
bcsCsr->setupContext(*bcsOsContext);
|
||||
bcsCsr->initializeTagAllocation();
|
||||
bcsCsr->createGlobalFenceAllocation();
|
||||
|
@ -464,7 +464,7 @@ HWTEST_F(BcsTests, whenBlitFromHostPtrCalledThenCallWaitWithKmdFallback) {
|
|||
uint32_t waitForTaskCountWithKmdNotifyFallbackCalled = 0;
|
||||
};
|
||||
|
||||
auto myMockCsr = std::make_unique<::testing::NiceMock<MyMockCsr>>(*pDevice->getExecutionEnvironment(), pDevice->getRootDeviceIndex());
|
||||
auto myMockCsr = std::make_unique<::testing::NiceMock<MyMockCsr>>(*pDevice->getExecutionEnvironment(), pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
auto &bcsOsContext = pDevice->getUltCommandStreamReceiver<FamilyType>().getOsContext();
|
||||
myMockCsr->initializeTagAllocation();
|
||||
myMockCsr->setupContext(bcsOsContext);
|
||||
|
|
|
@ -34,7 +34,7 @@ void CommandStreamReceiverHwTest<GfxFamily>::givenKernelWithSlmWhenPreviousNOSLM
|
|||
MockContext ctx(pClDevice);
|
||||
MockKernelWithInternals kernel(*pClDevice);
|
||||
CommandQueueHw<GfxFamily> commandQueue(&ctx, pClDevice, 0, false);
|
||||
auto commandStreamReceiver = new MockCsrHw<GfxFamily>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto commandStreamReceiver = new MockCsrHw<GfxFamily>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(commandStreamReceiver);
|
||||
|
||||
auto &commandStreamCSR = commandStreamReceiver->getCS();
|
||||
|
@ -75,7 +75,7 @@ void CommandStreamReceiverHwTest<GfxFamily>::givenBlockedKernelWithSlmWhenPrevio
|
|||
MockContext ctx(pClDevice);
|
||||
MockKernelWithInternals kernel(*pClDevice);
|
||||
CommandQueueHw<GfxFamily> commandQueue(&ctx, pClDevice, 0, false);
|
||||
auto commandStreamReceiver = new MockCsrHw<GfxFamily>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto commandStreamReceiver = new MockCsrHw<GfxFamily>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(commandStreamReceiver);
|
||||
cl_event blockingEvent;
|
||||
MockEvent<UserEvent> mockEvent(&ctx);
|
||||
|
|
|
@ -270,7 +270,8 @@ TEST(CommandStreamReceiverSimpleTest, givenCsrWithoutTagAllocationWhenGetTagAllo
|
|||
MockExecutionEnvironment executionEnvironment;
|
||||
executionEnvironment.prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
MockCommandStreamReceiver csr(executionEnvironment, 0);
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
MockCommandStreamReceiver csr(executionEnvironment, 0, deviceBitfield);
|
||||
EXPECT_EQ(nullptr, csr.getTagAllocation());
|
||||
}
|
||||
|
||||
|
@ -278,7 +279,8 @@ TEST(CommandStreamReceiverSimpleTest, givenCsrWhenSubmitiingBatchBufferThenTaskC
|
|||
MockExecutionEnvironment executionEnvironment;
|
||||
executionEnvironment.prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
MockCommandStreamReceiver csr(executionEnvironment, 0);
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
MockCommandStreamReceiver csr(executionEnvironment, 0, deviceBitfield);
|
||||
|
||||
GraphicsAllocation *commandBuffer = executionEnvironment.memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{csr.getRootDeviceIndex(), MemoryConstants::pageSize});
|
||||
ASSERT_NE(nullptr, commandBuffer);
|
||||
|
@ -301,17 +303,17 @@ HWTEST_F(CommandStreamReceiverTest, givenDebugVariableEnabledWhenCreatingCsrThen
|
|||
DebugManagerStateRestore restore;
|
||||
|
||||
DebugManager.flags.EnableTimestampPacket.set(true);
|
||||
CommandStreamReceiverHw<FamilyType> csr1(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
CommandStreamReceiverHw<FamilyType> csr1(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
EXPECT_TRUE(csr1.peekTimestampPacketWriteEnabled());
|
||||
|
||||
DebugManager.flags.EnableTimestampPacket.set(false);
|
||||
CommandStreamReceiverHw<FamilyType> csr2(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
CommandStreamReceiverHw<FamilyType> csr2(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
EXPECT_FALSE(csr2.peekTimestampPacketWriteEnabled());
|
||||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverTest, whenDirectSubmissionDisabledThenExpectNoFeatureAvailable) {
|
||||
DeviceFactory::prepareDeviceEnvironments(*pDevice->getExecutionEnvironment());
|
||||
CommandStreamReceiverHw<FamilyType> csr(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
CommandStreamReceiverHw<FamilyType> csr(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
std::unique_ptr<OsContext> osContext(OsContext::create(pDevice->getExecutionEnvironment()->rootDeviceEnvironments[0]->osInterface.get(),
|
||||
0, pDevice->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::ThreadGroup,
|
||||
false, false, false));
|
||||
|
@ -343,7 +345,7 @@ struct InitDirectSubmissionFixture {
|
|||
using InitDirectSubmissionTest = Test<InitDirectSubmissionFixture>;
|
||||
|
||||
HWTEST_F(InitDirectSubmissionTest, whenDirectSubmissionEnabledOnRcsThenExpectFeatureAvailable) {
|
||||
auto csr = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*device->executionEnvironment, device->getRootDeviceIndex());
|
||||
auto csr = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*device->executionEnvironment, device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
std::unique_ptr<OsContext> osContext(OsContext::create(device->getExecutionEnvironment()->rootDeviceEnvironments[0]->osInterface.get(),
|
||||
0, device->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::ThreadGroup,
|
||||
false, false, false));
|
||||
|
@ -361,7 +363,7 @@ HWTEST_F(InitDirectSubmissionTest, whenDirectSubmissionEnabledOnRcsThenExpectFea
|
|||
}
|
||||
|
||||
HWTEST_F(InitDirectSubmissionTest, givenDirectSubmissionEnabledWhenPlatformNotSupportsRcsThenExpectFeatureNotAvailable) {
|
||||
auto csr = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*device->executionEnvironment, device->getRootDeviceIndex());
|
||||
auto csr = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*device->executionEnvironment, device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
std::unique_ptr<OsContext> osContext(OsContext::create(device->getExecutionEnvironment()->rootDeviceEnvironments[0]->osInterface.get(),
|
||||
0, device->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::ThreadGroup,
|
||||
false, false, false));
|
||||
|
@ -378,7 +380,7 @@ HWTEST_F(InitDirectSubmissionTest, givenDirectSubmissionEnabledWhenPlatformNotSu
|
|||
}
|
||||
|
||||
HWTEST_F(InitDirectSubmissionTest, whenDirectSubmissionEnabledOnBcsThenExpectFeatureAvailable) {
|
||||
auto csr = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*device->executionEnvironment, device->getRootDeviceIndex());
|
||||
auto csr = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*device->executionEnvironment, device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
std::unique_ptr<OsContext> osContext(OsContext::create(device->getExecutionEnvironment()->rootDeviceEnvironments[0]->osInterface.get(),
|
||||
0, device->getDeviceBitfield(), aub_stream::ENGINE_BCS, PreemptionMode::ThreadGroup,
|
||||
false, false, false));
|
||||
|
@ -397,7 +399,7 @@ HWTEST_F(InitDirectSubmissionTest, whenDirectSubmissionEnabledOnBcsThenExpectFea
|
|||
}
|
||||
|
||||
HWTEST_F(InitDirectSubmissionTest, givenDirectSubmissionEnabledWhenPlatformNotSupportsBcsThenExpectFeatureNotAvailable) {
|
||||
auto csr = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*device->executionEnvironment, device->getRootDeviceIndex());
|
||||
auto csr = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*device->executionEnvironment, device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
std::unique_ptr<OsContext> osContext(OsContext::create(device->getExecutionEnvironment()->rootDeviceEnvironments[0]->osInterface.get(),
|
||||
0, device->getDeviceBitfield(), aub_stream::ENGINE_BCS, PreemptionMode::ThreadGroup,
|
||||
false, false, false));
|
||||
|
@ -416,7 +418,7 @@ HWTEST_F(InitDirectSubmissionTest, givenDirectSubmissionEnabledWhenPlatformNotSu
|
|||
}
|
||||
|
||||
HWTEST_F(InitDirectSubmissionTest, givenLowPriorityContextWhenDirectSubmissionDisabledOnLowPriorityThenExpectFeatureNotAvailable) {
|
||||
auto csr = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*device->executionEnvironment, device->getRootDeviceIndex());
|
||||
auto csr = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*device->executionEnvironment, device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
std::unique_ptr<OsContext> osContext(OsContext::create(device->getExecutionEnvironment()->rootDeviceEnvironments[0]->osInterface.get(),
|
||||
0, device->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::ThreadGroup,
|
||||
true, false, false));
|
||||
|
@ -435,7 +437,7 @@ HWTEST_F(InitDirectSubmissionTest, givenLowPriorityContextWhenDirectSubmissionDi
|
|||
}
|
||||
|
||||
HWTEST_F(InitDirectSubmissionTest, givenLowPriorityContextWhenDirectSubmissionEnabledOnLowPriorityThenExpectFeatureAvailable) {
|
||||
auto csr = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*device->executionEnvironment, device->getRootDeviceIndex());
|
||||
auto csr = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*device->executionEnvironment, device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
std::unique_ptr<OsContext> osContext(OsContext::create(device->getExecutionEnvironment()->rootDeviceEnvironments[0]->osInterface.get(),
|
||||
0, device->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::ThreadGroup,
|
||||
true, false, false));
|
||||
|
@ -452,7 +454,7 @@ HWTEST_F(InitDirectSubmissionTest, givenLowPriorityContextWhenDirectSubmissionEn
|
|||
}
|
||||
|
||||
HWTEST_F(InitDirectSubmissionTest, givenInternalContextWhenDirectSubmissionDisabledOnInternalThenExpectFeatureNotAvailable) {
|
||||
auto csr = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*device->executionEnvironment, device->getRootDeviceIndex());
|
||||
auto csr = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*device->executionEnvironment, device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
std::unique_ptr<OsContext> osContext(OsContext::create(device->getExecutionEnvironment()->rootDeviceEnvironments[0]->osInterface.get(),
|
||||
0, device->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::ThreadGroup,
|
||||
false, true, false));
|
||||
|
@ -471,7 +473,7 @@ HWTEST_F(InitDirectSubmissionTest, givenInternalContextWhenDirectSubmissionDisab
|
|||
}
|
||||
|
||||
HWTEST_F(InitDirectSubmissionTest, givenInternalContextWhenDirectSubmissionEnabledOnInternalThenExpectFeatureAvailable) {
|
||||
auto csr = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*device->executionEnvironment, device->getRootDeviceIndex());
|
||||
auto csr = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*device->executionEnvironment, device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
std::unique_ptr<OsContext> osContext(OsContext::create(device->getExecutionEnvironment()->rootDeviceEnvironments[0]->osInterface.get(),
|
||||
0, device->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::ThreadGroup,
|
||||
false, true, false));
|
||||
|
@ -489,7 +491,7 @@ HWTEST_F(InitDirectSubmissionTest, givenInternalContextWhenDirectSubmissionEnabl
|
|||
}
|
||||
|
||||
HWTEST_F(InitDirectSubmissionTest, givenRootDeviceContextWhenDirectSubmissionDisabledOnRootDeviceThenExpectFeatureNotAvailable) {
|
||||
auto csr = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*device->executionEnvironment, device->getRootDeviceIndex());
|
||||
auto csr = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*device->executionEnvironment, device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
std::unique_ptr<OsContext> osContext(OsContext::create(device->getExecutionEnvironment()->rootDeviceEnvironments[0]->osInterface.get(),
|
||||
0, device->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::ThreadGroup,
|
||||
false, false, true));
|
||||
|
@ -508,7 +510,7 @@ HWTEST_F(InitDirectSubmissionTest, givenRootDeviceContextWhenDirectSubmissionDis
|
|||
}
|
||||
|
||||
HWTEST_F(InitDirectSubmissionTest, givenRootDeviceContextWhenDirectSubmissionEnabledOnRootDeviceThenExpectFeatureAvailable) {
|
||||
auto csr = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*device->executionEnvironment, device->getRootDeviceIndex());
|
||||
auto csr = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*device->executionEnvironment, device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
std::unique_ptr<OsContext> osContext(OsContext::create(device->getExecutionEnvironment()->rootDeviceEnvironments[0]->osInterface.get(),
|
||||
0, device->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::ThreadGroup,
|
||||
false, false, true));
|
||||
|
@ -526,7 +528,7 @@ HWTEST_F(InitDirectSubmissionTest, givenRootDeviceContextWhenDirectSubmissionEna
|
|||
}
|
||||
|
||||
HWTEST_F(InitDirectSubmissionTest, givenNonDefaultContextWhenDirectSubmissionDisabledOnNonDefaultThenExpectFeatureNotAvailable) {
|
||||
auto csr = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*device->executionEnvironment, device->getRootDeviceIndex());
|
||||
auto csr = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*device->executionEnvironment, device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
std::unique_ptr<OsContext> osContext(OsContext::create(device->getExecutionEnvironment()->rootDeviceEnvironments[0]->osInterface.get(),
|
||||
0, device->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::ThreadGroup,
|
||||
false, false, false));
|
||||
|
@ -545,7 +547,7 @@ HWTEST_F(InitDirectSubmissionTest, givenNonDefaultContextWhenDirectSubmissionDis
|
|||
}
|
||||
|
||||
HWTEST_F(InitDirectSubmissionTest, givenNonDefaultContextContextWhenDirectSubmissionEnabledOnNonDefaultContextThenExpectFeatureAvailable) {
|
||||
auto csr = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*device->executionEnvironment, device->getRootDeviceIndex());
|
||||
auto csr = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*device->executionEnvironment, device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
std::unique_ptr<OsContext> osContext(OsContext::create(device->getExecutionEnvironment()->rootDeviceEnvironments[0]->osInterface.get(),
|
||||
0, device->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::ThreadGroup,
|
||||
false, false, false));
|
||||
|
@ -566,7 +568,7 @@ HWTEST_F(InitDirectSubmissionTest, givenNonDefaultContextContextWhenDirectSubmis
|
|||
HWTEST_F(InitDirectSubmissionTest, GivenBlitterOverrideEnabledWhenBlitterIsNonDefaultContextThenExpectDirectSubmissionStarted) {
|
||||
DebugManager.flags.DirectSubmissionOverrideBlitterSupport.set(1);
|
||||
|
||||
auto csr = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*device->executionEnvironment, device->getRootDeviceIndex());
|
||||
auto csr = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*device->executionEnvironment, device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
std::unique_ptr<OsContext> osContext(OsContext::create(device->getExecutionEnvironment()->rootDeviceEnvironments[0]->osInterface.get(),
|
||||
0, device->getDeviceBitfield(), aub_stream::ENGINE_BCS, PreemptionMode::ThreadGroup,
|
||||
false, false, false));
|
||||
|
@ -585,7 +587,7 @@ HWTEST_F(InitDirectSubmissionTest, GivenBlitterOverrideEnabledWhenBlitterIsNonDe
|
|||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverTest, whenCsrIsCreatedThenUseTimestampPacketWriteIfPossible) {
|
||||
CommandStreamReceiverHw<FamilyType> csr(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
CommandStreamReceiverHw<FamilyType> csr(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
EXPECT_EQ(UnitTestHelper<FamilyType>::isTimestampPacketWriteSupported(), csr.peekTimestampPacketWriteEnabled());
|
||||
}
|
||||
|
||||
|
@ -646,7 +648,7 @@ TEST(CommandStreamReceiverSimpleTest, givenCommandStreamReceiverWhenItIsDestroye
|
|||
auto mockGraphicsAllocation = new MockGraphicsAllocationWithDestructorTracing(0, GraphicsAllocation::AllocationType::UNKNOWN, &gpuTag, 0llu, 0llu, 1u, MemoryPool::MemoryNull);
|
||||
mockGraphicsAllocation->destructorCalled = &destructorCalled;
|
||||
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get());
|
||||
auto csr = std::make_unique<MockCommandStreamReceiver>(executionEnvironment, 0);
|
||||
auto csr = std::make_unique<MockCommandStreamReceiver>(executionEnvironment, 0, 1);
|
||||
executionEnvironment.memoryManager.reset(new OsAgnosticMemoryManager(executionEnvironment));
|
||||
csr->setTagAllocation(mockGraphicsAllocation);
|
||||
EXPECT_FALSE(destructorCalled);
|
||||
|
@ -656,7 +658,7 @@ TEST(CommandStreamReceiverSimpleTest, givenCommandStreamReceiverWhenItIsDestroye
|
|||
|
||||
TEST(CommandStreamReceiverSimpleTest, givenCommandStreamReceiverWhenInitializeTagAllocationIsCalledThenTagAllocationIsBeingAllocated) {
|
||||
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get());
|
||||
auto csr = std::make_unique<MockCommandStreamReceiver>(executionEnvironment, 0);
|
||||
auto csr = std::make_unique<MockCommandStreamReceiver>(executionEnvironment, 0, 1);
|
||||
executionEnvironment.memoryManager.reset(new OsAgnosticMemoryManager(executionEnvironment));
|
||||
EXPECT_EQ(nullptr, csr->getTagAllocation());
|
||||
EXPECT_TRUE(csr->getTagAddress() == nullptr);
|
||||
|
@ -670,7 +672,7 @@ TEST(CommandStreamReceiverSimpleTest, givenCommandStreamReceiverWhenInitializeTa
|
|||
HWTEST_F(CommandStreamReceiverTest, givenCommandStreamReceiverWhenFenceAllocationIsRequiredAndCreateGlobalFenceAllocationIsCalledThenFenceAllocationIsAllocated) {
|
||||
RAIIHwHelperFactory<MockHwHelperWithFenceAllocation<FamilyType>> hwHelperBackup{pDevice->getHardwareInfo().platform.eRenderCoreFamily};
|
||||
|
||||
MockCsrHw<FamilyType> csr(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockCsrHw<FamilyType> csr(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
csr.setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
EXPECT_EQ(nullptr, csr.globalFenceAllocation);
|
||||
|
||||
|
@ -683,7 +685,7 @@ HWTEST_F(CommandStreamReceiverTest, givenCommandStreamReceiverWhenFenceAllocatio
|
|||
HWTEST_F(CommandStreamReceiverTest, givenCommandStreamReceiverWhenGettingFenceAllocationThenCorrectFenceAllocationIsReturned) {
|
||||
RAIIHwHelperFactory<MockHwHelperWithFenceAllocation<FamilyType>> hwHelperBackup{pDevice->getHardwareInfo().platform.eRenderCoreFamily};
|
||||
|
||||
CommandStreamReceiverHw<FamilyType> csr(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
CommandStreamReceiverHw<FamilyType> csr(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
csr.setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
EXPECT_EQ(nullptr, csr.getGlobalFenceAllocation());
|
||||
|
||||
|
@ -697,7 +699,7 @@ TEST(CommandStreamReceiverSimpleTest, givenNullHardwareDebugModeWhenInitializeTa
|
|||
DebugManagerStateRestore dbgRestore;
|
||||
DebugManager.flags.EnableNullHardware.set(true);
|
||||
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get());
|
||||
auto csr = std::make_unique<MockCommandStreamReceiver>(executionEnvironment, 0);
|
||||
auto csr = std::make_unique<MockCommandStreamReceiver>(executionEnvironment, 0, 1);
|
||||
executionEnvironment.memoryManager.reset(new OsAgnosticMemoryManager(executionEnvironment));
|
||||
EXPECT_EQ(nullptr, csr->getTagAllocation());
|
||||
EXPECT_TRUE(csr->getTagAddress() == nullptr);
|
||||
|
@ -711,7 +713,8 @@ TEST(CommandStreamReceiverSimpleTest, givenVariousDataSetsWhenVerifyingMemoryThe
|
|||
MockExecutionEnvironment executionEnvironment;
|
||||
executionEnvironment.prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
MockCommandStreamReceiver csr(executionEnvironment, 0);
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
MockCommandStreamReceiver csr(executionEnvironment, 0, deviceBitfield);
|
||||
|
||||
constexpr size_t setSize = 6;
|
||||
uint8_t setA1[setSize] = {4, 3, 2, 1, 2, 10};
|
||||
|
@ -737,7 +740,8 @@ TEST(CommandStreamReceiverSimpleTest, givenNewResourceFlushDisabledWhenProviding
|
|||
MockExecutionEnvironment executionEnvironment;
|
||||
executionEnvironment.prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
MockCommandStreamReceiver csr(executionEnvironment, 0);
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
MockCommandStreamReceiver csr(executionEnvironment, 0, deviceBitfield);
|
||||
MockGraphicsAllocation mockAllocation;
|
||||
|
||||
csr.useNewResourceImplicitFlush = false;
|
||||
|
@ -750,7 +754,8 @@ TEST(CommandStreamReceiverSimpleTest, givenNewResourceFlushEnabledWhenProvidingN
|
|||
MockExecutionEnvironment executionEnvironment;
|
||||
executionEnvironment.prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
MockCommandStreamReceiver csr(executionEnvironment, 0);
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
MockCommandStreamReceiver csr(executionEnvironment, 0, deviceBitfield);
|
||||
MockGraphicsAllocation mockAllocation;
|
||||
|
||||
csr.useNewResourceImplicitFlush = true;
|
||||
|
@ -763,7 +768,8 @@ TEST(CommandStreamReceiverSimpleTest, givenNewResourceFlushEnabledWhenProvidingN
|
|||
MockExecutionEnvironment executionEnvironment;
|
||||
executionEnvironment.prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
MockCommandStreamReceiver csr(executionEnvironment, 0);
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
MockCommandStreamReceiver csr(executionEnvironment, 0, deviceBitfield);
|
||||
MockGraphicsAllocation mockAllocation;
|
||||
mockAllocation.setAllocationType(GraphicsAllocation::AllocationType::KERNEL_ISA);
|
||||
|
||||
|
@ -777,7 +783,8 @@ TEST(CommandStreamReceiverSimpleTest, givenNewResourceFlushEnabledWhenProvidingA
|
|||
MockExecutionEnvironment executionEnvironment;
|
||||
executionEnvironment.prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
MockCommandStreamReceiver csr(executionEnvironment, 0);
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
MockCommandStreamReceiver csr(executionEnvironment, 0, deviceBitfield);
|
||||
MockGraphicsAllocation mockAllocation;
|
||||
|
||||
csr.useNewResourceImplicitFlush = true;
|
||||
|
@ -793,7 +800,8 @@ TEST(CommandStreamReceiverSimpleTest, givenNewResourceFlushEnabledWhenProvidingN
|
|||
MockExecutionEnvironment executionEnvironment;
|
||||
executionEnvironment.prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
MockCommandStreamReceiver csr(executionEnvironment, 0);
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
MockCommandStreamReceiver csr(executionEnvironment, 0, deviceBitfield);
|
||||
MockGraphicsAllocation mockAllocation;
|
||||
|
||||
csr.useNewResourceImplicitFlush = true;
|
||||
|
@ -810,13 +818,17 @@ TEST(CommandStreamReceiverSimpleTest, givenNewResourceFlushEnabledWhenProvidingN
|
|||
TEST(CommandStreamReceiverSimpleTest, givenPrintfTagAllocationAddressFlagEnabledWhenCreatingTagAllocationThenPrintItsAddress) {
|
||||
DebugManagerStateRestore restore;
|
||||
DebugManager.flags.PrintTagAllocationAddress.set(true);
|
||||
|
||||
auto osContext = std::unique_ptr<OsContext>(OsContext::create(nullptr, 0, 0, aub_stream::EngineType::ENGINE_BCS, PreemptionMode::Disabled, false, false, false));
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
auto osContext = std::unique_ptr<OsContext>(OsContext::create(nullptr, 0, deviceBitfield,
|
||||
aub_stream::EngineType::ENGINE_BCS,
|
||||
PreemptionMode::Disabled,
|
||||
false, false, false));
|
||||
|
||||
MockExecutionEnvironment executionEnvironment;
|
||||
executionEnvironment.prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
MockCommandStreamReceiver csr(executionEnvironment, 0);
|
||||
|
||||
MockCommandStreamReceiver csr(executionEnvironment, 0, deviceBitfield);
|
||||
csr.setupContext(*osContext);
|
||||
|
||||
testing::internal::CaptureStdout();
|
||||
|
@ -836,7 +848,8 @@ TEST(CommandStreamReceiverSimpleTest, givenGpuIdleImplicitFlushCheckDisabledWhen
|
|||
MockExecutionEnvironment executionEnvironment;
|
||||
executionEnvironment.prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
MockCommandStreamReceiver csr(executionEnvironment, 0);
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
MockCommandStreamReceiver csr(executionEnvironment, 0, deviceBitfield);
|
||||
csr.callParentGetTagAddress = false;
|
||||
|
||||
csr.useGpuIdleImplicitFlush = false;
|
||||
|
@ -849,7 +862,8 @@ TEST(CommandStreamReceiverSimpleTest, givenGpuIdleImplicitFlushCheckEnabledWhenG
|
|||
MockExecutionEnvironment executionEnvironment;
|
||||
executionEnvironment.prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
MockCommandStreamReceiver csr(executionEnvironment, 0);
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
MockCommandStreamReceiver csr(executionEnvironment, 0, deviceBitfield);
|
||||
csr.callParentGetTagAddress = false;
|
||||
|
||||
csr.useGpuIdleImplicitFlush = true;
|
||||
|
@ -862,7 +876,8 @@ TEST(CommandStreamReceiverSimpleTest, givenGpuNotIdleImplicitFlushCheckEnabledWh
|
|||
MockExecutionEnvironment executionEnvironment;
|
||||
executionEnvironment.prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
MockCommandStreamReceiver csr(executionEnvironment, 0);
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
MockCommandStreamReceiver csr(executionEnvironment, 0, deviceBitfield);
|
||||
csr.callParentGetTagAddress = false;
|
||||
|
||||
csr.useGpuIdleImplicitFlush = true;
|
||||
|
@ -1109,7 +1124,7 @@ HWTEST_F(CommandStreamReceiverTest, givenDebugPauseThreadWhenSettingFlagProgress
|
|||
DebugManager.flags.PauseOnEnqueue.set(0);
|
||||
testing::internal::CaptureStdout();
|
||||
int32_t executionStamp = 0;
|
||||
auto mockCSR = new MockCsr<FamilyType>(executionStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCSR = new MockCsr<FamilyType>(executionStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
|
||||
uint32_t confirmationCounter = 0;
|
||||
|
||||
|
@ -1147,7 +1162,7 @@ HWTEST_F(CommandStreamReceiverTest, givenDebugPauseThreadWhenTerminatingAtFirstS
|
|||
DebugManager.flags.PauseOnEnqueue.set(0);
|
||||
testing::internal::CaptureStdout();
|
||||
int32_t executionStamp = 0;
|
||||
auto mockCSR = new MockCsr<FamilyType>(executionStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCSR = new MockCsr<FamilyType>(executionStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
|
||||
uint32_t confirmationCounter = 0;
|
||||
|
||||
|
@ -1166,7 +1181,7 @@ HWTEST_F(CommandStreamReceiverTest, givenDebugPauseThreadWhenTerminatingAtFirstS
|
|||
|
||||
HWTEST_F(CommandStreamReceiverTest, whenCreatingCommandStreamReceiverThenLastAddtionalKernelExecInfoValueIsCorrect) {
|
||||
int32_t executionStamp = 0;
|
||||
std::unique_ptr<MockCsr<FamilyType>> mockCSR(new MockCsr<FamilyType>(executionStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<MockCsr<FamilyType>> mockCSR(new MockCsr<FamilyType>(executionStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
EXPECT_EQ(AdditionalKernelExecInfo::NotSet, mockCSR->lastAdditionalKernelExecInfo);
|
||||
}
|
||||
|
||||
|
@ -1175,7 +1190,7 @@ HWTEST_F(CommandStreamReceiverTest, givenDebugPauseThreadWhenTerminatingAtSecond
|
|||
DebugManager.flags.PauseOnEnqueue.set(0);
|
||||
testing::internal::CaptureStdout();
|
||||
int32_t executionStamp = 0;
|
||||
auto mockCSR = new MockCsr<FamilyType>(executionStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCSR = new MockCsr<FamilyType>(executionStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
|
||||
uint32_t confirmationCounter = 0;
|
||||
|
||||
|
@ -1224,7 +1239,7 @@ HWTEST_P(CommandStreamReceiverWithAubSubCaptureTest, givenCommandStreamReceiverW
|
|||
MockExecutionEnvironment executionEnvironment;
|
||||
executionEnvironment.prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
MyMockCsr mockCsr(executionEnvironment, 0);
|
||||
MyMockCsr mockCsr(executionEnvironment, 0, 1);
|
||||
|
||||
mockCsr.programForAubSubCapture(wasActiveInPreviousEnqueue, isActive);
|
||||
|
||||
|
@ -1260,9 +1275,10 @@ HWTEST_F(SimulatedCommandStreamReceiverTest, givenCsrWithOsContextWhenGetDeviceI
|
|||
MockExecutionEnvironment executionEnvironment;
|
||||
executionEnvironment.prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
MockSimulatedCsrHw<FamilyType> csr(executionEnvironment, 0);
|
||||
DeviceBitfield deviceBitfield(0b11);
|
||||
MockSimulatedCsrHw<FamilyType> csr(executionEnvironment, 0, deviceBitfield);
|
||||
auto osContext = executionEnvironment.memoryManager->createAndRegisterOsContext(&csr, aub_stream::EngineType::ENGINE_RCS,
|
||||
0b11, PreemptionMode::Disabled,
|
||||
deviceBitfield, PreemptionMode::Disabled,
|
||||
false, false, false);
|
||||
|
||||
csr.setupContext(*osContext);
|
||||
|
@ -1273,9 +1289,10 @@ HWTEST_F(SimulatedCommandStreamReceiverTest, givenOsContextWithNoDeviceBitfieldW
|
|||
MockExecutionEnvironment executionEnvironment;
|
||||
executionEnvironment.prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
MockSimulatedCsrHw<FamilyType> csr(executionEnvironment, 0);
|
||||
DeviceBitfield deviceBitfield(0b00);
|
||||
MockSimulatedCsrHw<FamilyType> csr(executionEnvironment, 0, deviceBitfield);
|
||||
auto osContext = executionEnvironment.memoryManager->createAndRegisterOsContext(&csr, aub_stream::EngineType::ENGINE_RCS,
|
||||
0b00, PreemptionMode::Disabled,
|
||||
deviceBitfield, PreemptionMode::Disabled,
|
||||
false, false, false);
|
||||
|
||||
csr.setupContext(*osContext);
|
||||
|
@ -1345,7 +1362,8 @@ using CommandStreamReceiverPageTableManagerTest = ::testing::Test;
|
|||
TEST_F(CommandStreamReceiverPageTableManagerTest, givenNonDefaultEngineTypeWhenNeedsPageTableManagerIsCalledThenFalseIsReturned) {
|
||||
MockExecutionEnvironment executionEnvironment;
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
MockCommandStreamReceiver commandStreamReceiver(executionEnvironment, 0u);
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
MockCommandStreamReceiver commandStreamReceiver(executionEnvironment, 0u, deviceBitfield);
|
||||
auto hwInfo = executionEnvironment.rootDeviceEnvironments[0]->getHardwareInfo();
|
||||
auto defaultEngineType = getChosenEngineType(*hwInfo);
|
||||
auto engineType = aub_stream::EngineType::ENGINE_BCS;
|
||||
|
@ -1357,7 +1375,8 @@ TEST_F(CommandStreamReceiverPageTableManagerTest, givenNonDefaultEngineTypeWhenN
|
|||
TEST_F(CommandStreamReceiverPageTableManagerTest, givenDefaultEngineTypeAndExistingPageTableManagerWhenNeedsPageTableManagerIsCalledThenFalseIsReturned) {
|
||||
MockExecutionEnvironment executionEnvironment;
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
MockCommandStreamReceiver commandStreamReceiver(executionEnvironment, 0u);
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
MockCommandStreamReceiver commandStreamReceiver(executionEnvironment, 0u, deviceBitfield);
|
||||
auto hwInfo = executionEnvironment.rootDeviceEnvironments[0]->getHardwareInfo();
|
||||
auto defaultEngineType = getChosenEngineType(*hwInfo);
|
||||
|
||||
|
@ -1371,7 +1390,8 @@ TEST_F(CommandStreamReceiverPageTableManagerTest, givenDefaultEngineTypeAndExist
|
|||
TEST_F(CommandStreamReceiverPageTableManagerTest, givenDefaultEngineTypeAndNonExisitingPageTableManagerWhenNeedsPageTableManagerIsCalledThenSupportOfPageTableManagerIsReturned) {
|
||||
MockExecutionEnvironment executionEnvironment;
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
MockCommandStreamReceiver commandStreamReceiver(executionEnvironment, 0u);
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
MockCommandStreamReceiver commandStreamReceiver(executionEnvironment, 0u, deviceBitfield);
|
||||
auto hwInfo = executionEnvironment.rootDeviceEnvironments[0]->getHardwareInfo();
|
||||
auto defaultEngineType = getChosenEngineType(*hwInfo);
|
||||
bool supportsPageTableManager = HwHelper::get(hwInfo->platform.eRenderCoreFamily).isPageTableManagerSupported(*hwInfo);
|
||||
|
|
|
@ -33,8 +33,8 @@
|
|||
using namespace NEO;
|
||||
|
||||
struct MyMockCsr : UltCommandStreamReceiver<DEFAULT_TEST_FAMILY_NAME> {
|
||||
MyMockCsr(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex)
|
||||
: UltCommandStreamReceiver(executionEnvironment, rootDeviceIndex) {
|
||||
MyMockCsr(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield)
|
||||
: UltCommandStreamReceiver(executionEnvironment, rootDeviceIndex, deviceBitfield) {
|
||||
}
|
||||
|
||||
bool flush(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency) override {
|
||||
|
@ -103,8 +103,9 @@ struct MyMockCsr : UltCommandStreamReceiver<DEFAULT_TEST_FAMILY_NAME> {
|
|||
|
||||
template <typename BaseCSR>
|
||||
struct MyMockCsrWithAubDump : CommandStreamReceiverWithAUBDump<BaseCSR> {
|
||||
MyMockCsrWithAubDump<BaseCSR>(bool createAubCSR, ExecutionEnvironment &executionEnvironment) : CommandStreamReceiverWithAUBDump<BaseCSR>("aubfile", executionEnvironment, 0) {
|
||||
this->aubCSR.reset(createAubCSR ? new MyMockCsr(executionEnvironment, 0) : nullptr);
|
||||
MyMockCsrWithAubDump<BaseCSR>(bool createAubCSR, ExecutionEnvironment &executionEnvironment, DeviceBitfield deviceBitfield)
|
||||
: CommandStreamReceiverWithAUBDump<BaseCSR>("aubfile", executionEnvironment, 0, deviceBitfield) {
|
||||
this->aubCSR.reset(createAubCSR ? new MyMockCsr(executionEnvironment, 0, deviceBitfield) : nullptr);
|
||||
}
|
||||
|
||||
MyMockCsr &getAubMockCsr() const {
|
||||
|
@ -120,11 +121,13 @@ struct CommandStreamReceiverWithAubDumpTest : public ::testing::TestWithParam<bo
|
|||
memoryManager = executionEnvironment->memoryManager.get();
|
||||
ASSERT_NE(nullptr, memoryManager);
|
||||
createAubCSR = GetParam();
|
||||
csrWithAubDump = new MyMockCsrWithAubDump<MyMockCsr>(createAubCSR, *executionEnvironment);
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
csrWithAubDump = new MyMockCsrWithAubDump<MyMockCsr>(createAubCSR, *executionEnvironment, deviceBitfield);
|
||||
ASSERT_NE(nullptr, csrWithAubDump);
|
||||
|
||||
auto osContext = executionEnvironment->memoryManager->createAndRegisterOsContext(csrWithAubDump,
|
||||
getChosenEngineType(DEFAULT_TEST_PLATFORM::hwInfo), 1,
|
||||
getChosenEngineType(DEFAULT_TEST_PLATFORM::hwInfo),
|
||||
deviceBitfield,
|
||||
PreemptionHelper::getDefaultPreemptionMode(DEFAULT_TEST_PLATFORM::hwInfo),
|
||||
false, false, false);
|
||||
csrWithAubDump->setupContext(*osContext);
|
||||
|
@ -146,8 +149,8 @@ using CommandStreamReceiverWithAubDumpSimpleTest = Test<MockAubCenterFixture>;
|
|||
HWTEST_F(CommandStreamReceiverWithAubDumpSimpleTest, givenCsrWithAubDumpWhenSettingOsContextThenReplicateItToAubCsr) {
|
||||
ExecutionEnvironment *executionEnvironment = platform()->peekExecutionEnvironment();
|
||||
executionEnvironment->initializeMemoryManager();
|
||||
|
||||
CommandStreamReceiverWithAUBDump<UltCommandStreamReceiver<FamilyType>> csrWithAubDump("aubfile", *executionEnvironment, 0);
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
CommandStreamReceiverWithAUBDump<UltCommandStreamReceiver<FamilyType>> csrWithAubDump("aubfile", *executionEnvironment, 0, deviceBitfield);
|
||||
|
||||
auto hwInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo();
|
||||
MockOsContext osContext(0, 1, HwHelper::get(hwInfo->platform.eRenderCoreFamily).getGpgpuEngineInstances(*hwInfo)[0].first,
|
||||
|
@ -166,8 +169,8 @@ HWTEST_F(CommandStreamReceiverWithAubDumpSimpleTest, givenAubManagerAvailableWhe
|
|||
MockAubCenter *mockAubCenter = new MockAubCenter(defaultHwInfo.get(), false, fileName, CommandStreamReceiverType::CSR_TBX_WITH_AUB);
|
||||
mockAubCenter->aubManager = std::unique_ptr<MockAubManager>(mockManager);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->aubCenter = std::unique_ptr<MockAubCenter>(mockAubCenter);
|
||||
|
||||
CommandStreamReceiverWithAUBDump<TbxCommandStreamReceiverHw<FamilyType>> csrWithAubDump("aubfile", *executionEnvironment, 0);
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
CommandStreamReceiverWithAUBDump<TbxCommandStreamReceiverHw<FamilyType>> csrWithAubDump("aubfile", *executionEnvironment, 0, deviceBitfield);
|
||||
ASSERT_EQ(nullptr, csrWithAubDump.aubCSR);
|
||||
EXPECT_EQ(CommandStreamReceiverType::CSR_TBX_WITH_AUB, csrWithAubDump.getType());
|
||||
}
|
||||
|
@ -181,8 +184,8 @@ HWTEST_F(CommandStreamReceiverWithAubDumpSimpleTest, givenAubManagerAvailableWhe
|
|||
ExecutionEnvironment *executionEnvironment = platform()->peekExecutionEnvironment();
|
||||
executionEnvironment->initializeMemoryManager();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->aubCenter = std::unique_ptr<MockAubCenter>(mockAubCenter);
|
||||
|
||||
CommandStreamReceiverWithAUBDump<UltCommandStreamReceiver<FamilyType>> csrWithAubDump("aubfile", *executionEnvironment, 0);
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
CommandStreamReceiverWithAUBDump<UltCommandStreamReceiver<FamilyType>> csrWithAubDump("aubfile", *executionEnvironment, 0, deviceBitfield);
|
||||
ASSERT_NE(nullptr, csrWithAubDump.aubCSR);
|
||||
EXPECT_EQ(CommandStreamReceiverType::CSR_HW_WITH_AUB, csrWithAubDump.getType());
|
||||
}
|
||||
|
@ -194,11 +197,11 @@ HWTEST_F(CommandStreamReceiverWithAubDumpSimpleTest, givenCsrWithAubDumpWhenWait
|
|||
auto executionEnvironment = platform()->peekExecutionEnvironment();
|
||||
executionEnvironment->initializeMemoryManager();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->aubCenter = std::unique_ptr<MockAubCenter>(mockAubCenter);
|
||||
|
||||
CommandStreamReceiverWithAUBDump<UltCommandStreamReceiver<FamilyType>> csrWithAubDump("file_name.aub", *executionEnvironment, 0);
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
CommandStreamReceiverWithAUBDump<UltCommandStreamReceiver<FamilyType>> csrWithAubDump("file_name.aub", *executionEnvironment, 0, deviceBitfield);
|
||||
csrWithAubDump.initializeTagAllocation();
|
||||
|
||||
auto mockAubCsr = new MockAubCsr<FamilyType>("file_name.aub", false, *executionEnvironment, 0);
|
||||
auto mockAubCsr = new MockAubCsr<FamilyType>("file_name.aub", false, *executionEnvironment, 0, deviceBitfield);
|
||||
mockAubCsr->initializeTagAllocation();
|
||||
csrWithAubDump.aubCSR.reset(mockAubCsr);
|
||||
|
||||
|
@ -217,8 +220,8 @@ HWTEST_F(CommandStreamReceiverWithAubDumpSimpleTest, givenCsrWithAubDumpWhenCrea
|
|||
auto executionEnvironment = platform()->peekExecutionEnvironment();
|
||||
executionEnvironment->initializeMemoryManager();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->aubCenter = std::unique_ptr<MockAubCenter>(mockAubCenter);
|
||||
|
||||
CommandStreamReceiverWithAUBDump<UltCommandStreamReceiver<FamilyType>> csrWithAubDump("file_name.aub", *executionEnvironment, 0);
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
CommandStreamReceiverWithAUBDump<UltCommandStreamReceiver<FamilyType>> csrWithAubDump("file_name.aub", *executionEnvironment, 0, deviceBitfield);
|
||||
|
||||
EXPECT_NE(nullptr, csrWithAubDump.aubCSR->getTagAllocation());
|
||||
EXPECT_NE(nullptr, csrWithAubDump.aubCSR->getTagAddress());
|
||||
|
@ -235,7 +238,8 @@ HWTEST_F(CommandStreamReceiverWithAubDumpSimpleTest, givenAubCsrWithHwWhenAdding
|
|||
executionEnvironment->rootDeviceEnvironments[0]->aubCenter = std::unique_ptr<MockAubCenter>(mockAubCenter);
|
||||
|
||||
EXPECT_FALSE(mockAubManager->addCommentCalled);
|
||||
CommandStreamReceiverWithAUBDump<UltCommandStreamReceiver<FamilyType>> csrWithAubDump("file_name.aub", *executionEnvironment, 0);
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
CommandStreamReceiverWithAUBDump<UltCommandStreamReceiver<FamilyType>> csrWithAubDump("file_name.aub", *executionEnvironment, 0, deviceBitfield);
|
||||
csrWithAubDump.addAubComment("test");
|
||||
EXPECT_TRUE(mockAubManager->addCommentCalled);
|
||||
}
|
||||
|
@ -248,8 +252,8 @@ HWTEST_F(CommandStreamReceiverWithAubDumpSimpleTest, givenAubCsrWithTbxWhenAddin
|
|||
auto executionEnvironment = platform()->peekExecutionEnvironment();
|
||||
executionEnvironment->initializeMemoryManager();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->aubCenter = std::unique_ptr<MockAubCenter>(mockAubCenter);
|
||||
|
||||
CommandStreamReceiverWithAUBDump<TbxCommandStreamReceiverHw<FamilyType>> csrWithAubDump("file_name.aub", *executionEnvironment, 0);
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
CommandStreamReceiverWithAUBDump<TbxCommandStreamReceiverHw<FamilyType>> csrWithAubDump("file_name.aub", *executionEnvironment, 0, deviceBitfield);
|
||||
csrWithAubDump.addAubComment("test");
|
||||
EXPECT_FALSE(mockAubManager->addCommentCalled);
|
||||
}
|
||||
|
@ -306,17 +310,17 @@ struct CommandStreamReceiverTagTests : public ::testing::Test {
|
|||
};
|
||||
|
||||
HWTEST_F(CommandStreamReceiverTagTests, givenCsrTypeWhenCreatingTimestampPacketAllocatorThenSetDefaultCompletionCheckType) {
|
||||
EXPECT_TRUE(isTimestampPacketNodeReleasable<CommandStreamReceiverHw<FamilyType>>(*executionEnvironment, 0));
|
||||
EXPECT_FALSE(isTimestampPacketNodeReleasable<AUBCommandStreamReceiverHw<FamilyType>>(fileName, false, *executionEnvironment, 0));
|
||||
EXPECT_FALSE(isTimestampPacketNodeReleasable<AubWithHw<FamilyType>>(fileName, *executionEnvironment, 0));
|
||||
EXPECT_FALSE(isTimestampPacketNodeReleasable<AubWithTbx<FamilyType>>(fileName, *executionEnvironment, 0));
|
||||
EXPECT_TRUE(isTimestampPacketNodeReleasable<CommandStreamReceiverHw<FamilyType>>(*executionEnvironment, 0, 1));
|
||||
EXPECT_FALSE(isTimestampPacketNodeReleasable<AUBCommandStreamReceiverHw<FamilyType>>(fileName, false, *executionEnvironment, 0, 1));
|
||||
EXPECT_FALSE(isTimestampPacketNodeReleasable<AubWithHw<FamilyType>>(fileName, *executionEnvironment, 0, 1));
|
||||
EXPECT_FALSE(isTimestampPacketNodeReleasable<AubWithTbx<FamilyType>>(fileName, *executionEnvironment, 0, 1));
|
||||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverTagTests, givenCsrTypeWhenAskingForTagPoolSizeThenReturnOneForAubTbxMode) {
|
||||
EXPECT_EQ(2048u, getPreferredTagPoolSize<CommandStreamReceiverHw<FamilyType>>(*executionEnvironment, 0));
|
||||
EXPECT_EQ(1u, getPreferredTagPoolSize<AUBCommandStreamReceiverHw<FamilyType>>(fileName, false, *executionEnvironment, 0));
|
||||
EXPECT_EQ(1u, getPreferredTagPoolSize<AubWithHw<FamilyType>>(fileName, *executionEnvironment, 0));
|
||||
EXPECT_EQ(1u, getPreferredTagPoolSize<AubWithTbx<FamilyType>>(fileName, *executionEnvironment, 0));
|
||||
EXPECT_EQ(2048u, getPreferredTagPoolSize<CommandStreamReceiverHw<FamilyType>>(*executionEnvironment, 0, 1));
|
||||
EXPECT_EQ(1u, getPreferredTagPoolSize<AUBCommandStreamReceiverHw<FamilyType>>(fileName, false, *executionEnvironment, 0, 1));
|
||||
EXPECT_EQ(1u, getPreferredTagPoolSize<AubWithHw<FamilyType>>(fileName, *executionEnvironment, 0, 1));
|
||||
EXPECT_EQ(1u, getPreferredTagPoolSize<AubWithTbx<FamilyType>>(fileName, *executionEnvironment, 0, 1));
|
||||
}
|
||||
|
||||
using SimulatedCsrTest = ::testing::Test;
|
||||
|
@ -330,8 +334,8 @@ HWTEST_F(SimulatedCsrTest, givenHwWithAubDumpCsrTypeWhenCreateCommandStreamRecei
|
|||
|
||||
EXPECT_EQ(nullptr, executionEnvironment.rootDeviceEnvironments[expectedRootDeviceIndex]->aubCenter.get());
|
||||
EXPECT_FALSE(rootDeviceEnvironment->initAubCenterCalled);
|
||||
|
||||
auto csr = std::make_unique<CommandStreamReceiverWithAUBDump<UltCommandStreamReceiver<FamilyType>>>("", executionEnvironment, expectedRootDeviceIndex);
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
auto csr = std::make_unique<CommandStreamReceiverWithAUBDump<UltCommandStreamReceiver<FamilyType>>>("", executionEnvironment, expectedRootDeviceIndex, deviceBitfield);
|
||||
EXPECT_TRUE(rootDeviceEnvironment->initAubCenterCalled);
|
||||
EXPECT_NE(nullptr, rootDeviceEnvironment->aubCenter.get());
|
||||
}
|
||||
|
@ -346,8 +350,8 @@ HWTEST_F(SimulatedCsrTest, givenTbxWithAubDumpCsrTypeWhenCreateCommandStreamRece
|
|||
|
||||
EXPECT_EQ(nullptr, executionEnvironment.rootDeviceEnvironments[expectedRootDeviceIndex]->aubCenter.get());
|
||||
EXPECT_FALSE(rootDeviceEnvironment->initAubCenterCalled);
|
||||
|
||||
auto csr = std::make_unique<CommandStreamReceiverWithAUBDump<TbxCommandStreamReceiverHw<FamilyType>>>("", executionEnvironment, expectedRootDeviceIndex);
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
auto csr = std::make_unique<CommandStreamReceiverWithAUBDump<TbxCommandStreamReceiverHw<FamilyType>>>("", executionEnvironment, expectedRootDeviceIndex, deviceBitfield);
|
||||
EXPECT_TRUE(rootDeviceEnvironment->initAubCenterCalled);
|
||||
EXPECT_NE(nullptr, rootDeviceEnvironment->aubCenter.get());
|
||||
}
|
||||
|
@ -357,8 +361,8 @@ HWTEST_F(CommandStreamReceiverWithAubDumpSimpleTest, givenNullAubManagerAvailabl
|
|||
ExecutionEnvironment *executionEnvironment = platform()->peekExecutionEnvironment();
|
||||
executionEnvironment->initializeMemoryManager();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->aubCenter = std::unique_ptr<MockAubCenter>(mockAubCenter);
|
||||
|
||||
CommandStreamReceiverWithAUBDump<TbxCommandStreamReceiverHw<FamilyType>> csrWithAubDump("aubfile", *executionEnvironment, 0);
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
CommandStreamReceiverWithAUBDump<TbxCommandStreamReceiverHw<FamilyType>> csrWithAubDump("aubfile", *executionEnvironment, 0, deviceBitfield);
|
||||
EXPECT_NE(nullptr, csrWithAubDump.aubCSR);
|
||||
}
|
||||
|
||||
|
@ -367,7 +371,8 @@ HWTEST_F(CommandStreamReceiverWithAubDumpSimpleTest, givenAubManagerNotAvailable
|
|||
|
||||
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get());
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
CommandStreamReceiverWithAUBDump<UltCommandStreamReceiver<FamilyType>> csrWithAubDump("aubfile", executionEnvironment, 0);
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
CommandStreamReceiverWithAUBDump<UltCommandStreamReceiver<FamilyType>> csrWithAubDump("aubfile", executionEnvironment, 0, deviceBitfield);
|
||||
ASSERT_NE(nullptr, csrWithAubDump.aubCSR);
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,8 @@ struct ComputeModeRequirements : public ::testing::Test {
|
|||
using CommandStreamReceiver::commandStream;
|
||||
using CommandStreamReceiverHw<FamilyType>::lastSentThreadArbitrationPolicy;
|
||||
using CommandStreamReceiverHw<FamilyType>::requiredThreadArbitrationPolicy;
|
||||
myCsr(ExecutionEnvironment &executionEnvironment) : UltCommandStreamReceiver<FamilyType>(executionEnvironment, 0){};
|
||||
myCsr(ExecutionEnvironment &executionEnvironment, DeviceBitfield deviceBitfield)
|
||||
: UltCommandStreamReceiver<FamilyType>(executionEnvironment, 0, deviceBitfield){};
|
||||
CsrSizeRequestFlags *getCsrRequestFlags() { return &this->csrSizeRequestFlags; }
|
||||
};
|
||||
void makeResidentSharedAlloc() {
|
||||
|
@ -67,7 +68,7 @@ struct ComputeModeRequirements : public ::testing::Test {
|
|||
template <typename FamilyType>
|
||||
void SetUpImpl(const NEO::HardwareInfo *hardwareInfo) {
|
||||
device.reset(MockDevice::createWithNewExecutionEnvironment<MockDevice>(hardwareInfo));
|
||||
csr = new myCsr<FamilyType>(*device->executionEnvironment);
|
||||
csr = new myCsr<FamilyType>(*device->executionEnvironment, device->getDeviceBitfield());
|
||||
device->resetCommandStreamReceiver(csr);
|
||||
AllocationProperties properties(device->getRootDeviceIndex(), false, MemoryConstants::pageSize, GraphicsAllocation::AllocationType::SHARED_BUFFER, false, {});
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ HWTEST_P(CreateCommandStreamReceiverTest, givenCreateCommandStreamWhenCsrIsSetTo
|
|||
VariableBackup<UltHwConfig> backup(&ultHwConfig);
|
||||
ultHwConfig.useHwCsr = true;
|
||||
DebugManager.flags.SetCommandStreamReceiver.set(csrType);
|
||||
auto csr = std::unique_ptr<CommandStreamReceiver>(createCommandStream(*executionEnvironment, 0));
|
||||
auto csr = std::unique_ptr<CommandStreamReceiver>(createCommandStream(*executionEnvironment, 0, 1));
|
||||
|
||||
if (csrType < CommandStreamReceiverType::CSR_TYPES_NUM) {
|
||||
EXPECT_NE(nullptr, csr.get());
|
||||
|
|
|
@ -593,7 +593,7 @@ HWTEST_F(SubmissionsAggregatorTests, givenMultipleQueuesWhenCmdBuffersAreRecorde
|
|||
MockKernelWithInternals kernel(*device.get());
|
||||
CommandQueueHw<FamilyType> cmdQ1(context.get(), device.get(), 0, false);
|
||||
CommandQueueHw<FamilyType> cmdQ2(context.get(), device.get(), 0, false);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->executionEnvironment, device->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->executionEnvironment, device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
size_t GWS = 1;
|
||||
|
@ -627,7 +627,7 @@ HWTEST_F(SubmissionsAggregatorTests, givenMultipleQueuesWhenCmdBuffersAreRecorde
|
|||
HWTEST_F(SubmissionsAggregatorTests, givenCmdQueueWhenCmdBufferWithEventIsRecordedThenAssignFlushStampObjForEveryone) {
|
||||
MockKernelWithInternals kernel(*device.get());
|
||||
CommandQueueHw<FamilyType> cmdQ1(context.get(), device.get(), 0, false);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->executionEnvironment, device->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->executionEnvironment, device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
size_t GWS = 1;
|
||||
|
@ -655,7 +655,7 @@ HWTEST_F(SubmissionsAggregatorTests, givenMultipleCmdBuffersWhenFlushThenUpdateA
|
|||
MockKernelWithInternals kernel(*device.get());
|
||||
CommandQueueHw<FamilyType> cmdQ1(context.get(), device.get(), 0, false);
|
||||
CommandQueueHw<FamilyType> cmdQ2(context.get(), device.get(), 0, false);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->executionEnvironment, device->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->executionEnvironment, device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
mockCsr->useNewResourceImplicitFlush = false;
|
||||
mockCsr->useGpuIdleImplicitFlush = false;
|
||||
size_t GWS = 1;
|
||||
|
@ -684,7 +684,7 @@ HWTEST_F(SubmissionsAggregatorTests, givenMultipleCmdBuffersWhenNotAggregatedDur
|
|||
MockKernelWithInternals kernel(*device.get());
|
||||
CommandQueueHw<FamilyType> cmdQ1(context.get(), device.get(), 0, false);
|
||||
CommandQueueHw<FamilyType> cmdQ2(context.get(), device.get(), 0, false);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->executionEnvironment, device->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->executionEnvironment, device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
size_t GWS = 1;
|
||||
|
||||
overrideCsr(mockCsr);
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace NEO {
|
|||
|
||||
void TbxCommandStreamFixture::SetUp(MockDevice *pDevice) {
|
||||
// Create our TBX command stream receiver based on HW type
|
||||
pCommandStreamReceiver = TbxCommandStreamReceiver::create("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pCommandStreamReceiver = TbxCommandStreamReceiver::create("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
ASSERT_NE(nullptr, pCommandStreamReceiver);
|
||||
memoryManager = new OsAgnosticMemoryManager(*pDevice->executionEnvironment);
|
||||
pDevice->resetCommandStreamReceiver(pCommandStreamReceiver);
|
||||
|
|
|
@ -145,7 +145,7 @@ TEST(TbxCommandStreamReceiverTest, givenNullFactoryEntryWhenTbxCsrIsCreatedThenN
|
|||
|
||||
tbxCommandStreamReceiverFactory[family] = nullptr;
|
||||
|
||||
CommandStreamReceiver *csr = TbxCommandStreamReceiver::create("", false, *executionEnvironment, 0);
|
||||
CommandStreamReceiver *csr = TbxCommandStreamReceiver::create("", false, *executionEnvironment, 0, 1);
|
||||
EXPECT_EQ(nullptr, csr);
|
||||
}
|
||||
|
||||
|
@ -156,14 +156,14 @@ TEST(TbxCommandStreamReceiverTest, givenTbxCommandStreamReceiverWhenItIsCreatedW
|
|||
|
||||
hwInfo->platform.eRenderCoreFamily = GFXCORE_FAMILY_FORCE_ULONG; // wrong gfx core family
|
||||
|
||||
CommandStreamReceiver *csr = TbxCommandStreamReceiver::create("", false, *executionEnvironment, 0);
|
||||
CommandStreamReceiver *csr = TbxCommandStreamReceiver::create("", false, *executionEnvironment, 0, 1);
|
||||
EXPECT_EQ(nullptr, csr);
|
||||
}
|
||||
|
||||
TEST(TbxCommandStreamReceiverTest, givenTbxCommandStreamReceiverWhenTypeIsCheckedThenTbxCsrIsReturned) {
|
||||
ExecutionEnvironment *executionEnvironment = platform()->peekExecutionEnvironment();
|
||||
executionEnvironment->initializeMemoryManager();
|
||||
std::unique_ptr<CommandStreamReceiver> csr(TbxCommandStreamReceiver::create("", false, *executionEnvironment, 0));
|
||||
std::unique_ptr<CommandStreamReceiver> csr(TbxCommandStreamReceiver::create("", false, *executionEnvironment, 0, 1));
|
||||
EXPECT_NE(nullptr, csr);
|
||||
EXPECT_EQ(CommandStreamReceiverType::CSR_TBX, csr->getType());
|
||||
}
|
||||
|
@ -191,7 +191,7 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverWhenItIsCreatedWith
|
|||
|
||||
using TbxCsrWithAubDump = CommandStreamReceiverWithAUBDump<TbxCommandStreamReceiverHw<FamilyType>>;
|
||||
std::unique_ptr<TbxCsrWithAubDump> tbxCsrWithAubDump(static_cast<TbxCsrWithAubDump *>(
|
||||
TbxCommandStreamReceiverHw<FamilyType>::create("aubfile", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex())));
|
||||
TbxCommandStreamReceiverHw<FamilyType>::create("aubfile", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield())));
|
||||
|
||||
EXPECT_TRUE(tbxCsrWithAubDump->aubManager->isOpen());
|
||||
EXPECT_STREQ("aubcapture_file_name.aub", tbxCsrWithAubDump->aubManager->getFileName().c_str());
|
||||
|
@ -368,13 +368,13 @@ HWTEST_F(TbxCommandStreamTests, givenNoDbgDeviceIdFlagWhenTbxCsrIsCreatedThenUse
|
|||
HWTEST_F(TbxCommandStreamTests, givenDbgDeviceIdFlagIsSetWhenTbxCsrIsCreatedThenUseDebugDeviceId) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.OverrideAubDeviceId.set(9); //this is Hsw, not used
|
||||
std::unique_ptr<TbxCommandStreamReceiverHw<FamilyType>> tbxCsr(reinterpret_cast<TbxCommandStreamReceiverHw<FamilyType> *>(TbxCommandStreamReceiver::create("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex())));
|
||||
std::unique_ptr<TbxCommandStreamReceiverHw<FamilyType>> tbxCsr(reinterpret_cast<TbxCommandStreamReceiverHw<FamilyType> *>(TbxCommandStreamReceiver::create("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield())));
|
||||
EXPECT_EQ(9u, tbxCsr->aubDeviceId);
|
||||
}
|
||||
|
||||
HWTEST_F(TbxCommandSteamSimpleTest, givenTbxCsrWhenCallingMakeSurfacePackNonResidentThenOnlyResidentAllocationsAddedAllocationsForDownload) {
|
||||
MockTbxCsr<FamilyType> tbxCsr{*pDevice->executionEnvironment};
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
MockTbxCsr<FamilyType> tbxCsr{*pDevice->executionEnvironment, pDevice->getDeviceBitfield()};
|
||||
MockOsContext osContext(0, pDevice->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
tbxCsr.setupContext(osContext);
|
||||
|
||||
EXPECT_EQ(0u, tbxCsr.allocationsForDownload.size());
|
||||
|
@ -394,8 +394,8 @@ HWTEST_F(TbxCommandSteamSimpleTest, givenTbxCsrWhenCallingMakeSurfacePackNonResi
|
|||
}
|
||||
|
||||
HWTEST_F(TbxCommandSteamSimpleTest, givenTbxCsrWhenCallingWaitForTaskCountWithKmdNotifyFallbackThenTagAllocationAndScheduledAllocationsAreDownloaded) {
|
||||
MockTbxCsrRegisterDownloadedAllocations<FamilyType> tbxCsr{*pDevice->executionEnvironment, pDevice->getRootDeviceIndex()};
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
MockTbxCsrRegisterDownloadedAllocations<FamilyType> tbxCsr{*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()};
|
||||
MockOsContext osContext(0, pDevice->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
uint32_t tag = 0u;
|
||||
tbxCsr.setupContext(osContext);
|
||||
tbxCsr.setTagAllocation(pDevice->getMemoryManager()->allocateGraphicsMemoryWithProperties(MockAllocationProperties{pDevice->getRootDeviceIndex(), false, sizeof(tag), pDevice->getDeviceBitfield()}, &tag));
|
||||
|
@ -419,8 +419,8 @@ HWTEST_F(TbxCommandSteamSimpleTest, givenTbxCsrWhenCallingWaitForTaskCountWithKm
|
|||
}
|
||||
|
||||
HWTEST_F(TbxCommandSteamSimpleTest, givenTbxCsrWhenCallingWaitForCompletionWithTimeoutThenFlushIsCalledAndTagAllocationAndScheduledAllocationsAreDownloaded) {
|
||||
MockTbxCsrRegisterDownloadedAllocations<FamilyType> tbxCsr{*pDevice->executionEnvironment, pDevice->getRootDeviceIndex()};
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
MockTbxCsrRegisterDownloadedAllocations<FamilyType> tbxCsr{*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()};
|
||||
MockOsContext osContext(0, pDevice->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
uint32_t tag = 0u;
|
||||
tbxCsr.setupContext(osContext);
|
||||
tbxCsr.setTagAllocation(pDevice->getMemoryManager()->allocateGraphicsMemoryWithProperties(MockAllocationProperties{pDevice->getRootDeviceIndex(), false, sizeof(tag), pDevice->getDeviceBitfield()}, &tag));
|
||||
|
@ -445,8 +445,8 @@ HWTEST_F(TbxCommandSteamSimpleTest, givenTbxCsrWhenCallingWaitForCompletionWithT
|
|||
}
|
||||
|
||||
HWTEST_F(TbxCommandSteamSimpleTest, givenTbxCsrWhenDownloadAllocatoinsCalledThenTagAndScheduledAllocationsAreDownloadedAndRemovedFromContainer) {
|
||||
MockTbxCsrRegisterDownloadedAllocations<FamilyType> tbxCsr{*pDevice->executionEnvironment, pDevice->getRootDeviceIndex()};
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
MockTbxCsrRegisterDownloadedAllocations<FamilyType> tbxCsr{*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()};
|
||||
MockOsContext osContext(0, pDevice->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
uint32_t tag = 0u;
|
||||
tbxCsr.setupContext(osContext);
|
||||
tbxCsr.setTagAllocation(pDevice->getMemoryManager()->allocateGraphicsMemoryWithProperties(MockAllocationProperties{pDevice->getRootDeviceIndex(), false, sizeof(tag), pDevice->getDeviceBitfield()}, &tag));
|
||||
|
@ -461,7 +461,7 @@ HWTEST_F(TbxCommandSteamSimpleTest, givenTbxCsrWhenDownloadAllocatoinsCalledThen
|
|||
}
|
||||
|
||||
HWTEST_F(TbxCommandSteamSimpleTest, whenTbxCommandStreamReceiverIsCreatedThenPPGTTAndGGTTCreatedHavePhysicalAddressAllocatorSet) {
|
||||
MockTbxCsr<FamilyType> tbxCsr(*pDevice->executionEnvironment);
|
||||
MockTbxCsr<FamilyType> tbxCsr(*pDevice->executionEnvironment, pDevice->getDeviceBitfield());
|
||||
|
||||
uintptr_t address = 0x20000;
|
||||
auto physicalAddress = tbxCsr.ppgtt->map(address, MemoryConstants::pageSize, 0, MemoryBanks::MainBank);
|
||||
|
@ -472,7 +472,7 @@ HWTEST_F(TbxCommandSteamSimpleTest, whenTbxCommandStreamReceiverIsCreatedThenPPG
|
|||
}
|
||||
|
||||
HWTEST_F(TbxCommandSteamSimpleTest, givenTbxCommandStreamReceiverWhenPhysicalAddressAllocatorIsCreatedThenItIsNotNull) {
|
||||
MockTbxCsr<FamilyType> tbxCsr(*pDevice->executionEnvironment);
|
||||
MockTbxCsr<FamilyType> tbxCsr(*pDevice->executionEnvironment, pDevice->getDeviceBitfield());
|
||||
std::unique_ptr<PhysicalAddressAllocator> allocator(tbxCsr.createPhysicalAddressAllocator(&hardwareInfo));
|
||||
ASSERT_NE(nullptr, allocator);
|
||||
}
|
||||
|
@ -483,13 +483,13 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverWhenItIsCreatedWith
|
|||
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get(), false, 1);
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
|
||||
auto tbxCsr = std::make_unique<TbxCommandStreamReceiverHw<FamilyType>>(executionEnvironment, 0);
|
||||
auto tbxCsr = std::make_unique<TbxCommandStreamReceiverHw<FamilyType>>(executionEnvironment, 0, 1);
|
||||
EXPECT_EQ(nullptr, executionEnvironment.rootDeviceEnvironments[0]->aubCenter->getAubManager());
|
||||
}
|
||||
|
||||
HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverWhenFlushIsCalledThenItShouldCallTheExpectedHwContextFunctions) {
|
||||
MockTbxCsr<FamilyType> tbxCsr(*pDevice->executionEnvironment);
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
MockTbxCsr<FamilyType> tbxCsr(*pDevice->executionEnvironment, pDevice->getDeviceBitfield());
|
||||
MockOsContext osContext(0, pDevice->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
tbxCsr.setupContext(osContext);
|
||||
auto mockHardwareContext = static_cast<MockHardwareContext *>(tbxCsr.hardwareContextController->hardwareContexts[0].get());
|
||||
|
||||
|
@ -515,8 +515,8 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverInBatchedModeWhenFl
|
|||
DebugManagerStateRestore dbgRestore;
|
||||
DebugManager.flags.CsrDispatchMode.set(static_cast<uint32_t>(DispatchMode::BatchedDispatch));
|
||||
|
||||
MockTbxCsr<FamilyType> tbxCsr(*pDevice->executionEnvironment);
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
MockTbxCsr<FamilyType> tbxCsr(*pDevice->executionEnvironment, pDevice->getDeviceBitfield());
|
||||
MockOsContext osContext(0, pDevice->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
tbxCsr.setupContext(osContext);
|
||||
|
||||
auto commandBuffer = pDevice->executionEnvironment->memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{pDevice->getRootDeviceIndex(), MemoryConstants::pageSize, pDevice->getDeviceBitfield()});
|
||||
|
@ -533,8 +533,8 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverInBatchedModeWhenFl
|
|||
}
|
||||
|
||||
HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverWhenFlushIsCalledWithZeroSizedBufferThenSubmitIsNotCalledOnHwContext) {
|
||||
MockTbxCsr<FamilyType> tbxCsr(*pDevice->executionEnvironment);
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
MockTbxCsr<FamilyType> tbxCsr(*pDevice->executionEnvironment, pDevice->getDeviceBitfield());
|
||||
MockOsContext osContext(0, pDevice->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
tbxCsr.setupContext(osContext);
|
||||
auto mockHardwareContext = static_cast<MockHardwareContext *>(tbxCsr.hardwareContextController->hardwareContexts[0].get());
|
||||
|
||||
|
@ -551,8 +551,8 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverWhenFlushIsCalledWi
|
|||
}
|
||||
|
||||
HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverWhenMakeResidentIsCalledThenItShouldCallTheExpectedHwContextFunctions) {
|
||||
MockTbxCsr<FamilyType> tbxCsr(*pDevice->executionEnvironment);
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
MockTbxCsr<FamilyType> tbxCsr(*pDevice->executionEnvironment, pDevice->getDeviceBitfield());
|
||||
MockOsContext osContext(0, pDevice->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
tbxCsr.setupContext(osContext);
|
||||
|
||||
MockGraphicsAllocation allocation(reinterpret_cast<void *>(0x1000), 0x1000);
|
||||
|
@ -563,8 +563,8 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverWhenMakeResidentIsC
|
|||
}
|
||||
|
||||
HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverWhenDownloadAllocationIsCalledThenItShouldCallTheExpectedHwContextFunctions) {
|
||||
MockTbxCsr<FamilyType> tbxCsr(*pDevice->executionEnvironment);
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
MockTbxCsr<FamilyType> tbxCsr(*pDevice->executionEnvironment, pDevice->getDeviceBitfield());
|
||||
MockOsContext osContext(0, pDevice->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
tbxCsr.setupContext(osContext);
|
||||
auto mockHardwareContext = static_cast<MockHardwareContext *>(tbxCsr.hardwareContextController->hardwareContexts[0].get());
|
||||
|
||||
|
@ -581,14 +581,14 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrWhenHardwareContextIsCreatedThenTbxSt
|
|||
|
||||
pDevice->executionEnvironment->rootDeviceEnvironments[0]->aubCenter = std::unique_ptr<MockAubCenter>(mockAubCenter);
|
||||
auto tbxCsr = std::unique_ptr<TbxCommandStreamReceiverHw<FamilyType>>(reinterpret_cast<TbxCommandStreamReceiverHw<FamilyType> *>(
|
||||
TbxCommandStreamReceiverHw<FamilyType>::create("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex())));
|
||||
TbxCommandStreamReceiverHw<FamilyType>::create("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield())));
|
||||
|
||||
EXPECT_FALSE(tbxCsr->streamInitialized);
|
||||
}
|
||||
|
||||
HWTEST_F(TbxCommandStreamTests, givenTbxCsrWhenOsContextIsSetThenCreateHardwareContext) {
|
||||
auto hwInfo = pDevice->getHardwareInfo();
|
||||
MockOsContext osContext(0, 1, HwHelper::get(hwInfo.platform.eRenderCoreFamily).getGpgpuEngineInstances(hwInfo)[0].first,
|
||||
MockOsContext osContext(0, pDevice->getDeviceBitfield(), HwHelper::get(hwInfo.platform.eRenderCoreFamily).getGpgpuEngineInstances(hwInfo)[0].first,
|
||||
PreemptionMode::Disabled, false, false, false);
|
||||
std::string fileName = "";
|
||||
MockAubManager *mockManager = new MockAubManager();
|
||||
|
@ -597,7 +597,7 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrWhenOsContextIsSetThenCreateHardwareC
|
|||
|
||||
pDevice->executionEnvironment->rootDeviceEnvironments[0]->aubCenter = std::unique_ptr<MockAubCenter>(mockAubCenter);
|
||||
|
||||
std::unique_ptr<TbxCommandStreamReceiverHw<FamilyType>> tbxCsr(reinterpret_cast<TbxCommandStreamReceiverHw<FamilyType> *>(TbxCommandStreamReceiver::create(fileName, false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex())));
|
||||
std::unique_ptr<TbxCommandStreamReceiverHw<FamilyType>> tbxCsr(reinterpret_cast<TbxCommandStreamReceiverHw<FamilyType> *>(TbxCommandStreamReceiver::create(fileName, false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield())));
|
||||
EXPECT_EQ(nullptr, tbxCsr->hardwareContextController.get());
|
||||
|
||||
tbxCsr->setupContext(osContext);
|
||||
|
@ -605,11 +605,11 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrWhenOsContextIsSetThenCreateHardwareC
|
|||
}
|
||||
|
||||
HWTEST_F(TbxCommandStreamTests, givenTbxCsrWhenPollForCompletionImplIsCalledThenSimulatedCsrMethodIsCalled) {
|
||||
std::unique_ptr<TbxCommandStreamReceiverHw<FamilyType>> tbxCsr(reinterpret_cast<TbxCommandStreamReceiverHw<FamilyType> *>(TbxCommandStreamReceiver::create("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex())));
|
||||
std::unique_ptr<TbxCommandStreamReceiverHw<FamilyType>> tbxCsr(reinterpret_cast<TbxCommandStreamReceiverHw<FamilyType> *>(TbxCommandStreamReceiver::create("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield())));
|
||||
tbxCsr->pollForCompletionImpl();
|
||||
}
|
||||
HWTEST_F(TbxCommandStreamTests, givenTbxCsrWhenItIsQueriedForPreferredTagPoolSizeThenOneIsReturned) {
|
||||
std::unique_ptr<TbxCommandStreamReceiverHw<FamilyType>> tbxCsr(reinterpret_cast<TbxCommandStreamReceiverHw<FamilyType> *>(TbxCommandStreamReceiver::create("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex())));
|
||||
std::unique_ptr<TbxCommandStreamReceiverHw<FamilyType>> tbxCsr(reinterpret_cast<TbxCommandStreamReceiverHw<FamilyType> *>(TbxCommandStreamReceiver::create("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield())));
|
||||
EXPECT_EQ(1u, tbxCsr->getPreferredTagPoolSize());
|
||||
}
|
||||
|
||||
|
@ -623,7 +623,7 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrWhenCreatedWithAubDumpThenFileNameIsE
|
|||
|
||||
auto fullName = AUBCommandStreamReceiver::createFullFilePath(*defaultHwInfo, "aubfile");
|
||||
|
||||
std::unique_ptr<TbxCommandStreamReceiverHw<FamilyType>> tbxCsr(reinterpret_cast<TbxCommandStreamReceiverHw<FamilyType> *>(TbxCommandStreamReceiver::create("aubfile", true, executionEnvironment, 0)));
|
||||
std::unique_ptr<TbxCommandStreamReceiverHw<FamilyType>> tbxCsr(reinterpret_cast<TbxCommandStreamReceiverHw<FamilyType> *>(TbxCommandStreamReceiver::create("aubfile", true, executionEnvironment, 0, 1)));
|
||||
EXPECT_STREQ(fullName.c_str(), rootDeviceEnvironment->aubFileNameReceived.c_str());
|
||||
}
|
||||
|
||||
|
@ -633,7 +633,7 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrWhenCreatedWithAubDumpThenOpenIsCalle
|
|||
executionEnvironment.initializeMemoryManager();
|
||||
|
||||
std::unique_ptr<TbxCommandStreamReceiverHw<FamilyType>> tbxCsrWithAubDump(reinterpret_cast<TbxCommandStreamReceiverHw<FamilyType> *>(
|
||||
TbxCommandStreamReceiver::create("aubfile", true, executionEnvironment, 0)));
|
||||
TbxCommandStreamReceiver::create("aubfile", true, executionEnvironment, 0, 1)));
|
||||
EXPECT_TRUE(tbxCsrWithAubDump->aubManager->isOpen());
|
||||
}
|
||||
|
||||
|
@ -651,7 +651,7 @@ HWTEST_F(SimulatedCsrTest, givenTbxCsrTypeWhenCreateCommandStreamReceiverThenPro
|
|||
EXPECT_EQ(nullptr, executionEnvironment.rootDeviceEnvironments[expectedRootDeviceIndex]->aubCenter.get());
|
||||
EXPECT_FALSE(rootDeviceEnvironment->initAubCenterCalled);
|
||||
|
||||
auto csr = std::make_unique<TbxCommandStreamReceiverHw<FamilyType>>(executionEnvironment, expectedRootDeviceIndex);
|
||||
auto csr = std::make_unique<TbxCommandStreamReceiverHw<FamilyType>>(executionEnvironment, expectedRootDeviceIndex, 1);
|
||||
EXPECT_NE(nullptr, executionEnvironment.rootDeviceEnvironments[expectedRootDeviceIndex]->aubCenter.get());
|
||||
EXPECT_TRUE(rootDeviceEnvironment->initAubCenterCalled);
|
||||
}
|
||||
|
@ -665,7 +665,7 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrWhenCreatedWithAubDumpInSubCaptureMod
|
|||
executionEnvironment.initializeMemoryManager();
|
||||
|
||||
std::unique_ptr<TbxCommandStreamReceiverHw<FamilyType>> tbxCsrWithAubDump(static_cast<TbxCommandStreamReceiverHw<FamilyType> *>(
|
||||
TbxCommandStreamReceiver::create("aubfile", true, executionEnvironment, 0)));
|
||||
TbxCommandStreamReceiver::create("aubfile", true, executionEnvironment, 0, 1)));
|
||||
EXPECT_TRUE(tbxCsrWithAubDump->aubManager->isOpen());
|
||||
|
||||
auto subCaptureManager = tbxCsrWithAubDump->subCaptureManager.get();
|
||||
|
@ -680,18 +680,18 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrWhenCreatedWithAubDumpSeveralTimesThe
|
|||
executionEnvironment.initializeMemoryManager();
|
||||
|
||||
auto tbxCsrWithAubDump1 = std::unique_ptr<TbxCommandStreamReceiverHw<FamilyType>>(reinterpret_cast<TbxCommandStreamReceiverHw<FamilyType> *>(
|
||||
TbxCommandStreamReceiverHw<FamilyType>::create("aubfile", true, executionEnvironment, 0)));
|
||||
TbxCommandStreamReceiverHw<FamilyType>::create("aubfile", true, executionEnvironment, 0, 1)));
|
||||
|
||||
auto tbxCsrWithAubDump2 = std::unique_ptr<TbxCommandStreamReceiverHw<FamilyType>>(reinterpret_cast<TbxCommandStreamReceiverHw<FamilyType> *>(
|
||||
TbxCommandStreamReceiverHw<FamilyType>::create("aubfile", true, executionEnvironment, 0)));
|
||||
TbxCommandStreamReceiverHw<FamilyType>::create("aubfile", true, executionEnvironment, 0, 1)));
|
||||
|
||||
auto mockManager = reinterpret_cast<MockAubManager *>(executionEnvironment.rootDeviceEnvironments[0]->aubCenter->getAubManager());
|
||||
EXPECT_EQ(1u, mockManager->openCalledCnt);
|
||||
}
|
||||
|
||||
HWTEST_F(TbxCommandStreamTests, givenTbxCsrInSubCaptureModeWhenFlushIsCalledAndSubCaptureIsDisabledThenPauseShouldBeTurnedOn) {
|
||||
MockTbxCsr<FamilyType> tbxCsr{*pDevice->executionEnvironment};
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
MockTbxCsr<FamilyType> tbxCsr{*pDevice->executionEnvironment, pDevice->getDeviceBitfield()};
|
||||
MockOsContext osContext(0, pDevice->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
tbxCsr.setupContext(osContext);
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
|
@ -713,8 +713,8 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrInSubCaptureModeWhenFlushIsCalledAndS
|
|||
}
|
||||
|
||||
HWTEST_F(TbxCommandStreamTests, givenTbxCsrInSubCaptureModeWhenFlushIsCalledAndSubCaptureIsEnabledThenPauseShouldBeTurnedOff) {
|
||||
MockTbxCsr<FamilyType> tbxCsr{*pDevice->executionEnvironment};
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
MockTbxCsr<FamilyType> tbxCsr{*pDevice->executionEnvironment, pDevice->getDeviceBitfield()};
|
||||
MockOsContext osContext(0, pDevice->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
tbxCsr.setupContext(osContext);
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
|
@ -737,8 +737,8 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrInSubCaptureModeWhenFlushIsCalledAndS
|
|||
}
|
||||
|
||||
HWTEST_F(TbxCommandStreamTests, givenTbxCsrInSubCaptureModeWhenFlushIsCalledAndSubCaptureIsEnabledThenCallPollForCompletionAndDisableSubCapture) {
|
||||
MockTbxCsr<FamilyType> tbxCsr{*pDevice->executionEnvironment};
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
MockTbxCsr<FamilyType> tbxCsr{*pDevice->executionEnvironment, pDevice->getDeviceBitfield()};
|
||||
MockOsContext osContext(0, pDevice->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
tbxCsr.setupContext(osContext);
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
|
@ -761,8 +761,8 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrInSubCaptureModeWhenFlushIsCalledAndS
|
|||
}
|
||||
|
||||
HWTEST_F(TbxCommandStreamTests, givenTbxCsrInSubCaptureModeWhenFlushIsCalledAndSubCaptureGetsActivatedThenCallSubmitBatchBufferWithOverrideRingBufferSetToTrue) {
|
||||
MockTbxCsr<FamilyType> tbxCsr{*pDevice->executionEnvironment};
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
MockTbxCsr<FamilyType> tbxCsr{*pDevice->executionEnvironment, pDevice->getDeviceBitfield()};
|
||||
MockOsContext osContext(0, pDevice->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
tbxCsr.setupContext(osContext);
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
|
@ -786,8 +786,8 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrInSubCaptureModeWhenFlushIsCalledAndS
|
|||
}
|
||||
|
||||
HWTEST_F(TbxCommandStreamTests, givenTbxCsrInSubCaptureModeWhenFlushIsCalledAndSubCaptureRemainsActiveThenCallSubmitBatchBufferWithOverrideRingBufferSetToTrue) {
|
||||
MockTbxCsr<FamilyType> tbxCsr{*pDevice->executionEnvironment};
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
MockTbxCsr<FamilyType> tbxCsr{*pDevice->executionEnvironment, pDevice->getDeviceBitfield()};
|
||||
MockOsContext osContext(0, pDevice->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
tbxCsr.setupContext(osContext);
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
|
@ -813,7 +813,7 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrInSubCaptureModeWhenFlushIsCalledAndS
|
|||
|
||||
HWTEST_F(TbxCommandStreamTests, givenTbxCsrWhenProcessResidencyIsCalledWithDumpTbxNonWritableFlagThenAllocationsForResidencyShouldBeMadeTbxWritable) {
|
||||
std::unique_ptr<MemoryManager> memoryManager(nullptr);
|
||||
std::unique_ptr<MockTbxCsrToTestDumpTbxNonWritable<FamilyType>> tbxCsr(new MockTbxCsrToTestDumpTbxNonWritable<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<MockTbxCsrToTestDumpTbxNonWritable<FamilyType>> tbxCsr(new MockTbxCsrToTestDumpTbxNonWritable<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
memoryManager.reset(new OsAgnosticMemoryManager(*pDevice->executionEnvironment));
|
||||
tbxCsr->setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
|
||||
|
@ -833,7 +833,7 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrWhenProcessResidencyIsCalledWithDumpT
|
|||
|
||||
HWTEST_F(TbxCommandStreamTests, givenTbxCsrWhenProcessResidencyIsCalledWithoutDumpTbxWritableFlagThenAllocationsForResidencyShouldBeKeptNonTbxWritable) {
|
||||
std::unique_ptr<MemoryManager> memoryManager(nullptr);
|
||||
std::unique_ptr<MockTbxCsrToTestDumpTbxNonWritable<FamilyType>> tbxCsr(new MockTbxCsrToTestDumpTbxNonWritable<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<MockTbxCsrToTestDumpTbxNonWritable<FamilyType>> tbxCsr(new MockTbxCsrToTestDumpTbxNonWritable<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
memoryManager.reset(new OsAgnosticMemoryManager(*pDevice->executionEnvironment));
|
||||
tbxCsr->setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
|
||||
|
@ -852,8 +852,8 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrWhenProcessResidencyIsCalledWithoutDu
|
|||
}
|
||||
|
||||
HWTEST_F(TbxCommandStreamTests, givenTbxCsrInSubCaptureModeWhenCheckAndActivateAubSubCaptureIsCalledAndSubCaptureIsInactiveThenDontForceDumpingAllocationsTbxNonWritable) {
|
||||
MockTbxCsr<FamilyType> tbxCsr{*pDevice->executionEnvironment};
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
MockTbxCsr<FamilyType> tbxCsr{*pDevice->executionEnvironment, pDevice->getDeviceBitfield()};
|
||||
MockOsContext osContext(0, pDevice->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
tbxCsr.setupContext(osContext);
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
|
@ -875,8 +875,8 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrInSubCaptureModeWhenCheckAndActivateA
|
|||
}
|
||||
|
||||
HWTEST_F(TbxCommandStreamTests, givenTbxCsrInSubCaptureModeWhenCheckAndActivateAubSubCaptureIsCalledAndSubCaptureGetsActivatedThenForceDumpingAllocationsTbxNonWritable) {
|
||||
MockTbxCsr<FamilyType> tbxCsr{*pDevice->executionEnvironment};
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
MockTbxCsr<FamilyType> tbxCsr{*pDevice->executionEnvironment, pDevice->getDeviceBitfield()};
|
||||
MockOsContext osContext(0, pDevice->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
tbxCsr.setupContext(osContext);
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
|
@ -901,8 +901,8 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrInSubCaptureModeWhenCheckAndActivateA
|
|||
}
|
||||
|
||||
HWTEST_F(TbxCommandStreamTests, givenTbxCsrInSubCaptureModeWhenCheckAndActivateAubSubCaptureIsCalledAndSubCaptureRemainsActivatedThenDontForceDumpingAllocationsTbxNonWritable) {
|
||||
MockTbxCsr<FamilyType> tbxCsr{*pDevice->executionEnvironment};
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
MockTbxCsr<FamilyType> tbxCsr{*pDevice->executionEnvironment, pDevice->getDeviceBitfield()};
|
||||
MockOsContext osContext(0, pDevice->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
tbxCsr.setupContext(osContext);
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
|
@ -927,8 +927,8 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrInSubCaptureModeWhenCheckAndActivateA
|
|||
}
|
||||
|
||||
HWTEST_F(TbxCommandStreamTests, givenTbxCsrInNonSubCaptureModeWhenCheckAndActivateAubSubCaptureIsCalledThenReturnStatusInactive) {
|
||||
MockTbxCsr<FamilyType> tbxCsr{*pDevice->executionEnvironment};
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
MockTbxCsr<FamilyType> tbxCsr{*pDevice->executionEnvironment, pDevice->getDeviceBitfield()};
|
||||
MockOsContext osContext(0, pDevice->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
tbxCsr.setupContext(osContext);
|
||||
|
||||
MultiDispatchInfo dispatchInfo;
|
||||
|
@ -944,16 +944,16 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrWhenDispatchBlitEnqueueThenProcessCor
|
|||
|
||||
MockContext context(pClDevice);
|
||||
|
||||
MockTbxCsr<FamilyType> tbxCsr0{*pDevice->executionEnvironment};
|
||||
MockTbxCsr<FamilyType> tbxCsr0{*pDevice->executionEnvironment, pDevice->getDeviceBitfield()};
|
||||
tbxCsr0.initializeTagAllocation();
|
||||
MockTbxCsr<FamilyType> tbxCsr1{*pDevice->executionEnvironment};
|
||||
MockTbxCsr<FamilyType> tbxCsr1{*pDevice->executionEnvironment, pDevice->getDeviceBitfield()};
|
||||
tbxCsr1.initializeTagAllocation();
|
||||
|
||||
MockOsContext osContext0(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
MockOsContext osContext0(0, pDevice->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
tbxCsr0.setupContext(osContext0);
|
||||
EngineControl engineControl0{&tbxCsr0, &osContext0};
|
||||
|
||||
MockOsContext osContext1(1, 1, aub_stream::ENGINE_BCS, PreemptionMode::Disabled, false, false, false);
|
||||
MockOsContext osContext1(1, pDevice->getDeviceBitfield(), aub_stream::ENGINE_BCS, PreemptionMode::Disabled, false, false, false);
|
||||
tbxCsr1.setupContext(osContext0);
|
||||
EngineControl engineControl1{&tbxCsr1, &osContext1};
|
||||
|
||||
|
@ -970,8 +970,8 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrWhenDispatchBlitEnqueueThenProcessCor
|
|||
}
|
||||
|
||||
HWTEST_F(TbxCommandStreamTests, givenGraphicsAllocationWhenDumpAllocationIsCalledButBcsIsUsedThenGraphicsAllocationShouldNotBeDumped) {
|
||||
MockTbxCsr<FamilyType> tbxCsr(*pDevice->executionEnvironment);
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_BCS, PreemptionMode::Disabled, false, false, false);
|
||||
MockTbxCsr<FamilyType> tbxCsr(*pDevice->executionEnvironment, pDevice->getDeviceBitfield());
|
||||
MockOsContext osContext(0, pDevice->getDeviceBitfield(), aub_stream::ENGINE_BCS, PreemptionMode::Disabled, false, false, false);
|
||||
tbxCsr.setupContext(osContext);
|
||||
|
||||
auto mockHardwareContext = static_cast<MockHardwareContext *>(tbxCsr.hardwareContextController->hardwareContexts[0].get());
|
||||
|
@ -986,8 +986,8 @@ HWTEST_F(TbxCommandStreamTests, givenGraphicsAllocationWhenDumpAllocationIsCalle
|
|||
}
|
||||
|
||||
HWTEST_F(TbxCommandStreamTests, givenGraphicsAllocationWritableWhenDumpAllocationIsCalledButDumpFormatIsNotSpecifiedThenGraphicsAllocationShouldNotBeDumped) {
|
||||
MockTbxCsr<FamilyType> tbxCsr(*pDevice->executionEnvironment);
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
MockTbxCsr<FamilyType> tbxCsr(*pDevice->executionEnvironment, pDevice->getDeviceBitfield());
|
||||
MockOsContext osContext(0, pDevice->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
tbxCsr.setupContext(osContext);
|
||||
|
||||
auto mockHardwareContext = static_cast<MockHardwareContext *>(tbxCsr.hardwareContextController->hardwareContexts[0].get());
|
||||
|
@ -1008,8 +1008,8 @@ HWTEST_F(TbxCommandStreamTests, givenGraphicsAllocationWritableWhenDumpAllocatio
|
|||
DebugManagerStateRestore dbgRestore;
|
||||
DebugManager.flags.AUBDumpBufferFormat.set("BIN");
|
||||
|
||||
MockTbxCsr<FamilyType> tbxCsr(*pDevice->executionEnvironment);
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
MockTbxCsr<FamilyType> tbxCsr(*pDevice->executionEnvironment, pDevice->getDeviceBitfield());
|
||||
MockOsContext osContext(0, pDevice->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
tbxCsr.setupContext(osContext);
|
||||
|
||||
auto mockHardwareContext = static_cast<MockHardwareContext *>(tbxCsr.hardwareContextController->hardwareContexts[0].get());
|
||||
|
@ -1030,8 +1030,8 @@ HWTEST_F(TbxCommandStreamTests, givenGraphicsAllocationWhenDumpAllocationIsCalle
|
|||
DebugManager.flags.AUBDumpAllocsOnEnqueueReadOnly.set(true);
|
||||
DebugManager.flags.AUBDumpBufferFormat.set("BIN");
|
||||
|
||||
MockTbxCsr<FamilyType> tbxCsr(*pDevice->executionEnvironment);
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
MockTbxCsr<FamilyType> tbxCsr(*pDevice->executionEnvironment, pDevice->getDeviceBitfield());
|
||||
MockOsContext osContext(0, pDevice->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
tbxCsr.setupContext(osContext);
|
||||
|
||||
auto mockHardwareContext = static_cast<MockHardwareContext *>(tbxCsr.hardwareContextController->hardwareContexts[0].get());
|
||||
|
@ -1102,8 +1102,8 @@ HWTEST_F(TbxCommandStreamTests, givenGraphicsAllocationWhenDumpAllocationIsCalle
|
|||
DebugManager.flags.AUBDumpAllocsOnEnqueueSVMMemcpyOnly.set(true);
|
||||
DebugManager.flags.AUBDumpBufferFormat.set("BIN");
|
||||
|
||||
MockTbxCsr<FamilyType> tbxCsr(*pDevice->executionEnvironment);
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
MockTbxCsr<FamilyType> tbxCsr(*pDevice->executionEnvironment, pDevice->getDeviceBitfield());
|
||||
MockOsContext osContext(0, pDevice->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
tbxCsr.setupContext(osContext);
|
||||
|
||||
auto mockHardwareContext = static_cast<MockHardwareContext *>(tbxCsr.hardwareContextController->hardwareContexts[0].get());
|
||||
|
@ -1134,7 +1134,7 @@ HWTEST_F(TbxCommandStreamTests, givenGraphicsAllocationWhenDumpAllocationIsCalle
|
|||
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get(), false, 1);
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
|
||||
MockTbxCsr<FamilyType> tbxCsr(executionEnvironment);
|
||||
MockTbxCsr<FamilyType> tbxCsr(executionEnvironment, 1);
|
||||
EXPECT_EQ(nullptr, executionEnvironment.rootDeviceEnvironments[0]->aubCenter->getAubManager());
|
||||
|
||||
auto memoryManager = pDevice->getMemoryManager();
|
||||
|
|
|
@ -163,7 +163,7 @@ HWTEST_F(DeviceTest, WhenDeviceIsCreatedThenActualEngineTypeIsSameAsDefault) {
|
|||
|
||||
HWTEST_F(DeviceTest, givenNoHwCsrTypeAndModifiedDefaultEngineIndexWhenIsSimulationIsCalledThenTrueIsReturned) {
|
||||
EXPECT_FALSE(pDevice->isSimulation());
|
||||
auto csr = TbxCommandStreamReceiver::create("", false, *pDevice->executionEnvironment, 0);
|
||||
auto csr = TbxCommandStreamReceiver::create("", false, *pDevice->executionEnvironment, 0, 1);
|
||||
pDevice->defaultEngineIndex = 1;
|
||||
pDevice->resetCommandStreamReceiver(csr);
|
||||
|
||||
|
@ -181,7 +181,7 @@ HWTEST_F(DeviceTest, givenNoHwCsrTypeAndModifiedDefaultEngineIndexWhenIsSimulati
|
|||
|
||||
TEST(DeviceCleanup, givenDeviceWhenItIsDestroyedThenFlushBatchedSubmissionsIsCalled) {
|
||||
auto mockDevice = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
|
||||
MockCommandStreamReceiver *csr = new MockCommandStreamReceiver(*mockDevice->getExecutionEnvironment(), mockDevice->getRootDeviceIndex());
|
||||
MockCommandStreamReceiver *csr = new MockCommandStreamReceiver(*mockDevice->getExecutionEnvironment(), mockDevice->getRootDeviceIndex(), mockDevice->getDeviceBitfield());
|
||||
mockDevice->resetCommandStreamReceiver(csr);
|
||||
int flushedBatchedSubmissionsCalledCount = 0;
|
||||
csr->flushBatchedSubmissionsCallCounter = &flushedBatchedSubmissionsCalledCount;
|
||||
|
@ -388,8 +388,8 @@ HWTEST_F(DeviceHwTest, givenHwHelperInputWhenInitializingCsrThenCreatePageTableM
|
|||
HWTEST_F(DeviceHwTest, givenDeviceCreationWhenCsrFailsToCreateGlobalSyncAllocationThenReturnNull) {
|
||||
class MockUltCsrThatFailsToCreateGlobalFenceAllocation : public UltCommandStreamReceiver<FamilyType> {
|
||||
public:
|
||||
MockUltCsrThatFailsToCreateGlobalFenceAllocation(ExecutionEnvironment &executionEnvironment)
|
||||
: UltCommandStreamReceiver<FamilyType>(executionEnvironment, 0) {}
|
||||
MockUltCsrThatFailsToCreateGlobalFenceAllocation(ExecutionEnvironment &executionEnvironment, DeviceBitfield deviceBitfield)
|
||||
: UltCommandStreamReceiver<FamilyType>(executionEnvironment, 0, deviceBitfield) {}
|
||||
bool createGlobalFenceAllocation() override {
|
||||
return false;
|
||||
}
|
||||
|
@ -399,7 +399,7 @@ HWTEST_F(DeviceHwTest, givenDeviceCreationWhenCsrFailsToCreateGlobalSyncAllocati
|
|||
MockDeviceThatFailsToCreateGlobalFenceAllocation(ExecutionEnvironment *executionEnvironment, uint32_t deviceIndex)
|
||||
: MockDevice(executionEnvironment, deviceIndex) {}
|
||||
std::unique_ptr<CommandStreamReceiver> createCommandStreamReceiver() const override {
|
||||
return std::make_unique<MockUltCsrThatFailsToCreateGlobalFenceAllocation>(*executionEnvironment);
|
||||
return std::make_unique<MockUltCsrThatFailsToCreateGlobalFenceAllocation>(*executionEnvironment, getDeviceBitfield());
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -978,7 +978,7 @@ HWTEST_F(InternalsEventTest, GivenBufferWithoutZeroCopyOnCommandMapOrUnmapFlushe
|
|||
};
|
||||
|
||||
int32_t executionStamp = 0;
|
||||
auto csr = new MockCsr<FamilyType>(executionStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto csr = new MockCsr<FamilyType>(executionStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(csr);
|
||||
|
||||
const cl_queue_properties props[3] = {CL_QUEUE_PROPERTIES, 0, 0};
|
||||
|
@ -1383,7 +1383,8 @@ TEST_F(EventTest, GivenCompletedEventWhenAddingChildThenNumEventsBlockingThisIsZ
|
|||
|
||||
HWTEST_F(EventTest, givenQuickKmdSleepRequestWhenWaitIsCalledThenPassRequestToWaitingFunction) {
|
||||
struct MyCsr : public UltCommandStreamReceiver<FamilyType> {
|
||||
MyCsr(const ExecutionEnvironment &executionEnvironment) : UltCommandStreamReceiver<FamilyType>(const_cast<ExecutionEnvironment &>(executionEnvironment), 0) {}
|
||||
MyCsr(const ExecutionEnvironment &executionEnvironment, DeviceBitfield deviceBitfield)
|
||||
: UltCommandStreamReceiver<FamilyType>(const_cast<ExecutionEnvironment &>(executionEnvironment), 0, deviceBitfield) {}
|
||||
MOCK_METHOD3(waitForCompletionWithTimeout, bool(bool enableTimeout, int64_t timeoutMs, uint32_t taskCountToWait));
|
||||
};
|
||||
HardwareInfo localHwInfo = pDevice->getHardwareInfo();
|
||||
|
@ -1394,7 +1395,7 @@ HWTEST_F(EventTest, givenQuickKmdSleepRequestWhenWaitIsCalledThenPassRequestToWa
|
|||
|
||||
pDevice->executionEnvironment->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->setHwInfo(&localHwInfo);
|
||||
|
||||
auto csr = new ::testing::NiceMock<MyCsr>(*pDevice->executionEnvironment);
|
||||
auto csr = new ::testing::NiceMock<MyCsr>(*pDevice->executionEnvironment, pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(csr);
|
||||
|
||||
Event event(pCmdQ, CL_COMMAND_NDRANGE_KERNEL, 0, 0);
|
||||
|
@ -1410,7 +1411,8 @@ HWTEST_F(EventTest, givenQuickKmdSleepRequestWhenWaitIsCalledThenPassRequestToWa
|
|||
|
||||
HWTEST_F(EventTest, givenNonQuickKmdSleepRequestWhenWaitIsCalledThenPassRequestToWaitingFunction) {
|
||||
struct MyCsr : public UltCommandStreamReceiver<FamilyType> {
|
||||
MyCsr(const ExecutionEnvironment &executionEnvironment) : UltCommandStreamReceiver<FamilyType>(const_cast<ExecutionEnvironment &>(executionEnvironment), 0) {}
|
||||
MyCsr(const ExecutionEnvironment &executionEnvironment, DeviceBitfield deviceBitfield)
|
||||
: UltCommandStreamReceiver<FamilyType>(const_cast<ExecutionEnvironment &>(executionEnvironment), 0, deviceBitfield) {}
|
||||
MOCK_METHOD3(waitForCompletionWithTimeout, bool(bool enableTimeout, int64_t timeoutMs, uint32_t taskCountToWait));
|
||||
};
|
||||
HardwareInfo localHwInfo = pDevice->getHardwareInfo();
|
||||
|
@ -1422,7 +1424,7 @@ HWTEST_F(EventTest, givenNonQuickKmdSleepRequestWhenWaitIsCalledThenPassRequestT
|
|||
|
||||
pDevice->executionEnvironment->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->setHwInfo(&localHwInfo);
|
||||
|
||||
auto csr = new ::testing::NiceMock<MyCsr>(*pDevice->executionEnvironment);
|
||||
auto csr = new ::testing::NiceMock<MyCsr>(*pDevice->executionEnvironment, pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(csr);
|
||||
|
||||
Event event(pCmdQ, CL_COMMAND_NDRANGE_KERNEL, 0, 0);
|
||||
|
|
|
@ -125,7 +125,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelEnqueueTest, GivenBlockKernelWithPrivate
|
|||
size_t offset[3] = {0, 0, 0};
|
||||
size_t gws[3] = {1, 1, 1};
|
||||
int32_t executionStamp = 0;
|
||||
auto mockCSR = new MockCsr<FamilyType>(executionStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCSR = new MockCsr<FamilyType>(executionStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCSR);
|
||||
|
||||
size_t kernelRequiringPrivateSurface = pKernel->getProgram()->getBlockKernelManager()->getCount();
|
||||
|
@ -394,7 +394,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelEnqueueTest, givenNonBlockedQueueWhenPar
|
|||
MockMultiDispatchInfo multiDispatchInfo(pKernel);
|
||||
|
||||
int32_t executionStamp = 0;
|
||||
auto mockCSR = new MockCsrBase<FamilyType>(executionStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCSR = new MockCsrBase<FamilyType>(executionStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCSR);
|
||||
|
||||
pCmdQ->enqueueKernel(pKernel, 1, globalOffsets, workItems, workItems, 0, nullptr, nullptr);
|
||||
|
@ -550,7 +550,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelEnqueueFixture, GivenParentKernelWhenEnq
|
|||
size_t offset[3] = {0, 0, 0};
|
||||
size_t gws[3] = {1, 1, 1};
|
||||
int32_t execStamp;
|
||||
auto mockCsr = new MockCsr<FamilyType>(execStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsr<FamilyType>(execStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
pCmdQ->enqueueKernel(parentKernel, 1, offset, gws, gws, 0, nullptr, nullptr);
|
||||
|
@ -574,7 +574,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelEnqueueFixture, GivenParentKernelWhenEnq
|
|||
size_t offset[3] = {0, 0, 0};
|
||||
size_t gws[3] = {1, 1, 1};
|
||||
int32_t execStamp;
|
||||
auto mockCsr = new MockCsr<FamilyType>(execStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsr<FamilyType>(execStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
|
||||
BuiltinKernelsSimulation::SchedulerSimulation<FamilyType>::enabled = false;
|
||||
|
||||
|
@ -591,7 +591,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelEnqueueFixture, GivenParentKernelWhenEnq
|
|||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelEnqueueFixture, givenCsrInBatchingModeWhenExecutionModelKernelIsSubmittedThenItIsFlushed) {
|
||||
if (pClDevice->areOcl21FeaturesSupported()) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
|
@ -617,7 +617,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelEnqueueFixture, GivenParentKernelWhenEnq
|
|||
size_t offset[3] = {0, 0, 0};
|
||||
size_t gws[3] = {1, 1, 1};
|
||||
int32_t execStamp;
|
||||
auto mockCsr = new MockCsr<FamilyType>(execStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsr<FamilyType>(execStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
mockCsr->setMediaVFEStateDirty(false);
|
||||
|
|
|
@ -19,7 +19,7 @@ using namespace NEO;
|
|||
void MemoryManagerWithCsrFixture::SetUp() {
|
||||
executionEnvironment.prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment.rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
|
||||
csr = std::make_unique<MockCommandStreamReceiver>(this->executionEnvironment, 0);
|
||||
csr = std::make_unique<MockCommandStreamReceiver>(this->executionEnvironment, 0, 1);
|
||||
memoryManager = new MockMemoryManager(executionEnvironment);
|
||||
executionEnvironment.memoryManager.reset(memoryManager);
|
||||
csr->tagAddress = ¤tGpuTag;
|
||||
|
|
|
@ -22,7 +22,7 @@ struct Gen11CoherencyRequirements : public ::testing::Test {
|
|||
|
||||
struct myCsr : public CommandStreamReceiverHw<ICLFamily> {
|
||||
using CommandStreamReceiver::commandStream;
|
||||
myCsr(ExecutionEnvironment &executionEnvironment) : CommandStreamReceiverHw<ICLFamily>(executionEnvironment, 0){};
|
||||
myCsr(ExecutionEnvironment &executionEnvironment) : CommandStreamReceiverHw<ICLFamily>(executionEnvironment, 0, 1){};
|
||||
CsrSizeRequestFlags *getCsrRequestFlags() { return &csrSizeRequestFlags; }
|
||||
};
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ struct Gen11MediaSamplerProgramingTest : public ::testing::Test {
|
|||
struct myCsr : public CommandStreamReceiverHw<ICLFamily> {
|
||||
using CommandStreamReceiver::commandStream;
|
||||
using CommandStreamReceiverHw<ICLFamily>::programMediaSampler;
|
||||
myCsr(ExecutionEnvironment &executionEnvironment) : CommandStreamReceiverHw<ICLFamily>(executionEnvironment, 0){};
|
||||
myCsr(ExecutionEnvironment &executionEnvironment) : CommandStreamReceiverHw<ICLFamily>(executionEnvironment, 0, 1){};
|
||||
void overrideLastVmeSubliceConfig(bool value) {
|
||||
lastVmeSubslicesConfig = value;
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ GEN11TEST_F(Gen11TbxCommandStreamReceiverTests, whenAskedForPollForCompletionPar
|
|||
class MyMockTbxHw : public TbxCommandStreamReceiverHw<FamilyType> {
|
||||
public:
|
||||
MyMockTbxHw(ExecutionEnvironment &executionEnvironment)
|
||||
: TbxCommandStreamReceiverHw<FamilyType>(executionEnvironment, 0) {}
|
||||
: TbxCommandStreamReceiverHw<FamilyType>(executionEnvironment, 0, 1) {}
|
||||
using TbxCommandStreamReceiverHw<FamilyType>::getpollNotEqualValueForPollForCompletion;
|
||||
using TbxCommandStreamReceiverHw<FamilyType>::getMaskAndValueForPollForCompletion;
|
||||
};
|
||||
|
|
|
@ -22,7 +22,7 @@ using namespace NEO;
|
|||
using Gen12LPAubCommandStreamReceiverTests = Test<ClDeviceFixture>;
|
||||
|
||||
GEN12LPTEST_F(Gen12LPAubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenGetGUCWorkQueueItemHeaderIsCalledThenAppropriateValueDependingOnEngineTypeIsReturned) {
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
MockOsContext rcsOsContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
MockOsContext ccsOsContext(0, 1, aub_stream::ENGINE_CCS, PreemptionMode::Disabled, false, false, false);
|
||||
|
||||
|
@ -36,7 +36,7 @@ GEN12LPTEST_F(Gen12LPAubCommandStreamReceiverTests, givenAubCommandStreamReceive
|
|||
}
|
||||
|
||||
GEN12LPTEST_F(Gen12LPAubCommandStreamReceiverTests, givenGraphicsAlloctionWhenGetPPGTTAdditionalBitsIsCalledThenAppropriateValueIsReturned) {
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
MockGraphicsAllocation allocation(nullptr, 0);
|
||||
auto bits = aubCsr->getPPGTTAdditionalBits(&allocation);
|
||||
constexpr uint64_t expectedBits = BIT(PageTableEntry::presentBit) | BIT(PageTableEntry::writableBit);
|
||||
|
@ -46,7 +46,7 @@ GEN12LPTEST_F(Gen12LPAubCommandStreamReceiverTests, givenGraphicsAlloctionWhenGe
|
|||
|
||||
GEN12LPTEST_F(Gen12LPAubCommandStreamReceiverTests, givenCCSEnabledWhenEngineMmiosAreInitializedThenExpectL3ConfigMmioIsWritten) {
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_CCS, PreemptionMode::Disabled, false, false, false);
|
||||
AUBCommandStreamReceiverHw<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
AUBCommandStreamReceiverHw<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
aubCsr.setupContext(osContext);
|
||||
|
||||
auto stream = std::make_unique<MockAubFileStreamMockMmioWrite>();
|
||||
|
@ -59,7 +59,7 @@ GEN12LPTEST_F(Gen12LPAubCommandStreamReceiverTests, givenCCSEnabledWhenEngineMmi
|
|||
|
||||
GEN12LPTEST_F(Gen12LPAubCommandStreamReceiverTests, givenRCSEnabledWhenEngineMmiosAreInitializedThenExpectL3ConfigMmioIsWritten) {
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false, false, false);
|
||||
AUBCommandStreamReceiverHw<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
AUBCommandStreamReceiverHw<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
aubCsr.setupContext(osContext);
|
||||
|
||||
auto stream = std::make_unique<MockAubFileStreamMockMmioWrite>();
|
||||
|
|
|
@ -24,7 +24,7 @@ struct Gen12LpCoherencyRequirements : public ::testing::Test {
|
|||
|
||||
struct myCsr : public CommandStreamReceiverHw<TGLLPFamily> {
|
||||
using CommandStreamReceiver::commandStream;
|
||||
myCsr(ExecutionEnvironment &executionEnvironment) : CommandStreamReceiverHw<TGLLPFamily>(executionEnvironment, 0){};
|
||||
myCsr(ExecutionEnvironment &executionEnvironment) : CommandStreamReceiverHw<TGLLPFamily>(executionEnvironment, 0, 1){};
|
||||
CsrSizeRequestFlags *getCsrRequestFlags() { return &csrSizeRequestFlags; }
|
||||
};
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ GEN12LPTEST_F(CommandStreamReceiverHwTestGen12lp, givenPreambleSentWhenL3ConfigR
|
|||
MockContext ctx(pClDevice);
|
||||
MockKernelWithInternals kernel(*pClDevice);
|
||||
CommandQueueHw<FamilyType> commandQueue(&ctx, pClDevice, 0, false);
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(commandStreamReceiver);
|
||||
auto &commandStreamCSR = commandStreamReceiver->getCS();
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ class MockSimulatedCsrHw : public CommandStreamReceiverSimulatedHw<FamilyType> {
|
|||
};
|
||||
|
||||
GEN12LPTEST_F(Gen12LPCommandStreamReceiverSimulatedCommonHwTests, givenAubCommandStreamReceiverWhewGlobalMmiosAreInitializedThenMOCSRegistersAreConfigured) {
|
||||
MockSimulatedCsrHw<FamilyType> csrSimulatedCommonHw(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockSimulatedCsrHw<FamilyType> csrSimulatedCommonHw(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
|
||||
auto stream = std::make_unique<MockAubStreamMockMmioWrite>();
|
||||
csrSimulatedCommonHw.stream = stream.get();
|
||||
|
@ -103,7 +103,7 @@ GEN12LPTEST_F(Gen12LPCommandStreamReceiverSimulatedCommonHwTests, givenAubComman
|
|||
}
|
||||
|
||||
GEN12LPTEST_F(Gen12LPCommandStreamReceiverSimulatedCommonHwTests, givenAubCommandStreamReceiverWhenGlobalMmiosAreInitializedThenLNCFRegistersAreConfigured) {
|
||||
MockSimulatedCsrHw<FamilyType> csrSimulatedCommonHw(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockSimulatedCsrHw<FamilyType> csrSimulatedCommonHw(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
|
||||
auto stream = std::make_unique<MockAubStreamMockMmioWrite>();
|
||||
csrSimulatedCommonHw.stream = stream.get();
|
||||
|
|
|
@ -17,7 +17,7 @@ using namespace NEO;
|
|||
using Gen12LPTbxCommandStreamReceiverTests = Test<ClDeviceFixture>;
|
||||
|
||||
GEN12LPTEST_F(Gen12LPTbxCommandStreamReceiverTests, givenNullPtrGraphicsAlloctionWhenGetPPGTTAdditionalBitsIsCalledThenAppropriateValueIsReturned) {
|
||||
auto tbxCsr = std::make_unique<TbxCommandStreamReceiverHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto tbxCsr = std::make_unique<TbxCommandStreamReceiverHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
GraphicsAllocation *allocation = nullptr;
|
||||
auto bits = tbxCsr->getPPGTTAdditionalBits(allocation);
|
||||
constexpr uint64_t expectedBits = BIT(PageTableEntry::presentBit) | BIT(PageTableEntry::writableBit);
|
||||
|
@ -26,7 +26,7 @@ GEN12LPTEST_F(Gen12LPTbxCommandStreamReceiverTests, givenNullPtrGraphicsAlloctio
|
|||
}
|
||||
|
||||
GEN12LPTEST_F(Gen12LPTbxCommandStreamReceiverTests, givenGraphicsAlloctionWWhenGetPPGTTAdditionalBitsIsCalledThenAppropriateValueIsReturned) {
|
||||
auto tbxCsr = std::make_unique<TbxCommandStreamReceiverHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto tbxCsr = std::make_unique<TbxCommandStreamReceiverHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
MockGraphicsAllocation allocation(nullptr, 0);
|
||||
auto bits = tbxCsr->getPPGTTAdditionalBits(&allocation);
|
||||
constexpr uint64_t expectedBits = BIT(PageTableEntry::presentBit) | BIT(PageTableEntry::writableBit);
|
||||
|
@ -38,7 +38,7 @@ GEN12LPTEST_F(Gen12LPTbxCommandStreamReceiverTests, whenAskedForPollForCompletio
|
|||
class MyMockTbxHw : public TbxCommandStreamReceiverHw<FamilyType> {
|
||||
public:
|
||||
MyMockTbxHw(ExecutionEnvironment &executionEnvironment)
|
||||
: TbxCommandStreamReceiverHw<FamilyType>(executionEnvironment, 0) {}
|
||||
: TbxCommandStreamReceiverHw<FamilyType>(executionEnvironment, 0, 1) {}
|
||||
using TbxCommandStreamReceiverHw<FamilyType>::getpollNotEqualValueForPollForCompletion;
|
||||
using TbxCommandStreamReceiverHw<FamilyType>::getMaskAndValueForPollForCompletion;
|
||||
};
|
||||
|
|
|
@ -36,7 +36,7 @@ GEN12LPTEST_F(Gen12LpGmmCallbacksTests, givenCsrWithoutAubDumpWhenNotifyAubCaptu
|
|||
HardwareInfo *hwInfo = nullptr;
|
||||
ExecutionEnvironment *executionEnvironment = getExecutionEnvironmentImpl(hwInfo, 1);
|
||||
executionEnvironment->initializeMemoryManager();
|
||||
auto csr = std::make_unique<WddmCommandStreamReceiver<FamilyType>>(*executionEnvironment, 0);
|
||||
auto csr = std::make_unique<WddmCommandStreamReceiver<FamilyType>>(*executionEnvironment, 0, 1);
|
||||
uint64_t address = 0xFEDCBA9876543210;
|
||||
size_t size = 1024;
|
||||
|
||||
|
@ -49,7 +49,7 @@ GEN12LPTEST_F(Gen12LpGmmCallbacksTests, givenWddmCsrWhenWriteL3CalledThenWriteTw
|
|||
typedef typename FamilyType::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM;
|
||||
ExecutionEnvironment *executionEnvironment = platform()->peekExecutionEnvironment();
|
||||
executionEnvironment->initializeMemoryManager();
|
||||
UltCommandStreamReceiver<FamilyType> csr(*executionEnvironment, 0);
|
||||
UltCommandStreamReceiver<FamilyType> csr(*executionEnvironment, 0, 1);
|
||||
uint8_t buffer[128] = {};
|
||||
csr.commandStream.replaceBuffer(buffer, 128);
|
||||
|
||||
|
@ -83,7 +83,7 @@ GEN12LPTEST_F(Gen12LpGmmCallbacksTests, givenCcsEnabledhenWriteL3CalledThenSetRe
|
|||
executionEnvironment.prepareRootDeviceEnvironments(1u);
|
||||
executionEnvironment.rootDeviceEnvironments[0]->setHwInfo(&localHwInfo);
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
UltCommandStreamReceiver<FamilyType> csr(executionEnvironment, 0);
|
||||
UltCommandStreamReceiver<FamilyType> csr(executionEnvironment, 0, 1);
|
||||
uint8_t buffer[128] = {};
|
||||
csr.commandStream.replaceBuffer(buffer, 128);
|
||||
|
||||
|
@ -111,7 +111,7 @@ GEN12LPTEST_F(Gen12LpGmmCallbacksTests, givenCcsDisabledhenWriteL3CalledThenSetR
|
|||
executionEnvironment.prepareRootDeviceEnvironments(1u);
|
||||
executionEnvironment.rootDeviceEnvironments[0]->setHwInfo(&localHwInfo);
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
UltCommandStreamReceiver<FamilyType> csr(executionEnvironment, 0);
|
||||
UltCommandStreamReceiver<FamilyType> csr(executionEnvironment, 0, 1);
|
||||
uint8_t buffer[128] = {};
|
||||
csr.commandStream.replaceBuffer(buffer, 128);
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ typedef ::testing::Test Gen8CoherencyRequirements;
|
|||
GEN8TEST_F(Gen8CoherencyRequirements, WhenMemoryManagerIsInitializedThenNoCoherencyProgramming) {
|
||||
ExecutionEnvironment *executionEnvironment = platform()->peekExecutionEnvironment();
|
||||
executionEnvironment->initializeMemoryManager();
|
||||
CommandStreamReceiverHw<BDWFamily> csr(*executionEnvironment, 0);
|
||||
CommandStreamReceiverHw<BDWFamily> csr(*executionEnvironment, 0, 1);
|
||||
LinearStream stream;
|
||||
DispatchFlags flags = DispatchFlagsHelper::createDefaultDispatchFlags();
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ GEN8TEST_F(CommandStreamReceiverHwTestGen8, GivenBlockedKernelWithSlmWhenPreviou
|
|||
}
|
||||
|
||||
GEN8TEST_F(CommandStreamReceiverHwTestGen8, GivenChangedL3ConfigWhenL3IsProgrammedThenClearSLMWorkAroundIsAdded) {
|
||||
MockCsrHw2<FamilyType> csr(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockCsrHw2<FamilyType> csr(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
csr.csrSizeRequestFlags.l3ConfigChanged = true;
|
||||
csr.isPreambleSent = true;
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ GEN8TEST_F(Gen8PreemptionEnqueueKernelTest, givenSecondEnqueueWithTheSamePreempt
|
|||
|
||||
GEN8TEST_F(Gen8PreemptionEnqueueKernelTest, givenValidKernelForPreemptionWhenEnqueueKernelCalledThenPassDevicePreemptionMode) {
|
||||
pDevice->setPreemptionMode(PreemptionMode::ThreadGroup);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
MockKernelWithInternals mockKernel(*pClDevice);
|
||||
|
@ -66,7 +66,7 @@ GEN8TEST_F(Gen8PreemptionEnqueueKernelTest, givenValidKernelForPreemptionWhenEnq
|
|||
|
||||
GEN8TEST_F(Gen8PreemptionEnqueueKernelTest, givenValidKernelForPreemptionWhenEnqueueKernelCalledAndBlockedThenPassDevicePreemptionMode) {
|
||||
pDevice->setPreemptionMode(PreemptionMode::ThreadGroup);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
MockKernelWithInternals mockKernel(*pClDevice);
|
||||
|
@ -89,7 +89,7 @@ GEN8TEST_F(Gen8PreemptionEnqueueKernelTest, givenValidKernelForPreemptionWhenEnq
|
|||
|
||||
GEN8TEST_F(Gen8PreemptionEnqueueKernelTest, givenDisabledPreemptionWhenEnqueueKernelCalledThenPassDisabledPreemptionMode) {
|
||||
pDevice->setPreemptionMode(PreemptionMode::Disabled);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
MockKernelWithInternals mockKernel(*pClDevice);
|
||||
|
|
|
@ -20,7 +20,7 @@ typedef ::testing::Test Gen9CoherencyRequirements;
|
|||
GEN9TEST_F(Gen9CoherencyRequirements, WhenMemoryManagerIsInitializedThenNoCoherencyProgramming) {
|
||||
ExecutionEnvironment *executionEnvironment = platform()->peekExecutionEnvironment();
|
||||
executionEnvironment->initializeMemoryManager();
|
||||
CommandStreamReceiverHw<SKLFamily> csr(*executionEnvironment, 0);
|
||||
CommandStreamReceiverHw<SKLFamily> csr(*executionEnvironment, 0, 1);
|
||||
LinearStream stream;
|
||||
DispatchFlags flags = DispatchFlagsHelper::createDefaultDispatchFlags();
|
||||
|
||||
|
|
|
@ -155,7 +155,7 @@ GEN9TEST_F(Gen9ThreadGroupPreemptionEnqueueKernelTest, givenSecondEnqueueWithThe
|
|||
GEN9TEST_F(Gen9PreemptionEnqueueKernelTest, givenValidKernelForPreemptionWhenEnqueueKernelCalledThenPassDevicePreemptionModeThreadGroup) {
|
||||
pDevice->setPreemptionMode(PreemptionMode::ThreadGroup);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
MockKernelWithInternals mockKernel(*pClDevice);
|
||||
|
@ -173,7 +173,7 @@ GEN9TEST_F(Gen9PreemptionEnqueueKernelTest, givenValidKernelForPreemptionWhenEnq
|
|||
GEN9TEST_F(Gen9PreemptionEnqueueKernelTest, givenValidKernelForPreemptionWhenEnqueueKernelCalledAndBlockedThenPassDevicePreemptionModeThreadGroup) {
|
||||
pDevice->setPreemptionMode(PreemptionMode::ThreadGroup);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
MockKernelWithInternals mockKernel(*pClDevice);
|
||||
|
@ -374,7 +374,7 @@ GEN9TEST_F(Gen9MidThreadPreemptionEnqueueKernelTest, givenSecondEnqueueWithTheSa
|
|||
GEN9TEST_F(Gen9PreemptionEnqueueKernelTest, givenDisabledPreemptionWhenEnqueueKernelCalledThenPassDisabledPreemptionMode) {
|
||||
pDevice->setPreemptionMode(PreemptionMode::Disabled);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
MockKernelWithInternals mockKernel(*pClDevice);
|
||||
|
|
|
@ -68,14 +68,15 @@ struct KmdNotifyTests : public ::testing::Test {
|
|||
template <typename Family>
|
||||
class MockKmdNotifyCsr : public UltCommandStreamReceiver<Family> {
|
||||
public:
|
||||
MockKmdNotifyCsr(const ExecutionEnvironment &executionEnvironment) : UltCommandStreamReceiver<Family>(const_cast<ExecutionEnvironment &>(executionEnvironment), 0) {}
|
||||
MockKmdNotifyCsr(const ExecutionEnvironment &executionEnvironment, DeviceBitfield deviceBitfield)
|
||||
: UltCommandStreamReceiver<Family>(const_cast<ExecutionEnvironment &>(executionEnvironment), 0, deviceBitfield) {}
|
||||
MOCK_METHOD1(waitForFlushStamp, bool(FlushStamp &flushStampToWait));
|
||||
MOCK_METHOD3(waitForCompletionWithTimeout, bool(bool enableTimeout, int64_t timeoutMs, uint32_t taskCountToWait));
|
||||
};
|
||||
|
||||
template <typename Family>
|
||||
MockKmdNotifyCsr<Family> *createMockCsr() {
|
||||
auto csr = new ::testing::NiceMock<MockKmdNotifyCsr<Family>>(*device->executionEnvironment);
|
||||
auto csr = new ::testing::NiceMock<MockKmdNotifyCsr<Family>>(*device->executionEnvironment, device->getDeviceBitfield());
|
||||
device->resetCommandStreamReceiver(csr);
|
||||
|
||||
mockKmdNotifyHelper = new MockKmdNotifyHelper(&device->getHardwareInfo().capabilityTable.kmdNotifyProperties);
|
||||
|
|
|
@ -24,7 +24,7 @@ using namespace NEO;
|
|||
TEST(CommandTest, GivenNoTerminateFlagWhenSubmittingMapUnmapThenCsrIsFlushed) {
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
|
||||
std::unique_ptr<MockCommandQueue> cmdQ(new MockCommandQueue(nullptr, device.get(), nullptr));
|
||||
MockCommandStreamReceiver csr(*device->getExecutionEnvironment(), device->getRootDeviceIndex());
|
||||
MockCommandStreamReceiver csr(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
MockBuffer buffer;
|
||||
|
||||
auto initialTaskCount = csr.peekTaskCount();
|
||||
|
@ -41,7 +41,7 @@ TEST(CommandTest, GivenNoTerminateFlagWhenSubmittingMapUnmapThenCsrIsFlushed) {
|
|||
TEST(CommandTest, GivenTerminateFlagWhenSubmittingMapUnmapThenFlushIsAborted) {
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
|
||||
std::unique_ptr<MockCommandQueue> cmdQ(new MockCommandQueue(nullptr, device.get(), nullptr));
|
||||
MockCommandStreamReceiver csr(*device->getExecutionEnvironment(), device->getRootDeviceIndex());
|
||||
MockCommandStreamReceiver csr(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
MockBuffer buffer;
|
||||
|
||||
auto initialTaskCount = csr.peekTaskCount();
|
||||
|
@ -61,7 +61,7 @@ TEST(CommandTest, GivenTerminateFlagWhenSubmittingMapUnmapThenFlushIsAborted) {
|
|||
TEST(CommandTest, GivenNoTerminateFlagWhenSubmittingMarkerThenCsrIsNotFlushed) {
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
|
||||
std::unique_ptr<MockCommandQueue> cmdQ(new MockCommandQueue(nullptr, device.get(), nullptr));
|
||||
MockCommandStreamReceiver csr(*device->getExecutionEnvironment(), device->getRootDeviceIndex());
|
||||
MockCommandStreamReceiver csr(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
MockBuffer buffer;
|
||||
|
||||
auto initialTaskCount = csr.peekTaskCount();
|
||||
|
@ -75,7 +75,7 @@ TEST(CommandTest, GivenNoTerminateFlagWhenSubmittingMarkerThenCsrIsNotFlushed) {
|
|||
TEST(CommandTest, GivenTerminateFlagWhenSubmittingMarkerThenFlushIsAborted) {
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
|
||||
std::unique_ptr<MockCommandQueue> cmdQ(new MockCommandQueue(nullptr, device.get(), nullptr));
|
||||
MockCommandStreamReceiver csr(*device->getExecutionEnvironment(), device->getRootDeviceIndex());
|
||||
MockCommandStreamReceiver csr(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
MockBuffer buffer;
|
||||
|
||||
auto initialTaskCount = csr.peekTaskCount();
|
||||
|
@ -165,7 +165,8 @@ class MockCsr1 : public CommandStreamReceiverHw<GfxFamily> {
|
|||
passedDispatchFlags = dispatchFlags;
|
||||
return CompletionStamp();
|
||||
}
|
||||
MockCsr1(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) : CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiverHw(executionEnvironment, rootDeviceIndex) {}
|
||||
MockCsr1(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield)
|
||||
: CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiverHw(executionEnvironment, rootDeviceIndex, deviceBitfield) {}
|
||||
DispatchFlags passedDispatchFlags = DispatchFlagsHelper::createDefaultDispatchFlags();
|
||||
using CommandStreamReceiver::timestampPacketWriteEnabled;
|
||||
};
|
||||
|
|
|
@ -345,16 +345,19 @@ TEST_F(TimestampPacketSimpleTests, whenObjectIsCreatedThenInitializeAllStamps) {
|
|||
}
|
||||
|
||||
HWTEST_F(TimestampPacketTests, givenCommandStreamReceiverHwWhenObtainingPreferredTagPoolSizeThenReturnCorrectValue) {
|
||||
CommandStreamReceiverHw<FamilyType> csr(*executionEnvironment, 0);
|
||||
OsContext &osContext = *executionEnvironment->memoryManager->getRegisteredEngines()[0].osContext;
|
||||
|
||||
CommandStreamReceiverHw<FamilyType> csr(*executionEnvironment, 0, osContext.getDeviceBitfield());
|
||||
EXPECT_EQ(2048u, csr.getPreferredTagPoolSize());
|
||||
}
|
||||
|
||||
HWTEST_F(TimestampPacketTests, givenDebugFlagSetWhenCreatingTimestampPacketAllocatorThenDisableReusingAndLimitPoolSize) {
|
||||
DebugManagerStateRestore restore;
|
||||
DebugManager.flags.DisableTimestampPacketOptimizations.set(true);
|
||||
OsContext &osContext = *executionEnvironment->memoryManager->getRegisteredEngines()[0].osContext;
|
||||
|
||||
CommandStreamReceiverHw<FamilyType> csr(*executionEnvironment, 0);
|
||||
csr.setupContext(*executionEnvironment->memoryManager->getRegisteredEngines()[0].osContext);
|
||||
CommandStreamReceiverHw<FamilyType> csr(*executionEnvironment, 0, osContext.getDeviceBitfield());
|
||||
csr.setupContext(osContext);
|
||||
EXPECT_EQ(1u, csr.getPreferredTagPoolSize());
|
||||
|
||||
auto tag = csr.getTimestampPacketAllocator()->getTag();
|
||||
|
@ -1635,7 +1638,7 @@ HWTEST_F(TimestampPacketTests, givenWaitlistAndOutputEventWhenEnqueueingWithoutK
|
|||
HWTEST_F(TimestampPacketTests, givenBlockedEnqueueWithoutKernelWhenSubmittingThenDispatchBlockedCommands) {
|
||||
using MI_SEMAPHORE_WAIT = typename FamilyType::MI_SEMAPHORE_WAIT;
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->getExecutionEnvironment(), device->getRootDeviceIndex());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
device->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->timestampPacketWriteEnabled = true;
|
||||
mockCsr->storeFlushedTaskStream = true;
|
||||
|
|
|
@ -232,7 +232,7 @@ HWTEST_F(KernelImageArgTest, givenImgWithMcsAllocWhenMakeResidentThenMakeMcsAllo
|
|||
cl_mem memObj = img;
|
||||
pKernel->setArg(0, sizeof(memObj), &memObj);
|
||||
|
||||
std::unique_ptr<MockCsr<FamilyType>> csr(new MockCsr<FamilyType>(execStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<MockCsr<FamilyType>> csr(new MockCsr<FamilyType>(execStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
csr->setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
|
||||
pKernel->makeResident(*csr.get());
|
||||
|
|
|
@ -497,7 +497,7 @@ class CommandStreamReceiverMock : public CommandStreamReceiver {
|
|||
|
||||
bool isMultiOsContextCapable() const override { return false; }
|
||||
|
||||
CommandStreamReceiverMock() : BaseClass(*(new ExecutionEnvironment), 0) {
|
||||
CommandStreamReceiverMock() : BaseClass(*(new ExecutionEnvironment), 0, 1) {
|
||||
this->mockExecutionEnvironment.reset(&this->executionEnvironment);
|
||||
executionEnvironment.prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment.rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
|
||||
|
@ -586,7 +586,7 @@ TEST_F(KernelPrivateSurfaceTest, WhenChangingResidencyThenCsrResidencySizeIsUpda
|
|||
|
||||
// Test it
|
||||
auto executionEnvironment = pDevice->getExecutionEnvironment();
|
||||
std::unique_ptr<CommandStreamReceiverMock> csr(new CommandStreamReceiverMock(*executionEnvironment, 0));
|
||||
std::unique_ptr<CommandStreamReceiverMock> csr(new CommandStreamReceiverMock(*executionEnvironment, 0, 1));
|
||||
csr->setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
csr->residency.clear();
|
||||
EXPECT_EQ(0u, csr->residency.size());
|
||||
|
|
|
@ -23,16 +23,16 @@ namespace NEO {
|
|||
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE];
|
||||
|
||||
CommandStreamReceiver *createCommandStream(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) {
|
||||
CommandStreamReceiver *createCommandStream(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield) {
|
||||
auto hwInfo = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->getHardwareInfo();
|
||||
|
||||
if (ultHwConfig.useHwCsr) {
|
||||
return createCommandStreamImpl(executionEnvironment, rootDeviceIndex);
|
||||
return createCommandStreamImpl(executionEnvironment, rootDeviceIndex, deviceBitfield);
|
||||
}
|
||||
|
||||
auto funcCreate = commandStreamReceiverFactory[IGFX_MAX_CORE + hwInfo->platform.eRenderCoreFamily];
|
||||
if (funcCreate) {
|
||||
return funcCreate(false, executionEnvironment, rootDeviceIndex);
|
||||
return funcCreate(false, executionEnvironment, rootDeviceIndex, deviceBitfield);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <bitset>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
|
@ -13,6 +15,8 @@ namespace NEO {
|
|||
class CommandStreamReceiver;
|
||||
class ExecutionEnvironment;
|
||||
|
||||
extern CommandStreamReceiver *createCommandStream(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
using DeviceBitfield = std::bitset<32>;
|
||||
|
||||
extern CommandStreamReceiver *createCommandStream(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield);
|
||||
extern bool prepareDeviceEnvironments(ExecutionEnvironment &executionEnvironment);
|
||||
} // namespace NEO
|
||||
|
|
|
@ -23,16 +23,16 @@ class UltAubCommandStreamReceiver : public AUBCommandStreamReceiverHw<GfxFamily>
|
|||
using BaseClass::useGpuIdleImplicitFlush;
|
||||
using BaseClass::useNewResourceImplicitFlush;
|
||||
|
||||
UltAubCommandStreamReceiver(const std::string &fileName, bool standalone, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex)
|
||||
: BaseClass(fileName, standalone, executionEnvironment, rootDeviceIndex) {
|
||||
UltAubCommandStreamReceiver(const std::string &fileName, bool standalone, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield)
|
||||
: BaseClass(fileName, standalone, executionEnvironment, rootDeviceIndex, deviceBitfield) {
|
||||
}
|
||||
|
||||
UltAubCommandStreamReceiver(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex)
|
||||
: BaseClass("aubfile", true, executionEnvironment, rootDeviceIndex) {
|
||||
UltAubCommandStreamReceiver(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield)
|
||||
: BaseClass("aubfile", true, executionEnvironment, rootDeviceIndex, deviceBitfield) {
|
||||
}
|
||||
|
||||
static CommandStreamReceiver *create(bool withAubDump, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) {
|
||||
auto csr = new UltAubCommandStreamReceiver<GfxFamily>("aubfile", true, executionEnvironment, rootDeviceIndex);
|
||||
static CommandStreamReceiver *create(bool withAubDump, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield) {
|
||||
auto csr = new UltAubCommandStreamReceiver<GfxFamily>("aubfile", true, executionEnvironment, rootDeviceIndex, deviceBitfield);
|
||||
|
||||
if (!csr->subCaptureManager->isSubCaptureMode()) {
|
||||
csr->openFile("aubfile");
|
||||
|
|
|
@ -55,6 +55,7 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw<GfxFamily>, publ
|
|||
using BaseClass::CommandStreamReceiver::commandStream;
|
||||
using BaseClass::CommandStreamReceiver::debugConfirmationFunction;
|
||||
using BaseClass::CommandStreamReceiver::debugPauseStateAddress;
|
||||
using BaseClass::CommandStreamReceiver::deviceBitfield;
|
||||
using BaseClass::CommandStreamReceiver::dispatchMode;
|
||||
using BaseClass::CommandStreamReceiver::executionEnvironment;
|
||||
using BaseClass::CommandStreamReceiver::experimentalCmdBuffer;
|
||||
|
@ -98,10 +99,15 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw<GfxFamily>, publ
|
|||
using BaseClass::CommandStreamReceiver::userPauseConfirmation;
|
||||
using BaseClass::CommandStreamReceiver::waitForTaskCountAndCleanAllocationList;
|
||||
|
||||
UltCommandStreamReceiver(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) : BaseClass(executionEnvironment, rootDeviceIndex), recursiveLockCounter(0),
|
||||
recordedDispatchFlags(DispatchFlagsHelper::createDefaultDispatchFlags()) {}
|
||||
static CommandStreamReceiver *create(bool withAubDump, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) {
|
||||
return new UltCommandStreamReceiver<GfxFamily>(executionEnvironment, rootDeviceIndex);
|
||||
UltCommandStreamReceiver(ExecutionEnvironment &executionEnvironment,
|
||||
uint32_t rootDeviceIndex,
|
||||
DeviceBitfield deviceBitfield) : BaseClass(executionEnvironment, rootDeviceIndex, deviceBitfield), recursiveLockCounter(0),
|
||||
recordedDispatchFlags(DispatchFlagsHelper::createDefaultDispatchFlags()) {}
|
||||
static CommandStreamReceiver *create(bool withAubDump,
|
||||
ExecutionEnvironment &executionEnvironment,
|
||||
uint32_t rootDeviceIndex,
|
||||
DeviceBitfield deviceBitfield) {
|
||||
return new UltCommandStreamReceiver<GfxFamily>(executionEnvironment, rootDeviceIndex, deviceBitfield);
|
||||
}
|
||||
|
||||
GmmPageTableMngr *createPageTableManager() override {
|
||||
|
@ -216,6 +222,9 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw<GfxFamily>, publ
|
|||
}
|
||||
|
||||
bool isMultiOsContextCapable() const override {
|
||||
if (callBaseIsMultiOsContextCapable) {
|
||||
return BaseClass::isMultiOsContextCapable();
|
||||
}
|
||||
return multiOsContextCapable;
|
||||
}
|
||||
|
||||
|
@ -250,27 +259,32 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw<GfxFamily>, publ
|
|||
ensureCommandBufferAllocationCalled++;
|
||||
BaseClass::ensureCommandBufferAllocation(commandStream, minimumRequiredSize, additionalAllocationSize);
|
||||
}
|
||||
std::vector<std::string> aubCommentMessages;
|
||||
|
||||
BatchBuffer latestFlushedBatchBuffer = {};
|
||||
|
||||
std::atomic<uint32_t> recursiveLockCounter;
|
||||
std::atomic<uint32_t> latestWaitForCompletionWithTimeoutTaskCount{0};
|
||||
|
||||
LinearStream *lastFlushedCommandStream = nullptr;
|
||||
|
||||
uint32_t makeSurfacePackNonResidentCalled = false;
|
||||
uint32_t latestSentTaskCountValueDuringFlush = 0;
|
||||
uint32_t blitBufferCalled = 0;
|
||||
uint32_t createPerDssBackedBufferCalled = 0;
|
||||
int ensureCommandBufferAllocationCalled = 0;
|
||||
DispatchFlags recordedDispatchFlags;
|
||||
|
||||
bool createPageTableManagerCalled = false;
|
||||
bool recordFlusheBatchBuffer = false;
|
||||
bool checkAndActivateAubSubCaptureCalled = false;
|
||||
bool addAubCommentCalled = false;
|
||||
bool downloadAllocationCalled = false;
|
||||
std::vector<std::string> aubCommentMessages;
|
||||
bool flushBatchedSubmissionsCalled = false;
|
||||
uint32_t makeSurfacePackNonResidentCalled = false;
|
||||
bool initProgrammingFlagsCalled = false;
|
||||
LinearStream *lastFlushedCommandStream = nullptr;
|
||||
BatchBuffer latestFlushedBatchBuffer = {};
|
||||
uint32_t latestSentTaskCountValueDuringFlush = 0;
|
||||
uint32_t blitBufferCalled = 0;
|
||||
uint32_t createPerDssBackedBufferCalled = 0;
|
||||
std::atomic<uint32_t> latestWaitForCompletionWithTimeoutTaskCount{0};
|
||||
DispatchFlags recordedDispatchFlags;
|
||||
bool multiOsContextCapable = false;
|
||||
bool directSubmissionAvailable = false;
|
||||
bool blitterDirectSubmissionAvailable = false;
|
||||
int ensureCommandBufferAllocationCalled = 0;
|
||||
bool callBaseIsMultiOsContextCapable = false;
|
||||
};
|
||||
} // namespace NEO
|
||||
|
|
|
@ -33,7 +33,7 @@ struct BcsBufferTests : public ::testing::Test {
|
|||
BcsMockContext(ClDevice *device) : MockContext(device) {
|
||||
bcsOsContext.reset(OsContext::create(nullptr, 0, device->getDeviceBitfield(), aub_stream::ENGINE_BCS, PreemptionMode::Disabled,
|
||||
false, false, false));
|
||||
bcsCsr.reset(createCommandStream(*device->getExecutionEnvironment(), device->getRootDeviceIndex()));
|
||||
bcsCsr.reset(createCommandStream(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield()));
|
||||
bcsCsr->setupContext(*bcsOsContext);
|
||||
bcsCsr->initializeTagAllocation();
|
||||
bcsCsr->createGlobalFenceAllocation();
|
||||
|
@ -870,7 +870,7 @@ HWTEST_TEMPLATED_F(BcsBufferTests, givenInputAndOutputTimestampPacketWhenBlitCal
|
|||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(BcsBufferTests, givenBlockingWriteBufferWhenUsingBcsThenCallWait) {
|
||||
auto myMockCsr = new MyMockCsr<FamilyType>(*device->getExecutionEnvironment(), device->getRootDeviceIndex());
|
||||
auto myMockCsr = new MyMockCsr<FamilyType>(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
myMockCsr->taskCount = 1234;
|
||||
myMockCsr->initializeTagAllocation();
|
||||
myMockCsr->setupContext(*bcsMockContext->bcsOsContext);
|
||||
|
@ -909,7 +909,7 @@ HWTEST_TEMPLATED_F(BcsBufferTests, givenBlockingWriteBufferWhenUsingBcsThenCallW
|
|||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(BcsBufferTests, givenBlockingReadBufferRectWhenUsingBcsThenCallWait) {
|
||||
auto myMockCsr = new MyMockCsr<FamilyType>(*device->getExecutionEnvironment(), device->getRootDeviceIndex());
|
||||
auto myMockCsr = new MyMockCsr<FamilyType>(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
myMockCsr->taskCount = 1234;
|
||||
myMockCsr->initializeTagAllocation();
|
||||
myMockCsr->setupContext(*bcsMockContext->bcsOsContext);
|
||||
|
@ -956,7 +956,7 @@ HWTEST_TEMPLATED_F(BcsBufferTests, givenBlockingReadBufferRectWhenUsingBcsThenCa
|
|||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(BcsBufferTests, givenBlockingWriteBufferRectWhenUsingBcsThenCallWait) {
|
||||
auto myMockCsr = new MyMockCsr<FamilyType>(*device->getExecutionEnvironment(), device->getRootDeviceIndex());
|
||||
auto myMockCsr = new MyMockCsr<FamilyType>(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
myMockCsr->taskCount = 1234;
|
||||
myMockCsr->initializeTagAllocation();
|
||||
myMockCsr->setupContext(*bcsMockContext->bcsOsContext);
|
||||
|
@ -1003,7 +1003,7 @@ HWTEST_TEMPLATED_F(BcsBufferTests, givenBlockingWriteBufferRectWhenUsingBcsThenC
|
|||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(BcsBufferTests, givenBlockingReadBufferWhenUsingBcsThenCallWait) {
|
||||
auto myMockCsr = new MyMockCsr<FamilyType>(*device->getExecutionEnvironment(), device->getRootDeviceIndex());
|
||||
auto myMockCsr = new MyMockCsr<FamilyType>(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
myMockCsr->taskCount = 1234;
|
||||
myMockCsr->initializeTagAllocation();
|
||||
myMockCsr->setupContext(*bcsMockContext->bcsOsContext);
|
||||
|
@ -1042,7 +1042,7 @@ HWTEST_TEMPLATED_F(BcsBufferTests, givenBlockingReadBufferWhenUsingBcsThenCallWa
|
|||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(BcsBufferTests, givenBlockingSVMMemcpyAndEnqueuReadBufferIsCalledWhenUsingBcsThenCallWait) {
|
||||
auto myMockCsr = new MyMockCsr<FamilyType>(*device->getExecutionEnvironment(), device->getRootDeviceIndex());
|
||||
auto myMockCsr = new MyMockCsr<FamilyType>(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
myMockCsr->taskCount = 1234;
|
||||
myMockCsr->initializeTagAllocation();
|
||||
myMockCsr->setupContext(*bcsMockContext->bcsOsContext);
|
||||
|
@ -1075,7 +1075,7 @@ HWTEST_TEMPLATED_F(BcsBufferTests, givenBlockingSVMMemcpyAndEnqueuReadBufferIsCa
|
|||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(BcsBufferTests, givenSrcHostPtrBlockingEnqueueSVMMemcpyAndEnqueuWriteBufferIsCalledWhenUsingBcsThenCallWait) {
|
||||
auto myMockCsr = new MyMockCsr<FamilyType>(*device->getExecutionEnvironment(), device->getRootDeviceIndex());
|
||||
auto myMockCsr = new MyMockCsr<FamilyType>(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
myMockCsr->taskCount = 1234;
|
||||
myMockCsr->initializeTagAllocation();
|
||||
myMockCsr->setupContext(*bcsMockContext->bcsOsContext);
|
||||
|
@ -1108,7 +1108,7 @@ HWTEST_TEMPLATED_F(BcsBufferTests, givenSrcHostPtrBlockingEnqueueSVMMemcpyAndEnq
|
|||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(BcsBufferTests, givenDstHostPtrAndSrcHostPtrBlockingEnqueueSVMMemcpyAndEnqueuWriteBufferIsCalledWhenUsingBcsThenCallWait) {
|
||||
auto myMockCsr = new MyMockCsr<FamilyType>(*device->getExecutionEnvironment(), device->getRootDeviceIndex());
|
||||
auto myMockCsr = new MyMockCsr<FamilyType>(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
myMockCsr->taskCount = 1234;
|
||||
myMockCsr->initializeTagAllocation();
|
||||
myMockCsr->setupContext(*bcsMockContext->bcsOsContext);
|
||||
|
@ -1162,7 +1162,7 @@ HWTEST_TEMPLATED_F(BcsBufferTests, givenSvmToSvmCopyWhenEnqueueSVMMemcpyThenSvmM
|
|||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(BcsBufferTests, givenSvmToSvmCopyTypeWhenEnqueueNonBlockingSVMMemcpyThenSvmMemcpyCommandIsEnqueuedWhenUsingBcsThenCallWait) {
|
||||
auto myMockCsr = new MyMockCsr<FamilyType>(*device->getExecutionEnvironment(), device->getRootDeviceIndex());
|
||||
auto myMockCsr = new MyMockCsr<FamilyType>(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
myMockCsr->taskCount = 1234;
|
||||
myMockCsr->initializeTagAllocation();
|
||||
myMockCsr->setupContext(*bcsMockContext->bcsOsContext);
|
||||
|
@ -1290,7 +1290,7 @@ HWTEST_TEMPLATED_F(BcsSvmTests, givenSVMMAllocationWithOffsetWhenUsingBcsThenPro
|
|||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(BcsBufferTests, givenBlockedEnqueueWhenUsingBcsThenWaitForValidTaskCountOnBlockingCall) {
|
||||
auto myMockCsr = new MyMockCsr<FamilyType>(*device->getExecutionEnvironment(), device->getRootDeviceIndex());
|
||||
auto myMockCsr = new MyMockCsr<FamilyType>(*device->getExecutionEnvironment(), device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
myMockCsr->taskCount = 1234;
|
||||
myMockCsr->initializeTagAllocation();
|
||||
myMockCsr->setupContext(*bcsMockContext->bcsOsContext);
|
||||
|
|
|
@ -27,7 +27,8 @@ using namespace NEO;
|
|||
template <typename Family>
|
||||
class MyCsr : public UltCommandStreamReceiver<Family> {
|
||||
public:
|
||||
MyCsr(const ExecutionEnvironment &executionEnvironment) : UltCommandStreamReceiver<Family>(const_cast<ExecutionEnvironment &>(executionEnvironment), 0) {}
|
||||
MyCsr(const ExecutionEnvironment &executionEnvironment, DeviceBitfield deviceBitfield)
|
||||
: UltCommandStreamReceiver<Family>(const_cast<ExecutionEnvironment &>(executionEnvironment), 0, deviceBitfield) {}
|
||||
MOCK_METHOD3(waitForCompletionWithTimeout, bool(bool enableTimeout, int64_t timeoutMs, uint32_t taskCountToWait));
|
||||
};
|
||||
|
||||
|
@ -140,8 +141,8 @@ HWTEST_P(MemObjAsyncDestructionTest, givenUsedMemObjWithAsyncDestructionsEnabled
|
|||
|
||||
auto rootDeviceIndex = device->getRootDeviceIndex();
|
||||
|
||||
auto mockCsr0 = new ::testing::NiceMock<MyCsr<FamilyType>>(*device->executionEnvironment);
|
||||
auto mockCsr1 = new ::testing::NiceMock<MyCsr<FamilyType>>(*device->executionEnvironment);
|
||||
auto mockCsr0 = new ::testing::NiceMock<MyCsr<FamilyType>>(*device->executionEnvironment, device->getDeviceBitfield());
|
||||
auto mockCsr1 = new ::testing::NiceMock<MyCsr<FamilyType>>(*device->executionEnvironment, device->getDeviceBitfield());
|
||||
device->resetCommandStreamReceiver(mockCsr0, 0);
|
||||
device->resetCommandStreamReceiver(mockCsr1, 1);
|
||||
*mockCsr0->getTagAddress() = 0;
|
||||
|
@ -192,7 +193,7 @@ HWTEST_P(MemObjAsyncDestructionTest, givenUsedMemObjWithAsyncDestructionsEnabled
|
|||
memObj->setAllocatedMapPtr(allocatedPtr);
|
||||
}
|
||||
|
||||
auto mockCsr = new ::testing::NiceMock<MyCsr<FamilyType>>(*device->executionEnvironment);
|
||||
auto mockCsr = new ::testing::NiceMock<MyCsr<FamilyType>>(*device->executionEnvironment, device->getDeviceBitfield());
|
||||
device->resetCommandStreamReceiver(mockCsr);
|
||||
*mockCsr->getTagAddress() = 0;
|
||||
auto osContextId = mockCsr->getOsContext().getContextId();
|
||||
|
@ -235,7 +236,7 @@ HWTEST_P(MemObjAsyncDestructionTest, givenUsedMemObjWithAsyncDestructionsEnabled
|
|||
}
|
||||
|
||||
makeMemObjUsed();
|
||||
auto mockCsr = new ::testing::NiceMock<MyCsr<FamilyType>>(*device->executionEnvironment);
|
||||
auto mockCsr = new ::testing::NiceMock<MyCsr<FamilyType>>(*device->executionEnvironment, device->getDeviceBitfield());
|
||||
device->resetCommandStreamReceiver(mockCsr);
|
||||
*mockCsr->getTagAddress() = 0;
|
||||
|
||||
|
@ -270,7 +271,7 @@ HWTEST_P(MemObjSyncDestructionTest, givenMemObjWithDestructableAllocationWhenAsy
|
|||
} else {
|
||||
makeMemObjNotReady();
|
||||
}
|
||||
auto mockCsr = new ::testing::NiceMock<MyCsr<FamilyType>>(*device->executionEnvironment);
|
||||
auto mockCsr = new ::testing::NiceMock<MyCsr<FamilyType>>(*device->executionEnvironment, device->getDeviceBitfield());
|
||||
device->resetCommandStreamReceiver(mockCsr);
|
||||
*mockCsr->getTagAddress() = 0;
|
||||
|
||||
|
@ -297,7 +298,7 @@ HWTEST_P(MemObjSyncDestructionTest, givenMemObjWithDestructableAllocationWhenAsy
|
|||
} else {
|
||||
makeMemObjNotReady();
|
||||
}
|
||||
auto mockCsr = new ::testing::NiceMock<MyCsr<FamilyType>>(*device->executionEnvironment);
|
||||
auto mockCsr = new ::testing::NiceMock<MyCsr<FamilyType>>(*device->executionEnvironment, device->getDeviceBitfield());
|
||||
device->resetCommandStreamReceiver(mockCsr);
|
||||
*mockCsr->getTagAddress() = 0;
|
||||
|
||||
|
@ -316,7 +317,7 @@ HWTEST_P(MemObjSyncDestructionTest, givenMemObjWithDestructableAllocationWhenAsy
|
|||
HWTEST_P(MemObjSyncDestructionTest, givenMemObjWithMapAllocationWhenAsyncDestructionsAreDisabledThenWaitForCompletionWithTimeoutOnMapAllocation) {
|
||||
auto isMapAllocationUsed = GetParam();
|
||||
|
||||
auto mockCsr = new ::testing::NiceMock<MyCsr<FamilyType>>(*device->executionEnvironment);
|
||||
auto mockCsr = new ::testing::NiceMock<MyCsr<FamilyType>>(*device->executionEnvironment, device->getDeviceBitfield());
|
||||
device->resetCommandStreamReceiver(mockCsr);
|
||||
*mockCsr->getTagAddress() = 0;
|
||||
|
||||
|
@ -354,7 +355,7 @@ HWTEST_P(MemObjSyncDestructionTest, givenMemObjWithMapAllocationWhenAsyncDestruc
|
|||
HWTEST_P(MemObjSyncDestructionTest, givenMemObjWithMapAllocationWhenAsyncDestructionsAreDisabledThenMapAllocationIsNotDeferred) {
|
||||
auto hasMapAllocation = GetParam();
|
||||
|
||||
auto mockCsr = new ::testing::NiceMock<MyCsr<FamilyType>>(*device->executionEnvironment);
|
||||
auto mockCsr = new ::testing::NiceMock<MyCsr<FamilyType>>(*device->executionEnvironment, device->getDeviceBitfield());
|
||||
device->resetCommandStreamReceiver(mockCsr);
|
||||
*mockCsr->getTagAddress() = 0;
|
||||
|
||||
|
@ -385,7 +386,7 @@ HWTEST_P(MemObjSyncDestructionTest, givenMemObjWithMapAllocationWhenAsyncDestruc
|
|||
HWTEST_P(MemObjAsyncDestructionTest, givenMemObjWithMapAllocationWithoutMemUseHostPtrFlagWhenAsyncDestructionsAreEnabledThenMapAllocationIsDeferred) {
|
||||
auto hasMapAllocation = GetParam();
|
||||
|
||||
auto mockCsr = new ::testing::NiceMock<MyCsr<FamilyType>>(*device->executionEnvironment);
|
||||
auto mockCsr = new ::testing::NiceMock<MyCsr<FamilyType>>(*device->executionEnvironment, device->getDeviceBitfield());
|
||||
device->resetCommandStreamReceiver(mockCsr);
|
||||
*mockCsr->getTagAddress() = 0;
|
||||
|
||||
|
@ -424,7 +425,7 @@ HWTEST_P(MemObjAsyncDestructionTest, givenMemObjWithMapAllocationWithoutMemUseHo
|
|||
HWTEST_P(MemObjAsyncDestructionTest, givenMemObjWithMapAllocationWithMemUseHostPtrFlagWhenAsyncDestructionsAreEnabledThenMapAllocationIsNotDeferred) {
|
||||
auto hasMapAllocation = GetParam();
|
||||
|
||||
auto mockCsr = new ::testing::NiceMock<MyCsr<FamilyType>>(*device->executionEnvironment);
|
||||
auto mockCsr = new ::testing::NiceMock<MyCsr<FamilyType>>(*device->executionEnvironment, device->getDeviceBitfield());
|
||||
device->resetCommandStreamReceiver(mockCsr);
|
||||
*mockCsr->getTagAddress() = 0;
|
||||
|
||||
|
@ -485,9 +486,9 @@ HWTEST_F(UsmDestructionTests, givenSharedUsmAllocationWhenBlockingFreeIsCalledTh
|
|||
GTEST_SKIP();
|
||||
}
|
||||
|
||||
auto mockCsr = new ::testing::NiceMock<MyCsr<FamilyType>>(*mockDevice.executionEnvironment);
|
||||
auto mockCsr = new ::testing::NiceMock<MyCsr<FamilyType>>(*mockDevice.executionEnvironment, 1);
|
||||
auto osContext = mockDevice.executionEnvironment->memoryManager->createAndRegisterOsContext(mockDevice.engines[0].commandStreamReceiver,
|
||||
aub_stream::ENGINE_RCS, {},
|
||||
aub_stream::ENGINE_RCS, 1,
|
||||
PreemptionMode::Disabled,
|
||||
false, false, false);
|
||||
mockDevice.engines[0].osContext = osContext;
|
||||
|
@ -524,9 +525,9 @@ HWTEST_F(UsmDestructionTests, givenUsmAllocationWhenBlockingFreeIsCalledThenWait
|
|||
GTEST_SKIP();
|
||||
}
|
||||
|
||||
auto mockCsr = new ::testing::NiceMock<MyCsr<FamilyType>>(*mockDevice.executionEnvironment);
|
||||
auto mockCsr = new ::testing::NiceMock<MyCsr<FamilyType>>(*mockDevice.executionEnvironment, 1);
|
||||
auto osContext = mockDevice.executionEnvironment->memoryManager->createAndRegisterOsContext(mockDevice.engines[0].commandStreamReceiver,
|
||||
aub_stream::ENGINE_RCS, {},
|
||||
aub_stream::ENGINE_RCS, 1,
|
||||
PreemptionMode::Disabled,
|
||||
false, false, false);
|
||||
mockDevice.engines[0].osContext = osContext;
|
||||
|
|
|
@ -914,7 +914,7 @@ HWTEST_F(HostPtrAllocationTest, givenOverlappingFragmentsWhenCheckIsCalledThenWa
|
|||
EXPECT_EQ(1u, engines.size());
|
||||
|
||||
auto csr0 = static_cast<MockCommandStreamReceiver *>(engines[0].commandStreamReceiver);
|
||||
auto csr1 = std::make_unique<MockCommandStreamReceiver>(executionEnvironment, 0);
|
||||
auto csr1 = std::make_unique<MockCommandStreamReceiver>(executionEnvironment, 0, 1);
|
||||
uint32_t csr0GpuTag = taskCountNotReady;
|
||||
uint32_t csr1GpuTag = taskCountNotReady;
|
||||
csr0->tagAddress = &csr0GpuTag;
|
||||
|
|
|
@ -1406,12 +1406,13 @@ TEST(OsAgnosticMemoryManager, givenOsAgnosticMemoryManagerWhenVerifyHandleThenRe
|
|||
TEST(OsAgnosticMemoryManager, givenMemoryManagerWhenGpuAddressIsSetThenAllocationWithSpecifiedGpuAddressInSystemMemoryIsCreated) {
|
||||
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get());
|
||||
auto memoryManager = new OsAgnosticMemoryManager(executionEnvironment);
|
||||
|
||||
std::unique_ptr<CommandStreamReceiver> csr(createCommandStream(executionEnvironment, 0u));
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
std::unique_ptr<CommandStreamReceiver> csr(createCommandStream(executionEnvironment, 0u, deviceBitfield));
|
||||
executionEnvironment.memoryManager.reset(memoryManager);
|
||||
auto osContext = memoryManager->createAndRegisterOsContext(csr.get(),
|
||||
HwHelper::get(defaultHwInfo->platform.eRenderCoreFamily).getGpgpuEngineInstances(*defaultHwInfo)[0].first,
|
||||
1, PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo),
|
||||
deviceBitfield,
|
||||
PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo),
|
||||
false, false, false);
|
||||
|
||||
MockAllocationProperties properties = {0, MemoryConstants::pageSize};
|
||||
|
@ -1827,10 +1828,11 @@ TEST(ResidencyDataTest, givenOsContextWhenItIsRegisteredToMemoryManagerThenRefCo
|
|||
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get());
|
||||
auto memoryManager = new MockMemoryManager(false, false, executionEnvironment);
|
||||
executionEnvironment.memoryManager.reset(memoryManager);
|
||||
std::unique_ptr<CommandStreamReceiver> csr(createCommandStream(executionEnvironment, 0u));
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
std::unique_ptr<CommandStreamReceiver> csr(createCommandStream(executionEnvironment, 0u, deviceBitfield));
|
||||
memoryManager->createAndRegisterOsContext(csr.get(),
|
||||
HwHelper::get(defaultHwInfo->platform.eRenderCoreFamily).getGpgpuEngineInstances(*defaultHwInfo)[0].first,
|
||||
1, PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo),
|
||||
deviceBitfield, PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo),
|
||||
false, false, false);
|
||||
EXPECT_EQ(1u, memoryManager->getRegisteredEnginesCount());
|
||||
EXPECT_EQ(1, memoryManager->registeredEngines[0].osContext->getRefInternalCount());
|
||||
|
@ -1854,8 +1856,8 @@ TEST(ResidencyDataTest, givenDeviceBitfieldWhenCreatingOsContextThenSetValidValu
|
|||
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get());
|
||||
auto memoryManager = new MockMemoryManager(false, false, executionEnvironment);
|
||||
executionEnvironment.memoryManager.reset(memoryManager);
|
||||
std::unique_ptr<CommandStreamReceiver> csr(createCommandStream(executionEnvironment, 0u));
|
||||
DeviceBitfield deviceBitfield = 0b11;
|
||||
DeviceBitfield deviceBitfield(0b11);
|
||||
std::unique_ptr<CommandStreamReceiver> csr(createCommandStream(executionEnvironment, 0u, deviceBitfield));
|
||||
PreemptionMode preemptionMode = PreemptionMode::MidThread;
|
||||
memoryManager->createAndRegisterOsContext(csr.get(),
|
||||
HwHelper::get(defaultHwInfo->platform.eRenderCoreFamily).getGpgpuEngineInstances(*defaultHwInfo)[0].first,
|
||||
|
@ -1870,15 +1872,16 @@ TEST(ResidencyDataTest, givenTwoOsContextsWhenTheyAreRegisteredFromHigherToLower
|
|||
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get(), true, 2u);
|
||||
auto memoryManager = new MockMemoryManager(false, false, executionEnvironment);
|
||||
executionEnvironment.memoryManager.reset(memoryManager);
|
||||
std::unique_ptr<CommandStreamReceiver> csr(createCommandStream(executionEnvironment, 0u));
|
||||
std::unique_ptr<CommandStreamReceiver> csr1(createCommandStream(executionEnvironment, 1u));
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
std::unique_ptr<CommandStreamReceiver> csr(createCommandStream(executionEnvironment, 0u, deviceBitfield));
|
||||
std::unique_ptr<CommandStreamReceiver> csr1(createCommandStream(executionEnvironment, 1u, deviceBitfield));
|
||||
memoryManager->createAndRegisterOsContext(csr.get(),
|
||||
HwHelper::get(defaultHwInfo->platform.eRenderCoreFamily).getGpgpuEngineInstances(*defaultHwInfo)[0].first,
|
||||
1, PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo),
|
||||
deviceBitfield, PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo),
|
||||
false, false, false);
|
||||
memoryManager->createAndRegisterOsContext(csr1.get(),
|
||||
HwHelper::get(defaultHwInfo->platform.eRenderCoreFamily).getGpgpuEngineInstances(*defaultHwInfo)[1].first,
|
||||
1, PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo),
|
||||
deviceBitfield, PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo),
|
||||
false, false, false);
|
||||
EXPECT_EQ(2u, memoryManager->getRegisteredEnginesCount());
|
||||
EXPECT_EQ(1, memoryManager->registeredEngines[0].osContext->getRefInternalCount());
|
||||
|
|
|
@ -64,10 +64,11 @@ HWTEST_TYPED_TEST(SurfaceTest, GivenSurfaceWhenInterfaceIsUsedThenSurfaceBehaves
|
|||
|
||||
ExecutionEnvironment *executionEnvironment = platform()->peekExecutionEnvironment();
|
||||
executionEnvironment->initializeMemoryManager();
|
||||
auto csr = std::make_unique<MockCsr<FamilyType>>(execStamp, *executionEnvironment, 0);
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
auto csr = std::make_unique<MockCsr<FamilyType>>(execStamp, *executionEnvironment, 0, deviceBitfield);
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
auto engine = HwHelper::get(hwInfo.platform.eRenderCoreFamily).getGpgpuEngineInstances(hwInfo)[0].first;
|
||||
auto osContext = executionEnvironment->memoryManager->createAndRegisterOsContext(csr.get(), engine, 1,
|
||||
auto osContext = executionEnvironment->memoryManager->createAndRegisterOsContext(csr.get(), engine, deviceBitfield,
|
||||
PreemptionHelper::getDefaultPreemptionMode(hwInfo),
|
||||
false, false, false);
|
||||
csr->setupContext(*osContext);
|
||||
|
|
|
@ -23,11 +23,11 @@ class TestedDrmCommandStreamReceiver : public DrmCommandStreamReceiver<GfxFamily
|
|||
using CommandStreamReceiverHw<GfxFamily>::blitterDirectSubmission;
|
||||
using CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiver::lastSentSliceCount;
|
||||
|
||||
TestedDrmCommandStreamReceiver(gemCloseWorkerMode mode, ExecutionEnvironment &executionEnvironment)
|
||||
: DrmCommandStreamReceiver<GfxFamily>(executionEnvironment, 0, mode) {
|
||||
TestedDrmCommandStreamReceiver(gemCloseWorkerMode mode, ExecutionEnvironment &executionEnvironment, DeviceBitfield deviceBitfield)
|
||||
: DrmCommandStreamReceiver<GfxFamily>(executionEnvironment, 0, deviceBitfield, mode) {
|
||||
}
|
||||
TestedDrmCommandStreamReceiver(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex)
|
||||
: DrmCommandStreamReceiver<GfxFamily>(executionEnvironment, rootDeviceIndex, gemCloseWorkerMode::gemCloseWorkerInactive) {
|
||||
TestedDrmCommandStreamReceiver(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield)
|
||||
: DrmCommandStreamReceiver<GfxFamily>(executionEnvironment, rootDeviceIndex, deviceBitfield, gemCloseWorkerMode::gemCloseWorkerInactive) {
|
||||
}
|
||||
|
||||
void overrideDispatchPolicy(DispatchMode overrideValue) {
|
||||
|
|
|
@ -176,16 +176,17 @@ struct AubExecutionEnvironment {
|
|||
template <typename CsrType>
|
||||
std::unique_ptr<AubExecutionEnvironment> getEnvironment(bool createTagAllocation, bool allocateCommandBuffer, bool standalone) {
|
||||
std::unique_ptr<ExecutionEnvironment> executionEnvironment(new ExecutionEnvironment);
|
||||
DeviceBitfield deviceBitfield(1);
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
uint32_t rootDeviceIndex = 0u;
|
||||
executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->aubCenter.reset(new AubCenter());
|
||||
|
||||
executionEnvironment->initializeMemoryManager();
|
||||
auto commandStreamReceiver = std::make_unique<CsrType>("", standalone, *executionEnvironment, rootDeviceIndex);
|
||||
auto commandStreamReceiver = std::make_unique<CsrType>("", standalone, *executionEnvironment, rootDeviceIndex, deviceBitfield);
|
||||
|
||||
auto osContext = executionEnvironment->memoryManager->createAndRegisterOsContext(commandStreamReceiver.get(),
|
||||
getChosenEngineType(*defaultHwInfo), 1,
|
||||
getChosenEngineType(*defaultHwInfo), deviceBitfield,
|
||||
PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo),
|
||||
false, false, false);
|
||||
commandStreamReceiver->setupContext(*osContext);
|
||||
|
|
|
@ -20,7 +20,7 @@ template <typename GfxFamily>
|
|||
class UltCommandStreamReceiver;
|
||||
struct HardwareInfo;
|
||||
|
||||
extern CommandStreamReceiver *createCommandStream(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
extern CommandStreamReceiver *createCommandStream(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield);
|
||||
|
||||
class MockClDevice : public ClDevice {
|
||||
public:
|
||||
|
|
|
@ -24,8 +24,8 @@ class MockCsrBase : public UltCommandStreamReceiver<GfxFamily> {
|
|||
|
||||
MockCsrBase() = delete;
|
||||
|
||||
MockCsrBase(int32_t &execStamp, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex)
|
||||
: BaseUltCsrClass(executionEnvironment, rootDeviceIndex), executionStamp(&execStamp), flushTaskStamp(-1) {
|
||||
MockCsrBase(int32_t &execStamp, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield)
|
||||
: BaseUltCsrClass(executionEnvironment, rootDeviceIndex, deviceBitfield), executionStamp(&execStamp), flushTaskStamp(-1) {
|
||||
}
|
||||
|
||||
void makeResident(GraphicsAllocation &gfxAllocation) override {
|
||||
|
@ -78,7 +78,8 @@ using MockCsrHw = MockCsrBase<GfxFamily>;
|
|||
template <typename GfxFamily>
|
||||
class MockCsrAub : public MockCsrBase<GfxFamily> {
|
||||
public:
|
||||
MockCsrAub(int32_t &execStamp, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) : MockCsrBase<GfxFamily>(execStamp, executionEnvironment, rootDeviceIndex) {}
|
||||
MockCsrAub(int32_t &execStamp, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield)
|
||||
: MockCsrBase<GfxFamily>(execStamp, executionEnvironment, rootDeviceIndex, deviceBitfield) {}
|
||||
CommandStreamReceiverType getType() override {
|
||||
return CommandStreamReceiverType::CSR_AUB;
|
||||
}
|
||||
|
@ -93,7 +94,8 @@ class MockCsr : public MockCsrBase<GfxFamily> {
|
|||
|
||||
MockCsr() = delete;
|
||||
MockCsr(const HardwareInfo &hwInfoIn) = delete;
|
||||
MockCsr(int32_t &execStamp, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) : BaseClass(execStamp, executionEnvironment, rootDeviceIndex) {
|
||||
MockCsr(int32_t &execStamp, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield)
|
||||
: BaseClass(execStamp, executionEnvironment, rootDeviceIndex, deviceBitfield) {
|
||||
}
|
||||
|
||||
bool flush(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency) override {
|
||||
|
|
|
@ -25,8 +25,8 @@ class MockTbxCsr : public TbxCommandStreamReceiverHw<GfxFamily> {
|
|||
public:
|
||||
using TbxCommandStreamReceiverHw<GfxFamily>::writeMemory;
|
||||
using TbxCommandStreamReceiverHw<GfxFamily>::allocationsForDownload;
|
||||
MockTbxCsr(ExecutionEnvironment &executionEnvironment)
|
||||
: TbxCommandStreamReceiverHw<GfxFamily>(executionEnvironment, 0) {}
|
||||
MockTbxCsr(ExecutionEnvironment &executionEnvironment, DeviceBitfield deviceBitfield)
|
||||
: TbxCommandStreamReceiverHw<GfxFamily>(executionEnvironment, 0, deviceBitfield) {}
|
||||
|
||||
void initializeEngine() {
|
||||
TbxCommandStreamReceiverHw<GfxFamily>::initializeEngine();
|
||||
|
|
|
@ -36,19 +36,19 @@ struct DeviceCommandStreamLeaksTest : ::testing::Test {
|
|||
};
|
||||
|
||||
HWTEST_F(DeviceCommandStreamLeaksTest, Create) {
|
||||
std::unique_ptr<CommandStreamReceiver> ptr(DeviceCommandStreamReceiver<FamilyType>::create(false, *executionEnvironment, 0));
|
||||
std::unique_ptr<CommandStreamReceiver> ptr(DeviceCommandStreamReceiver<FamilyType>::create(false, *executionEnvironment, 0, 1));
|
||||
DrmMockSuccess mockDrm;
|
||||
EXPECT_NE(nullptr, ptr);
|
||||
}
|
||||
|
||||
HWTEST_F(DeviceCommandStreamLeaksTest, givenDefaultDrmCsrWhenItIsCreatedThenGemCloseWorkerInactiveModeIsSelected) {
|
||||
std::unique_ptr<CommandStreamReceiver> ptr(DeviceCommandStreamReceiver<FamilyType>::create(false, *executionEnvironment, 0));
|
||||
std::unique_ptr<CommandStreamReceiver> ptr(DeviceCommandStreamReceiver<FamilyType>::create(false, *executionEnvironment, 0, 1));
|
||||
auto drmCsr = (DrmCommandStreamReceiver<FamilyType> *)ptr.get();
|
||||
EXPECT_EQ(drmCsr->peekGemCloseWorkerOperationMode(), gemCloseWorkerMode::gemCloseWorkerActive);
|
||||
}
|
||||
|
||||
HWTEST_F(DeviceCommandStreamLeaksTest, givenDefaultDrmCsrWithAubDumWhenItIsCreatedThenGemCloseWorkerInactiveModeIsSelected) {
|
||||
std::unique_ptr<CommandStreamReceiver> ptr(DeviceCommandStreamReceiver<FamilyType>::create(true, *executionEnvironment, 0));
|
||||
std::unique_ptr<CommandStreamReceiver> ptr(DeviceCommandStreamReceiver<FamilyType>::create(true, *executionEnvironment, 0, 1));
|
||||
auto drmCsrWithAubDump = (CommandStreamReceiverWithAUBDump<DrmCommandStreamReceiver<FamilyType>> *)ptr.get();
|
||||
EXPECT_EQ(drmCsrWithAubDump->peekGemCloseWorkerOperationMode(), gemCloseWorkerMode::gemCloseWorkerActive);
|
||||
auto aubCSR = static_cast<CommandStreamReceiverWithAUBDump<DrmCommandStreamReceiver<FamilyType>> *>(ptr.get())->aubCSR.get();
|
||||
|
@ -56,7 +56,7 @@ HWTEST_F(DeviceCommandStreamLeaksTest, givenDefaultDrmCsrWithAubDumWhenItIsCreat
|
|||
}
|
||||
|
||||
HWTEST_F(DeviceCommandStreamLeaksTest, givenDefaultDrmCsrWhenOsInterfaceIsNullptrThenValidateDrm) {
|
||||
std::unique_ptr<CommandStreamReceiver> ptr(DeviceCommandStreamReceiver<FamilyType>::create(false, *executionEnvironment, 0));
|
||||
std::unique_ptr<CommandStreamReceiver> ptr(DeviceCommandStreamReceiver<FamilyType>::create(false, *executionEnvironment, 0, 1));
|
||||
auto drmCsr = (DrmCommandStreamReceiver<FamilyType> *)ptr.get();
|
||||
EXPECT_NE(nullptr, executionEnvironment->rootDeviceEnvironments[0]->osInterface);
|
||||
EXPECT_EQ(drmCsr->getOSInterface()->get()->getDrm(), executionEnvironment->rootDeviceEnvironments[0]->osInterface->get()->getDrm());
|
||||
|
@ -66,7 +66,7 @@ HWTEST_F(DeviceCommandStreamLeaksTest, givenDisabledGemCloseWorkerWhenCsrIsCreat
|
|||
DebugManagerStateRestore restorer;
|
||||
DebugManager.flags.EnableGemCloseWorker.set(0u);
|
||||
|
||||
std::unique_ptr<CommandStreamReceiver> ptr(DeviceCommandStreamReceiver<FamilyType>::create(false, *executionEnvironment, 0));
|
||||
std::unique_ptr<CommandStreamReceiver> ptr(DeviceCommandStreamReceiver<FamilyType>::create(false, *executionEnvironment, 0, 1));
|
||||
auto drmCsr = (DrmCommandStreamReceiver<FamilyType> *)ptr.get();
|
||||
|
||||
EXPECT_EQ(drmCsr->peekGemCloseWorkerOperationMode(), gemCloseWorkerMode::gemCloseWorkerInactive);
|
||||
|
@ -76,14 +76,14 @@ HWTEST_F(DeviceCommandStreamLeaksTest, givenEnabledGemCloseWorkerWhenCsrIsCreate
|
|||
DebugManagerStateRestore restorer;
|
||||
DebugManager.flags.EnableGemCloseWorker.set(1u);
|
||||
|
||||
std::unique_ptr<CommandStreamReceiver> ptr(DeviceCommandStreamReceiver<FamilyType>::create(false, *executionEnvironment, 0));
|
||||
std::unique_ptr<CommandStreamReceiver> ptr(DeviceCommandStreamReceiver<FamilyType>::create(false, *executionEnvironment, 0, 1));
|
||||
auto drmCsr = (DrmCommandStreamReceiver<FamilyType> *)ptr.get();
|
||||
|
||||
EXPECT_EQ(drmCsr->peekGemCloseWorkerOperationMode(), gemCloseWorkerMode::gemCloseWorkerActive);
|
||||
}
|
||||
|
||||
HWTEST_F(DeviceCommandStreamLeaksTest, givenDefaultGemCloseWorkerWhenCsrIsCreatedThenGemCloseWorkerActiveModeIsSelected) {
|
||||
std::unique_ptr<CommandStreamReceiver> ptr(DeviceCommandStreamReceiver<FamilyType>::create(false, *executionEnvironment, 0));
|
||||
std::unique_ptr<CommandStreamReceiver> ptr(DeviceCommandStreamReceiver<FamilyType>::create(false, *executionEnvironment, 0, 1));
|
||||
auto drmCsr = (DrmCommandStreamReceiver<FamilyType> *)ptr.get();
|
||||
|
||||
EXPECT_EQ(drmCsr->peekGemCloseWorkerOperationMode(), gemCloseWorkerMode::gemCloseWorkerActive);
|
||||
|
@ -92,7 +92,7 @@ HWTEST_F(DeviceCommandStreamLeaksTest, givenDefaultGemCloseWorkerWhenCsrIsCreate
|
|||
using DeviceCommandStreamSetInternalUsageTests = DeviceCommandStreamLeaksTest;
|
||||
|
||||
HWTEST_F(DeviceCommandStreamSetInternalUsageTests, givenValidDrmCsrThenGemCloseWorkerOperationModeIsSetToInactiveWhenInternalUsageIsSet) {
|
||||
std::unique_ptr<CommandStreamReceiver> ptr(DeviceCommandStreamReceiver<FamilyType>::create(false, *executionEnvironment, 0));
|
||||
std::unique_ptr<CommandStreamReceiver> ptr(DeviceCommandStreamReceiver<FamilyType>::create(false, *executionEnvironment, 0, 1));
|
||||
auto drmCsr = (DrmCommandStreamReceiver<FamilyType> *)ptr.get();
|
||||
EXPECT_EQ(drmCsr->peekGemCloseWorkerOperationMode(), gemCloseWorkerMode::gemCloseWorkerActive);
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ class DrmCommandStreamTest : public ::testing::Test {
|
|||
PreemptionHelper::getDefaultPreemptionMode(*hwInfo),
|
||||
false, false, false);
|
||||
|
||||
csr = new DrmCommandStreamReceiver<GfxFamily>(executionEnvironment, 0, gemCloseWorkerMode::gemCloseWorkerActive);
|
||||
csr = new DrmCommandStreamReceiver<GfxFamily>(executionEnvironment, 0, 1, gemCloseWorkerMode::gemCloseWorkerActive);
|
||||
ASSERT_NE(nullptr, csr);
|
||||
csr->setupContext(*osContext);
|
||||
|
||||
|
@ -108,7 +108,7 @@ class DrmCommandStreamEnhancedTemplate : public ::testing::Test {
|
|||
executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->osInterface->get()->setDrm(mock);
|
||||
executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->memoryOperationsInterface = DrmMemoryOperationsHandler::create(*mock, rootDeviceIndex);
|
||||
|
||||
csr = new TestedDrmCommandStreamReceiver<GfxFamily>(*executionEnvironment, rootDeviceIndex);
|
||||
csr = new TestedDrmCommandStreamReceiver<GfxFamily>(*executionEnvironment, rootDeviceIndex, 1);
|
||||
ASSERT_NE(nullptr, csr);
|
||||
mm = new DrmMemoryManager(gemCloseWorkerMode::gemCloseWorkerInactive,
|
||||
DebugManager.flags.EnableForcePin.get(),
|
||||
|
|
|
@ -34,7 +34,7 @@ HWTEST_F(DrmCommandStreamMMTest, MMwithPinBB) {
|
|||
executionEnvironment.rootDeviceEnvironments[0]->osInterface->get()->setDrm(drm);
|
||||
executionEnvironment.rootDeviceEnvironments[0]->memoryOperationsInterface = DrmMemoryOperationsHandler::create(*drm, 0u);
|
||||
|
||||
DrmCommandStreamReceiver<FamilyType> csr(executionEnvironment, 0, gemCloseWorkerMode::gemCloseWorkerInactive);
|
||||
DrmCommandStreamReceiver<FamilyType> csr(executionEnvironment, 0, 1, gemCloseWorkerMode::gemCloseWorkerInactive);
|
||||
|
||||
auto memoryManager = new TestedDrmMemoryManager(false, true, false, executionEnvironment);
|
||||
executionEnvironment.memoryManager.reset(memoryManager);
|
||||
|
@ -53,7 +53,7 @@ HWTEST_F(DrmCommandStreamMMTest, givenForcePinDisabledWhenMemoryManagerIsCreated
|
|||
executionEnvironment.rootDeviceEnvironments[0]->osInterface = std::make_unique<OSInterface>();
|
||||
executionEnvironment.rootDeviceEnvironments[0]->osInterface->get()->setDrm(drm);
|
||||
|
||||
DrmCommandStreamReceiver<FamilyType> csr(executionEnvironment, 0, gemCloseWorkerMode::gemCloseWorkerInactive);
|
||||
DrmCommandStreamReceiver<FamilyType> csr(executionEnvironment, 0, 1, gemCloseWorkerMode::gemCloseWorkerInactive);
|
||||
auto memoryManager = new TestedDrmMemoryManager(false, true, false, executionEnvironment);
|
||||
|
||||
executionEnvironment.memoryManager.reset(memoryManager);
|
||||
|
|
|
@ -649,7 +649,8 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest, givenCommandStreamWithDuplicate
|
|||
|
||||
HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest, givenDrmCsrCreatedWithInactiveGemCloseWorkerPolicyThenThreadIsNotCreated) {
|
||||
TestedDrmCommandStreamReceiver<FamilyType> testedCsr(gemCloseWorkerMode::gemCloseWorkerInactive,
|
||||
*this->executionEnvironment);
|
||||
*this->executionEnvironment,
|
||||
1);
|
||||
EXPECT_EQ(gemCloseWorkerMode::gemCloseWorkerInactive, testedCsr.peekGemCloseWorkerOperationMode());
|
||||
}
|
||||
|
||||
|
@ -1578,7 +1579,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamTest, givenDrmCommandStreamReceiverWhenCreate
|
|||
executionEnvironment.rootDeviceEnvironments[1]->initGmm();
|
||||
executionEnvironment.rootDeviceEnvironments[1]->osInterface = std::make_unique<OSInterface>();
|
||||
executionEnvironment.rootDeviceEnvironments[1]->osInterface->get()->setDrm(new DrmMockCustom());
|
||||
auto csr = std::make_unique<MockDrmCsr<FamilyType>>(executionEnvironment, 1, gemCloseWorkerMode::gemCloseWorkerActive);
|
||||
auto csr = std::make_unique<MockDrmCsr<FamilyType>>(executionEnvironment, 1, 1, gemCloseWorkerMode::gemCloseWorkerActive);
|
||||
auto pageTableManager = csr->createPageTableManager();
|
||||
EXPECT_EQ(executionEnvironment.rootDeviceEnvironments[1]->pageTableManager.get(), pageTableManager);
|
||||
}
|
||||
|
@ -1589,11 +1590,11 @@ HWTEST_TEMPLATED_F(DrmCommandStreamTest, givenLocalMemoryEnabledWhenCreatingDrmC
|
|||
DebugManagerStateRestore restore;
|
||||
DebugManager.flags.EnableLocalMemory.set(1);
|
||||
|
||||
MockDrmCsr<FamilyType> csr1(executionEnvironment, 0, gemCloseWorkerMode::gemCloseWorkerInactive);
|
||||
MockDrmCsr<FamilyType> csr1(executionEnvironment, 0, 1, gemCloseWorkerMode::gemCloseWorkerInactive);
|
||||
EXPECT_EQ(DispatchMode::BatchedDispatch, csr1.dispatchMode);
|
||||
|
||||
DebugManager.flags.CsrDispatchMode.set(static_cast<int32_t>(DispatchMode::ImmediateDispatch));
|
||||
MockDrmCsr<FamilyType> csr2(executionEnvironment, 0, gemCloseWorkerMode::gemCloseWorkerInactive);
|
||||
MockDrmCsr<FamilyType> csr2(executionEnvironment, 0, 1, gemCloseWorkerMode::gemCloseWorkerInactive);
|
||||
EXPECT_EQ(DispatchMode::ImmediateDispatch, csr2.dispatchMode);
|
||||
}
|
||||
|
||||
|
@ -1601,11 +1602,11 @@ HWTEST_TEMPLATED_F(DrmCommandStreamTest, givenLocalMemoryEnabledWhenCreatingDrmC
|
|||
DebugManagerStateRestore restore;
|
||||
DebugManager.flags.EnableLocalMemory.set(0);
|
||||
|
||||
MockDrmCsr<FamilyType> csr1(executionEnvironment, 0, gemCloseWorkerMode::gemCloseWorkerInactive);
|
||||
MockDrmCsr<FamilyType> csr1(executionEnvironment, 0, 1, gemCloseWorkerMode::gemCloseWorkerInactive);
|
||||
EXPECT_EQ(DispatchMode::ImmediateDispatch, csr1.dispatchMode);
|
||||
|
||||
DebugManager.flags.CsrDispatchMode.set(static_cast<int32_t>(DispatchMode::BatchedDispatch));
|
||||
MockDrmCsr<FamilyType> csr2(executionEnvironment, 0, gemCloseWorkerMode::gemCloseWorkerInactive);
|
||||
MockDrmCsr<FamilyType> csr2(executionEnvironment, 0, 1, gemCloseWorkerMode::gemCloseWorkerInactive);
|
||||
EXPECT_EQ(DispatchMode::BatchedDispatch, csr2.dispatchMode);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -127,7 +127,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest, givenMakeAllBuffersResidentSetW
|
|||
CommandStreamReceiverHw<FamilyType>::alignToCacheLine(cs);
|
||||
BatchBuffer batchBuffer{cs.getGraphicsAllocation(), 0, 0, nullptr, false, false, QueueThrottle::MEDIUM, QueueSliceCount::defaultSliceCount, cs.getUsed(), &cs, nullptr};
|
||||
|
||||
MockDrmCsr mockCsr(*executionEnvironment, rootDeviceIndex, gemCloseWorkerMode::gemCloseWorkerInactive);
|
||||
MockDrmCsr mockCsr(*executionEnvironment, rootDeviceIndex, 1, gemCloseWorkerMode::gemCloseWorkerInactive);
|
||||
mockCsr.flush(batchBuffer, mockCsr.getResidencyAllocations());
|
||||
|
||||
mm->freeGraphicsMemory(commandBuffer);
|
||||
|
|
|
@ -115,7 +115,7 @@ HWTEST_F(clCreateCommandQueueWithPropertiesLinux, givenPropertiesWithClQueueSlic
|
|||
|
||||
cl_queue_properties properties[] = {CL_QUEUE_SLICE_COUNT_INTEL, newSliceCount, 0};
|
||||
|
||||
auto mockCsr = new TestedDrmCommandStreamReceiver<FamilyType>(*mdevice->executionEnvironment, rootDeviceIndex);
|
||||
auto mockCsr = new TestedDrmCommandStreamReceiver<FamilyType>(*mdevice->executionEnvironment, rootDeviceIndex, 1);
|
||||
mdevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
cl_command_queue cmdQ = clCreateCommandQueueWithProperties(context.get(), clDevice, properties, &retVal);
|
||||
|
@ -160,7 +160,7 @@ HWTEST_F(clCreateCommandQueueWithPropertiesLinux, givenSameSliceCountAsRecentlyS
|
|||
|
||||
cl_queue_properties properties[] = {CL_QUEUE_SLICE_COUNT_INTEL, newSliceCount, 0};
|
||||
|
||||
auto mockCsr = new TestedDrmCommandStreamReceiver<FamilyType>(*mdevice->executionEnvironment, rootDeviceIndex);
|
||||
auto mockCsr = new TestedDrmCommandStreamReceiver<FamilyType>(*mdevice->executionEnvironment, rootDeviceIndex, 1);
|
||||
mdevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
cl_command_queue cmdQ = clCreateCommandQueueWithProperties(context.get(), clDevice, properties, &retVal);
|
||||
|
@ -204,7 +204,7 @@ HWTEST_F(clCreateCommandQueueWithPropertiesLinux, givenPropertiesWithClQueueSlic
|
|||
|
||||
cl_queue_properties properties[] = {CL_QUEUE_SLICE_COUNT_INTEL, newSliceCount, 0};
|
||||
|
||||
auto mockCsr = new TestedDrmCommandStreamReceiver<FamilyType>(*mdevice->executionEnvironment, rootDeviceIndex);
|
||||
auto mockCsr = new TestedDrmCommandStreamReceiver<FamilyType>(*mdevice->executionEnvironment, rootDeviceIndex, 1);
|
||||
mdevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
cl_command_queue cmdQ = clCreateCommandQueueWithProperties(context.get(), clDevice, properties, &retVal);
|
||||
|
|
|
@ -77,7 +77,7 @@ class WddmCommandStreamFixture {
|
|||
0, device->getDeviceBitfield(), aub_stream::ENGINE_RCS, PreemptionMode::ThreadGroup,
|
||||
false, false, false));
|
||||
osContext->setDefaultContext(true);
|
||||
csr = new WddmCommandStreamReceiver<DEFAULT_TEST_FAMILY_NAME>(*executionEnvironment, 0);
|
||||
csr = new WddmCommandStreamReceiver<DEFAULT_TEST_FAMILY_NAME>(*executionEnvironment, 0, device->getDeviceBitfield());
|
||||
|
||||
device->resetCommandStreamReceiver(csr);
|
||||
ASSERT_NE(nullptr, device);
|
||||
|
@ -162,7 +162,7 @@ class WddmCommandStreamWithMockGdiFixture {
|
|||
wddm->resetGdi(gdi);
|
||||
ASSERT_NE(wddm, nullptr);
|
||||
DebugManager.flags.CsrDispatchMode.set(static_cast<uint32_t>(DispatchMode::ImmediateDispatch));
|
||||
this->csr = new MockWddmCsr<DEFAULT_TEST_FAMILY_NAME>(*executionEnvironment, 0);
|
||||
this->csr = new MockWddmCsr<DEFAULT_TEST_FAMILY_NAME>(*executionEnvironment, 0, 1);
|
||||
memoryManager = new WddmMemoryManager(*executionEnvironment);
|
||||
ASSERT_NE(nullptr, memoryManager);
|
||||
executionEnvironment->memoryManager.reset(memoryManager);
|
||||
|
@ -188,7 +188,7 @@ TEST_F(DeviceCommandStreamTest, WhenCreatingWddmCsrThenWddmPointerIsSetCorrectly
|
|||
executionEnvironment->rootDeviceEnvironments[0]->osInterface = std::make_unique<OSInterface>();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface->get()->setWddm(static_cast<WddmMock *>(wddm));
|
||||
executionEnvironment->initializeMemoryManager();
|
||||
std::unique_ptr<WddmCommandStreamReceiver<DEFAULT_TEST_FAMILY_NAME>> csr(static_cast<WddmCommandStreamReceiver<DEFAULT_TEST_FAMILY_NAME> *>(WddmCommandStreamReceiver<DEFAULT_TEST_FAMILY_NAME>::create(false, *executionEnvironment, 0)));
|
||||
std::unique_ptr<WddmCommandStreamReceiver<DEFAULT_TEST_FAMILY_NAME>> csr(static_cast<WddmCommandStreamReceiver<DEFAULT_TEST_FAMILY_NAME> *>(WddmCommandStreamReceiver<DEFAULT_TEST_FAMILY_NAME>::create(false, *executionEnvironment, 0, 1)));
|
||||
EXPECT_NE(nullptr, csr);
|
||||
auto wddmFromCsr = csr->peekWddm();
|
||||
EXPECT_NE(nullptr, wddmFromCsr);
|
||||
|
@ -200,7 +200,7 @@ TEST_F(DeviceCommandStreamTest, WhenCreatingWddmCsrWithAubDumpThenAubCsrIsCreate
|
|||
executionEnvironment->rootDeviceEnvironments[0]->osInterface = std::make_unique<OSInterface>();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface->get()->setWddm(static_cast<WddmMock *>(wddm));
|
||||
executionEnvironment->initializeMemoryManager();
|
||||
std::unique_ptr<WddmCommandStreamReceiver<DEFAULT_TEST_FAMILY_NAME>> csr(static_cast<WddmCommandStreamReceiver<DEFAULT_TEST_FAMILY_NAME> *>(WddmCommandStreamReceiver<DEFAULT_TEST_FAMILY_NAME>::create(true, *executionEnvironment, 0)));
|
||||
std::unique_ptr<WddmCommandStreamReceiver<DEFAULT_TEST_FAMILY_NAME>> csr(static_cast<WddmCommandStreamReceiver<DEFAULT_TEST_FAMILY_NAME> *>(WddmCommandStreamReceiver<DEFAULT_TEST_FAMILY_NAME>::create(true, *executionEnvironment, 0, 1)));
|
||||
EXPECT_NE(nullptr, csr);
|
||||
auto wddmFromCsr = csr->peekWddm();
|
||||
EXPECT_NE(nullptr, wddmFromCsr);
|
||||
|
@ -298,7 +298,7 @@ TEST(WddmPreemptionHeaderTests, givenWddmCommandStreamReceiverWhenPreemptionIsOf
|
|||
hwInfo->capabilityTable.defaultPreemptionMode = PreemptionMode::Disabled;
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(hwInfo);
|
||||
auto wddm = static_cast<WddmMock *>(executionEnvironment->rootDeviceEnvironments[0]->osInterface->get()->getWddm());
|
||||
auto csr = std::make_unique<MockWddmCsr<DEFAULT_TEST_FAMILY_NAME>>(*executionEnvironment, 0);
|
||||
auto csr = std::make_unique<MockWddmCsr<DEFAULT_TEST_FAMILY_NAME>>(*executionEnvironment, 0, 1);
|
||||
executionEnvironment->memoryManager.reset(new MemoryManagerCreate<WddmMemoryManager>(false, false, *executionEnvironment));
|
||||
csr->overrideDispatchPolicy(DispatchMode::ImmediateDispatch);
|
||||
OsContextWin osContext(*wddm, 0u, 1, HwHelper::get(hwInfo->platform.eRenderCoreFamily).getGpgpuEngineInstances(*hwInfo)[0].first,
|
||||
|
@ -324,7 +324,7 @@ TEST(WddmPreemptionHeaderTests, givenWddmCommandStreamReceiverWhenPreemptionIsOn
|
|||
hwInfo->capabilityTable.defaultPreemptionMode = PreemptionMode::MidThread;
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(hwInfo);
|
||||
auto wddm = static_cast<WddmMock *>(executionEnvironment->rootDeviceEnvironments[0]->osInterface->get()->getWddm());
|
||||
auto csr = std::make_unique<MockWddmCsr<DEFAULT_TEST_FAMILY_NAME>>(*executionEnvironment, 0);
|
||||
auto csr = std::make_unique<MockWddmCsr<DEFAULT_TEST_FAMILY_NAME>>(*executionEnvironment, 0, 1);
|
||||
executionEnvironment->memoryManager.reset(new MemoryManagerCreate<WddmMemoryManager>(false, false, *executionEnvironment));
|
||||
csr->overrideDispatchPolicy(DispatchMode::ImmediateDispatch);
|
||||
OsContextWin osContext(*wddm, 0u, 1, HwHelper::get(hwInfo->platform.eRenderCoreFamily).getGpgpuEngineInstances(*hwInfo)[0].first,
|
||||
|
@ -350,7 +350,7 @@ TEST(WddmPreemptionHeaderTests, givenDeviceSupportingPreemptionWhenCommandStream
|
|||
ExecutionEnvironment *executionEnvironment = getExecutionEnvironmentImpl(hwInfo, 1);
|
||||
hwInfo->capabilityTable.defaultPreemptionMode = PreemptionMode::MidThread;
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(hwInfo);
|
||||
auto commandStreamReceiver = std::make_unique<MockWddmCsr<DEFAULT_TEST_FAMILY_NAME>>(*executionEnvironment, 0);
|
||||
auto commandStreamReceiver = std::make_unique<MockWddmCsr<DEFAULT_TEST_FAMILY_NAME>>(*executionEnvironment, 0, 1);
|
||||
auto commandHeader = commandStreamReceiver->commandBufferHeader;
|
||||
auto header = reinterpret_cast<COMMAND_BUFFER_HEADER *>(commandHeader);
|
||||
EXPECT_TRUE(header->NeedsMidBatchPreEmptionSupport);
|
||||
|
@ -361,7 +361,7 @@ TEST(WddmPreemptionHeaderTests, givenDevicenotSupportingPreemptionWhenCommandStr
|
|||
ExecutionEnvironment *executionEnvironment = getExecutionEnvironmentImpl(hwInfo, 1);
|
||||
hwInfo->capabilityTable.defaultPreemptionMode = PreemptionMode::Disabled;
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(hwInfo);
|
||||
auto commandStreamReceiver = std::make_unique<MockWddmCsr<DEFAULT_TEST_FAMILY_NAME>>(*executionEnvironment, 0);
|
||||
auto commandStreamReceiver = std::make_unique<MockWddmCsr<DEFAULT_TEST_FAMILY_NAME>>(*executionEnvironment, 0, 1);
|
||||
auto commandHeader = commandStreamReceiver->commandBufferHeader;
|
||||
auto header = reinterpret_cast<COMMAND_BUFFER_HEADER *>(commandHeader);
|
||||
EXPECT_FALSE(header->NeedsMidBatchPreEmptionSupport);
|
||||
|
@ -906,7 +906,7 @@ HWTEST_F(WddmSimpleTest, givenDefaultWddmCsrWhenItIsCreatedThenBatchingIsTurnedO
|
|||
executionEnvironment->rootDeviceEnvironments[0]->osInterface = std::make_unique<OSInterface>();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface->get()->setWddm(wddm);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->memoryOperationsInterface = std::make_unique<WddmMemoryOperationsHandler>(wddm);
|
||||
std::unique_ptr<MockWddmCsr<FamilyType>> mockCsr(new MockWddmCsr<FamilyType>(*executionEnvironment, 0));
|
||||
std::unique_ptr<MockWddmCsr<FamilyType>> mockCsr(new MockWddmCsr<FamilyType>(*executionEnvironment, 0, 1));
|
||||
EXPECT_EQ(DispatchMode::BatchedDispatch, mockCsr->dispatchMode);
|
||||
}
|
||||
|
||||
|
@ -915,7 +915,7 @@ HWTEST_F(WddmDefaultTest, givenFtrWddmHwQueuesFlagWhenCreatingCsrThenPickWddmVer
|
|||
pDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface = std::make_unique<OSInterface>();
|
||||
pDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface->get()->setWddm(wddm);
|
||||
pDevice->executionEnvironment->rootDeviceEnvironments[0]->memoryOperationsInterface = std::make_unique<WddmMemoryOperationsHandler>(wddm);
|
||||
WddmCommandStreamReceiver<FamilyType> wddmCsr(*pDevice->executionEnvironment, 0);
|
||||
WddmCommandStreamReceiver<FamilyType> wddmCsr(*pDevice->executionEnvironment, 0, 1);
|
||||
|
||||
auto wddmFromCsr = wddmCsr.peekWddm();
|
||||
EXPECT_EQ(typeid(*wddmFromCsr), typeid(WddmMock));
|
||||
|
@ -949,7 +949,7 @@ HWTEST_P(WddmCsrCompressionParameterizedTest, givenEnabledCompressionWhenInitial
|
|||
myMockWddm = static_cast<WddmMock *>(executionEnvironment->rootDeviceEnvironments[0]->osInterface->get()->getWddm());
|
||||
EXPECT_EQ(nullptr, executionEnvironment->rootDeviceEnvironments[index]->pageTableManager.get());
|
||||
|
||||
MockWddmCsr<FamilyType> mockWddmCsr(*executionEnvironment, index);
|
||||
MockWddmCsr<FamilyType> mockWddmCsr(*executionEnvironment, index, 1);
|
||||
mockWddmCsr.createPageTableManager();
|
||||
ASSERT_NE(nullptr, executionEnvironment->rootDeviceEnvironments[index]->pageTableManager.get());
|
||||
|
||||
|
@ -971,7 +971,7 @@ HWTEST_F(WddmCsrCompressionTests, givenDisabledCompressionWhenInitializedThenDon
|
|||
std::unique_ptr<MockDevice> device(Device::create<MockDevice>(executionEnvironment, 1u));
|
||||
setCompressionEnabled(false, false);
|
||||
myMockWddm = static_cast<WddmMock *>(executionEnvironment->rootDeviceEnvironments[0]->osInterface->get()->getWddm());
|
||||
MockWddmCsr<FamilyType> mockWddmCsr(*executionEnvironment, 1);
|
||||
MockWddmCsr<FamilyType> mockWddmCsr(*executionEnvironment, 1, device->getDeviceBitfield());
|
||||
EXPECT_EQ(nullptr, executionEnvironment->rootDeviceEnvironments[1]->pageTableManager.get());
|
||||
}
|
||||
|
||||
|
@ -985,11 +985,12 @@ HWTEST_F(WddmCsrCompressionTests, givenDisabledCompressionWhenFlushingThenDontIn
|
|||
setCompressionEnabled(false, false);
|
||||
myMockWddm = static_cast<WddmMock *>(executionEnvironment->rootDeviceEnvironments[0]->osInterface->get()->getWddm());
|
||||
|
||||
auto mockWddmCsr = new MockWddmCsr<FamilyType>(*executionEnvironment, 1);
|
||||
mockWddmCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
executionEnvironment->memoryManager.reset(new WddmMemoryManager(*executionEnvironment));
|
||||
|
||||
std::unique_ptr<MockDevice> device(Device::create<MockDevice>(executionEnvironment, 1u));
|
||||
|
||||
auto mockWddmCsr = new MockWddmCsr<FamilyType>(*executionEnvironment, 1, device->getDeviceBitfield());
|
||||
mockWddmCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
device->resetCommandStreamReceiver(mockWddmCsr);
|
||||
|
||||
auto memoryManager = executionEnvironment->memoryManager.get();
|
||||
|
|
|
@ -34,7 +34,10 @@ extern const wchar_t *currentLibraryPath;
|
|||
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[IGFX_MAX_CORE];
|
||||
|
||||
CommandStreamReceiver *createMockCommandStreamReceiver(bool withAubDump, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
CommandStreamReceiver *createMockCommandStreamReceiver(bool withAubDump,
|
||||
ExecutionEnvironment &executionEnvironment,
|
||||
uint32_t rootDeviceIndex,
|
||||
DeviceBitfield deviceBitfield);
|
||||
|
||||
class DriverInfoDeviceTest : public ::testing::Test {
|
||||
public:
|
||||
|
@ -52,8 +55,8 @@ class DriverInfoDeviceTest : public ::testing::Test {
|
|||
const HardwareInfo *hwInfo;
|
||||
};
|
||||
|
||||
CommandStreamReceiver *createMockCommandStreamReceiver(bool withAubDump, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) {
|
||||
auto csr = new MockCommandStreamReceiver(executionEnvironment, rootDeviceIndex);
|
||||
CommandStreamReceiver *createMockCommandStreamReceiver(bool withAubDump, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield) {
|
||||
auto csr = new MockCommandStreamReceiver(executionEnvironment, rootDeviceIndex, deviceBitfield);
|
||||
if (!executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->osInterface) {
|
||||
auto wddm = new WddmMock(*executionEnvironment.rootDeviceEnvironments[0]);
|
||||
wddm->init();
|
||||
|
|
|
@ -375,7 +375,8 @@ TEST_F(WddmMemoryManagerSimpleTest, givenNonZeroFenceValuesOnMultipleEnginesRegi
|
|||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfo(defaultHwInfo.get());
|
||||
}
|
||||
const uint32_t rootDeviceIndex = 1;
|
||||
std::unique_ptr<CommandStreamReceiver> csr(createCommandStream(*executionEnvironment, rootDeviceIndex));
|
||||
DeviceBitfield deviceBitfield(2);
|
||||
std::unique_ptr<CommandStreamReceiver> csr(createCommandStream(*executionEnvironment, rootDeviceIndex, deviceBitfield));
|
||||
|
||||
auto wddm2 = static_cast<WddmMock *>(Wddm::createWddm(nullptr, *executionEnvironment->rootDeviceEnvironments[rootDeviceIndex].get()));
|
||||
wddm2->init();
|
||||
|
@ -383,7 +384,8 @@ TEST_F(WddmMemoryManagerSimpleTest, givenNonZeroFenceValuesOnMultipleEnginesRegi
|
|||
|
||||
auto hwInfo = executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->getHardwareInfo();
|
||||
memoryManager->createAndRegisterOsContext(csr.get(), HwHelper::get(hwInfo->platform.eRenderCoreFamily).getGpgpuEngineInstances(*hwInfo)[1].first,
|
||||
2, PreemptionHelper::getDefaultPreemptionMode(*hwInfo), false, false, false);
|
||||
deviceBitfield, PreemptionHelper::getDefaultPreemptionMode(*hwInfo),
|
||||
false, false, false);
|
||||
ASSERT_EQ(2u, memoryManager->getRegisteredEnginesCount());
|
||||
|
||||
auto allocation = static_cast<WddmAllocation *>(memoryManager->allocateGraphicsMemoryWithProperties({0u, 32, GraphicsAllocation::AllocationType::BUFFER, mockDeviceBitfield}));
|
||||
|
@ -407,7 +409,8 @@ TEST_F(WddmMemoryManagerSimpleTest, givenNonZeroFenceValueOnSomeOfMultipleEngine
|
|||
for (auto i = 0u; i < executionEnvironment->rootDeviceEnvironments.size(); i++) {
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfo(defaultHwInfo.get());
|
||||
}
|
||||
std::unique_ptr<CommandStreamReceiver> csr(createCommandStream(*executionEnvironment, rootDeviceIndex));
|
||||
DeviceBitfield deviceBitfield(2);
|
||||
std::unique_ptr<CommandStreamReceiver> csr(createCommandStream(*executionEnvironment, rootDeviceIndex, deviceBitfield));
|
||||
|
||||
auto wddm2 = static_cast<WddmMock *>(Wddm::createWddm(nullptr, *executionEnvironment->rootDeviceEnvironments[rootDeviceIndex].get()));
|
||||
wddm2->init();
|
||||
|
@ -415,7 +418,8 @@ TEST_F(WddmMemoryManagerSimpleTest, givenNonZeroFenceValueOnSomeOfMultipleEngine
|
|||
|
||||
auto hwInfo = executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->getHardwareInfo();
|
||||
memoryManager->createAndRegisterOsContext(csr.get(), HwHelper::get(hwInfo->platform.eRenderCoreFamily).getGpgpuEngineInstances(*hwInfo)[1].first,
|
||||
2, PreemptionHelper::getDefaultPreemptionMode(*hwInfo), false, false, false);
|
||||
deviceBitfield, PreemptionHelper::getDefaultPreemptionMode(*hwInfo),
|
||||
false, false, false);
|
||||
ASSERT_EQ(2u, memoryManager->getRegisteredEnginesCount());
|
||||
|
||||
auto allocation = static_cast<WddmAllocation *>(memoryManager->allocateGraphicsMemoryWithProperties({0u, 32, GraphicsAllocation::AllocationType::BUFFER, mockDeviceBitfield}));
|
||||
|
@ -1603,9 +1607,9 @@ TEST_F(WddmMemoryManagerTest, givenWddmMemoryManagerWithRegisteredOsContextWhenC
|
|||
wddm->init();
|
||||
executionEnvironment->rootDeviceEnvironments[i]->memoryOperationsInterface = std::make_unique<WddmMemoryOperationsHandler>(wddm);
|
||||
}
|
||||
std::unique_ptr<CommandStreamReceiver> csr(createCommandStream(*executionEnvironment, 0u));
|
||||
std::unique_ptr<CommandStreamReceiver> csr1(createCommandStream(*executionEnvironment, 1u));
|
||||
std::unique_ptr<CommandStreamReceiver> csr2(createCommandStream(*executionEnvironment, 2u));
|
||||
std::unique_ptr<CommandStreamReceiver> csr(createCommandStream(*executionEnvironment, 0u, 1));
|
||||
std::unique_ptr<CommandStreamReceiver> csr1(createCommandStream(*executionEnvironment, 1u, 2));
|
||||
std::unique_ptr<CommandStreamReceiver> csr2(createCommandStream(*executionEnvironment, 2u, 3));
|
||||
memoryManager->createAndRegisterOsContext(csr.get(), aub_stream::ENGINE_RCS, 1,
|
||||
PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo), false, false, false);
|
||||
memoryManager->createAndRegisterOsContext(csr1.get(), aub_stream::ENGINE_RCS, 2,
|
||||
|
@ -1627,9 +1631,9 @@ TEST_F(WddmMemoryManagerTest, givenWddmMemoryManagerWithRegisteredOsContextWithE
|
|||
wddm->init();
|
||||
executionEnvironment->rootDeviceEnvironments[i]->memoryOperationsInterface = std::make_unique<WddmMemoryOperationsHandler>(wddm);
|
||||
}
|
||||
std::unique_ptr<CommandStreamReceiver> csr(createCommandStream(*executionEnvironment, 0u));
|
||||
std::unique_ptr<CommandStreamReceiver> csr1(createCommandStream(*executionEnvironment, 1u));
|
||||
std::unique_ptr<CommandStreamReceiver> csr2(createCommandStream(*executionEnvironment, 2u));
|
||||
std::unique_ptr<CommandStreamReceiver> csr(createCommandStream(*executionEnvironment, 0u, 1));
|
||||
std::unique_ptr<CommandStreamReceiver> csr1(createCommandStream(*executionEnvironment, 1u, 2));
|
||||
std::unique_ptr<CommandStreamReceiver> csr2(createCommandStream(*executionEnvironment, 2u, 3));
|
||||
memoryManager->createAndRegisterOsContext(csr.get(), aub_stream::ENGINE_RCS, 1,
|
||||
PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo), false, false, false);
|
||||
memoryManager->createAndRegisterOsContext(csr1.get(), aub_stream::ENGINE_RCS, 2,
|
||||
|
@ -1874,7 +1878,7 @@ TEST_F(WddmMemoryManagerTest2, givenReadOnlyMemoryPassedToPopulateOsHandlesWhenC
|
|||
|
||||
TEST(WddmMemoryManagerCleanupTest, givenUsedTagAllocationInWddmMemoryManagerWhenCleanupMemoryManagerThenDontAccessCsr) {
|
||||
ExecutionEnvironment &executionEnvironment = *platform()->peekExecutionEnvironment();
|
||||
auto csr = std::unique_ptr<CommandStreamReceiver>(createCommandStream(executionEnvironment, 0));
|
||||
auto csr = std::unique_ptr<CommandStreamReceiver>(createCommandStream(executionEnvironment, 0, 1));
|
||||
auto wddm = new WddmMock(*executionEnvironment.rootDeviceEnvironments[0].get());
|
||||
auto preemptionMode = PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo);
|
||||
wddm->init();
|
||||
|
|
|
@ -65,7 +65,7 @@ class MockWddmMemoryManagerFixture {
|
|||
executionEnvironment->initializeMemoryManager();
|
||||
|
||||
memoryManager = std::make_unique<MockWddmMemoryManager>(*executionEnvironment);
|
||||
csr.reset(createCommandStream(*executionEnvironment, 0u));
|
||||
csr.reset(createCommandStream(*executionEnvironment, 0u, 1));
|
||||
auto hwInfo = rootDeviceEnvironment->getHardwareInfo();
|
||||
osContext = memoryManager->createAndRegisterOsContext(csr.get(),
|
||||
HwHelper::get(hwInfo->platform.eRenderCoreFamily).getGpgpuEngineInstances(*hwInfo)[0].first,
|
||||
|
@ -117,7 +117,7 @@ class WddmMemoryManagerFixtureWithGmockWddm : public ExecutionEnvironmentFixture
|
|||
executionEnvironment->memoryManager.reset(memoryManager);
|
||||
//assert we have memory manager
|
||||
ASSERT_NE(nullptr, memoryManager);
|
||||
csr.reset(createCommandStream(*executionEnvironment, 0u));
|
||||
csr.reset(createCommandStream(*executionEnvironment, 0u, 1));
|
||||
auto hwInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo();
|
||||
osContext = memoryManager->createAndRegisterOsContext(csr.get(),
|
||||
HwHelper::get(hwInfo->platform.eRenderCoreFamily).getGpgpuEngineInstances(*hwInfo)[0].first,
|
||||
|
|
|
@ -76,7 +76,7 @@ struct WddmResidencyControllerTest : ::testing::Test {
|
|||
rootDeviceEnvironment = std::make_unique<RootDeviceEnvironment>(*executionEnvironment);
|
||||
wddm = static_cast<WddmMock *>(Wddm::createWddm(nullptr, *rootDeviceEnvironment));
|
||||
wddm->init();
|
||||
mockOsContextWin = std::make_unique<MockOsContextWin>(*wddm, osContextId, 0, aub_stream::ENGINE_RCS,
|
||||
mockOsContextWin = std::make_unique<MockOsContextWin>(*wddm, osContextId, 1, aub_stream::ENGINE_RCS,
|
||||
PreemptionMode::Disabled, false, false, false);
|
||||
wddm->getWddmInterface()->createMonitoredFence(*mockOsContextWin);
|
||||
residencyController = &mockOsContextWin->mockResidencyController;
|
||||
|
@ -129,7 +129,7 @@ struct WddmResidencyControllerWithMockWddmTest : public WddmResidencyControllerT
|
|||
|
||||
memoryManager = std::make_unique<MockWddmMemoryManager>(*executionEnvironment);
|
||||
|
||||
csr.reset(createCommandStream(*executionEnvironment, 0u));
|
||||
csr.reset(createCommandStream(*executionEnvironment, 0u, 1));
|
||||
auto hwInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo();
|
||||
osContext = memoryManager->createAndRegisterOsContext(csr.get(),
|
||||
HwHelper::get(hwInfo->platform.eRenderCoreFamily).getGpgpuEngineInstances(*hwInfo)[0].first, 1, preemptionMode,
|
||||
|
@ -165,7 +165,7 @@ struct WddmResidencyControllerWithGdiAndMemoryManagerTest : ::testing::Test {
|
|||
executionEnvironment->initializeMemoryManager();
|
||||
|
||||
memoryManager = std::make_unique<MockWddmMemoryManager>(*executionEnvironment);
|
||||
csr.reset(createCommandStream(*executionEnvironment, 0u));
|
||||
csr.reset(createCommandStream(*executionEnvironment, 0u, 1));
|
||||
auto hwInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo();
|
||||
osContext = memoryManager->createAndRegisterOsContext(csr.get(),
|
||||
HwHelper::get(hwInfo->platform.eRenderCoreFamily).getGpgpuEngineInstances(*hwInfo)[0].first,
|
||||
|
|
|
@ -257,7 +257,7 @@ namespace NEO {
|
|||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[IGFX_MAX_CORE];
|
||||
}
|
||||
|
||||
CommandStreamReceiver *createMockCommandStreamReceiver(bool withAubDump, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) {
|
||||
CommandStreamReceiver *createMockCommandStreamReceiver(bool withAubDump, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield) {
|
||||
return nullptr;
|
||||
};
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue