mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 01:04:57 +08:00
[2/N] Make the execution environment adapter agnostic
-add rootDeviceId to the command stream receiver Related-To: NEO-3857 Change-Id: I6c7f334ebe3d19cf0c58a4db65d013b7a8b7f982 Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
60237e1f80
commit
e784ba39fb
@@ -43,7 +43,7 @@ std::string AUBCommandStreamReceiver::createFullFilePath(const HardwareInfo &hwI
|
||||
return filePath;
|
||||
}
|
||||
|
||||
CommandStreamReceiver *AUBCommandStreamReceiver::create(const std::string &baseName, bool standalone, ExecutionEnvironment &executionEnvironment) {
|
||||
CommandStreamReceiver *AUBCommandStreamReceiver::create(const std::string &baseName, bool standalone, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) {
|
||||
auto hwInfo = executionEnvironment.getHardwareInfo();
|
||||
std::string filePath = AUBCommandStreamReceiver::createFullFilePath(*hwInfo, baseName);
|
||||
if (DebugManager.flags.AUBDumpCaptureFileName.get() != "unk") {
|
||||
@@ -56,7 +56,7 @@ CommandStreamReceiver *AUBCommandStreamReceiver::create(const std::string &baseN
|
||||
}
|
||||
|
||||
auto pCreate = aubCommandStreamReceiverFactory[hwInfo->platform.eRenderCoreFamily];
|
||||
return pCreate ? pCreate(filePath, standalone, executionEnvironment) : nullptr;
|
||||
return pCreate ? pCreate(filePath, standalone, executionEnvironment, rootDeviceIndex) : nullptr;
|
||||
}
|
||||
} // namespace NEO
|
||||
|
||||
|
||||
@@ -16,11 +16,11 @@ class CommandStreamReceiver;
|
||||
class ExecutionEnvironment;
|
||||
|
||||
struct AUBCommandStreamReceiver {
|
||||
static CommandStreamReceiver *create(const std::string &filename, bool standalone, ExecutionEnvironment &executionEnvironment);
|
||||
static CommandStreamReceiver *create(const std::string &filename, bool standalone, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
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);
|
||||
typedef CommandStreamReceiver *(*AubCommandStreamReceiverCreateFunc)(const std::string &fileName, bool standalone, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
} // namespace NEO
|
||||
|
||||
@@ -68,9 +68,9 @@ class AUBCommandStreamReceiverHw : public CommandStreamReceiverSimulatedHw<GfxFa
|
||||
MOCKABLE_VIRTUAL void addContextToken(uint32_t dumpHandle);
|
||||
MOCKABLE_VIRTUAL void dumpAllocation(GraphicsAllocation &gfxAllocation);
|
||||
|
||||
static CommandStreamReceiver *create(const std::string &fileName, bool standalone, ExecutionEnvironment &executionEnvironment);
|
||||
static CommandStreamReceiver *create(const std::string &fileName, bool standalone, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
|
||||
AUBCommandStreamReceiverHw(const std::string &fileName, bool standalone, ExecutionEnvironment &executionEnvironment);
|
||||
AUBCommandStreamReceiverHw(const std::string &fileName, bool standalone, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
~AUBCommandStreamReceiverHw() override;
|
||||
|
||||
AUBCommandStreamReceiverHw(const AUBCommandStreamReceiverHw &) = delete;
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
namespace NEO {
|
||||
|
||||
template <typename GfxFamily>
|
||||
AUBCommandStreamReceiverHw<GfxFamily>::AUBCommandStreamReceiverHw(const std::string &fileName, bool standalone, ExecutionEnvironment &executionEnvironment)
|
||||
: BaseClass(executionEnvironment),
|
||||
AUBCommandStreamReceiverHw<GfxFamily>::AUBCommandStreamReceiverHw(const std::string &fileName, bool standalone, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex)
|
||||
: BaseClass(executionEnvironment, rootDeviceIndex),
|
||||
standalone(standalone) {
|
||||
|
||||
executionEnvironment.initAubCenter(this->isLocalMemoryEnabled(), fileName, this->getType());
|
||||
@@ -275,8 +275,8 @@ void AUBCommandStreamReceiverHw<GfxFamily>::initializeEngine() {
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
CommandStreamReceiver *AUBCommandStreamReceiverHw<GfxFamily>::create(const std::string &fileName, bool standalone, ExecutionEnvironment &executionEnvironment) {
|
||||
auto csr = new AUBCommandStreamReceiverHw<GfxFamily>(fileName, standalone, executionEnvironment);
|
||||
CommandStreamReceiver *AUBCommandStreamReceiverHw<GfxFamily>::create(const std::string &fileName, bool standalone, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) {
|
||||
auto csr = new AUBCommandStreamReceiverHw<GfxFamily>(fileName, standalone, executionEnvironment, rootDeviceIndex);
|
||||
|
||||
if (!csr->subCaptureManager->isSubCaptureMode()) {
|
||||
csr->openFile(fileName);
|
||||
|
||||
@@ -34,8 +34,8 @@ namespace NEO {
|
||||
// Global table of CommandStreamReceiver factories for HW and tests
|
||||
CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE] = {};
|
||||
|
||||
CommandStreamReceiver::CommandStreamReceiver(ExecutionEnvironment &executionEnvironment)
|
||||
: executionEnvironment(executionEnvironment) {
|
||||
CommandStreamReceiver::CommandStreamReceiver(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex)
|
||||
: executionEnvironment(executionEnvironment), rootDeviceIndex(rootDeviceIndex) {
|
||||
residencyAllocations.reserve(20);
|
||||
|
||||
latestSentStatelessMocsConfig = CacheSettings::unknownMocs;
|
||||
|
||||
@@ -62,7 +62,7 @@ class CommandStreamReceiver {
|
||||
samplerCacheFlushAfter //add sampler cache flush after Walker with redescribed image
|
||||
};
|
||||
using MutexType = std::recursive_mutex;
|
||||
CommandStreamReceiver(ExecutionEnvironment &executionEnvironment);
|
||||
CommandStreamReceiver(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
virtual ~CommandStreamReceiver();
|
||||
|
||||
virtual FlushStamp flush(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency) = 0;
|
||||
@@ -244,6 +244,8 @@ class CommandStreamReceiver {
|
||||
uint32_t requiredScratchSize = 0;
|
||||
uint32_t requiredPrivateScratchSize = 0;
|
||||
|
||||
const uint32_t rootDeviceIndex;
|
||||
|
||||
int8_t lastSentCoherencyRequest = -1;
|
||||
int8_t lastMediaSamplerConfig = -1;
|
||||
|
||||
@@ -262,5 +264,5 @@ class CommandStreamReceiver {
|
||||
bool localMemoryEnabled = false;
|
||||
};
|
||||
|
||||
typedef CommandStreamReceiver *(*CommandStreamReceiverCreateFunc)(bool withAubDump, ExecutionEnvironment &executionEnvironment);
|
||||
typedef CommandStreamReceiver *(*CommandStreamReceiverCreateFunc)(bool withAubDump, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
} // namespace NEO
|
||||
|
||||
@@ -24,11 +24,11 @@ class CommandStreamReceiverHw : public CommandStreamReceiver {
|
||||
typedef typename GfxFamily::PIPE_CONTROL PIPE_CONTROL;
|
||||
|
||||
public:
|
||||
static CommandStreamReceiver *create(ExecutionEnvironment &executionEnvironment) {
|
||||
return new CommandStreamReceiverHw<GfxFamily>(executionEnvironment);
|
||||
static CommandStreamReceiver *create(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) {
|
||||
return new CommandStreamReceiverHw<GfxFamily>(executionEnvironment, rootDeviceIndex);
|
||||
}
|
||||
|
||||
CommandStreamReceiverHw(ExecutionEnvironment &executionEnvironment);
|
||||
CommandStreamReceiverHw(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
|
||||
FlushStamp flush(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency) override;
|
||||
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
namespace NEO {
|
||||
|
||||
template <typename GfxFamily>
|
||||
CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiverHw(ExecutionEnvironment &executionEnvironment)
|
||||
: CommandStreamReceiver(executionEnvironment) {
|
||||
CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiverHw(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex)
|
||||
: CommandStreamReceiver(executionEnvironment, rootDeviceIndex) {
|
||||
|
||||
auto &hwHelper = HwHelper::get(peekHwInfo().platform.eRenderCoreFamily);
|
||||
localMemoryEnabled = hwHelper.getEnableLocalMemory(peekHwInfo());
|
||||
|
||||
@@ -18,7 +18,7 @@ class CommandStreamReceiverWithAUBDump : public BaseCSR {
|
||||
using BaseCSR::osContext;
|
||||
|
||||
public:
|
||||
CommandStreamReceiverWithAUBDump(const std::string &baseName, ExecutionEnvironment &executionEnvironment);
|
||||
CommandStreamReceiverWithAUBDump(const std::string &baseName, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
|
||||
CommandStreamReceiverWithAUBDump(const CommandStreamReceiverWithAUBDump &) = delete;
|
||||
CommandStreamReceiverWithAUBDump &operator=(const CommandStreamReceiverWithAUBDump &) = delete;
|
||||
|
||||
@@ -15,13 +15,13 @@ namespace NEO {
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[IGFX_MAX_CORE];
|
||||
|
||||
template <typename BaseCSR>
|
||||
CommandStreamReceiverWithAUBDump<BaseCSR>::CommandStreamReceiverWithAUBDump(const std::string &baseName, ExecutionEnvironment &executionEnvironment)
|
||||
: BaseCSR(executionEnvironment) {
|
||||
CommandStreamReceiverWithAUBDump<BaseCSR>::CommandStreamReceiverWithAUBDump(const std::string &baseName, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex)
|
||||
: BaseCSR(executionEnvironment, rootDeviceIndex) {
|
||||
bool isAubManager = executionEnvironment.rootDeviceEnvironments[0].aubCenter && executionEnvironment.rootDeviceEnvironments[0].aubCenter->getAubManager();
|
||||
bool isTbxMode = CommandStreamReceiverType::CSR_TBX == BaseCSR::getType();
|
||||
bool createAubCsr = (isAubManager && isTbxMode) ? false : true;
|
||||
if (createAubCsr) {
|
||||
aubCSR.reset(AUBCommandStreamReceiver::create(baseName, false, executionEnvironment));
|
||||
aubCSR.reset(AUBCommandStreamReceiver::create(baseName, false, executionEnvironment, rootDeviceIndex));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace NEO {
|
||||
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[IGFX_MAX_CORE];
|
||||
|
||||
CommandStreamReceiver *createCommandStreamImpl(ExecutionEnvironment &executionEnvironment) {
|
||||
CommandStreamReceiver *createCommandStreamImpl(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) {
|
||||
auto funcCreate = commandStreamReceiverFactory[executionEnvironment.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);
|
||||
commandStreamReceiver = funcCreate(false, executionEnvironment, rootDeviceIndex);
|
||||
break;
|
||||
case CSR_AUB:
|
||||
commandStreamReceiver = AUBCommandStreamReceiver::create("aubfile", true, executionEnvironment);
|
||||
commandStreamReceiver = AUBCommandStreamReceiver::create("aubfile", true, executionEnvironment, rootDeviceIndex);
|
||||
break;
|
||||
case CSR_TBX:
|
||||
commandStreamReceiver = TbxCommandStreamReceiver::create("", false, executionEnvironment);
|
||||
commandStreamReceiver = TbxCommandStreamReceiver::create("", false, executionEnvironment, rootDeviceIndex);
|
||||
break;
|
||||
case CSR_HW_WITH_AUB:
|
||||
commandStreamReceiver = funcCreate(true, executionEnvironment);
|
||||
commandStreamReceiver = funcCreate(true, executionEnvironment, rootDeviceIndex);
|
||||
break;
|
||||
case CSR_TBX_WITH_AUB:
|
||||
commandStreamReceiver = TbxCommandStreamReceiver::create("aubfile", true, executionEnvironment);
|
||||
commandStreamReceiver = TbxCommandStreamReceiver::create("aubfile", true, executionEnvironment, rootDeviceIndex);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -10,6 +10,6 @@
|
||||
|
||||
namespace NEO {
|
||||
class ExecutionEnvironment;
|
||||
extern CommandStreamReceiver *createCommandStreamImpl(ExecutionEnvironment &executionEnvironment);
|
||||
extern CommandStreamReceiver *createCommandStreamImpl(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
extern bool getDevicesImpl(size_t &numDevicesReturned, ExecutionEnvironment &executionEnvironment);
|
||||
} // namespace NEO
|
||||
|
||||
@@ -15,11 +15,11 @@ class DeviceCommandStreamReceiver : public CommandStreamReceiverHw<GfxFamily> {
|
||||
typedef CommandStreamReceiverHw<GfxFamily> BaseClass;
|
||||
|
||||
protected:
|
||||
DeviceCommandStreamReceiver(ExecutionEnvironment &executionEnvironment)
|
||||
: BaseClass(executionEnvironment) {
|
||||
DeviceCommandStreamReceiver(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex)
|
||||
: BaseClass(executionEnvironment, rootDeviceIndex) {
|
||||
}
|
||||
|
||||
public:
|
||||
static CommandStreamReceiver *create(bool withAubDump, ExecutionEnvironment &executionEnvironment);
|
||||
static CommandStreamReceiver *create(bool withAubDump, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
};
|
||||
} // namespace NEO
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace NEO {
|
||||
|
||||
TbxCommandStreamReceiverCreateFunc tbxCommandStreamReceiverFactory[IGFX_MAX_CORE] = {};
|
||||
|
||||
CommandStreamReceiver *TbxCommandStreamReceiver::create(const std::string &baseName, bool withAubDump, ExecutionEnvironment &executionEnvironment) {
|
||||
CommandStreamReceiver *TbxCommandStreamReceiver::create(const std::string &baseName, bool withAubDump, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) {
|
||||
auto hwInfo = executionEnvironment.getHardwareInfo();
|
||||
|
||||
if (hwInfo->platform.eRenderCoreFamily >= IGFX_MAX_CORE) {
|
||||
@@ -27,6 +27,6 @@ CommandStreamReceiver *TbxCommandStreamReceiver::create(const std::string &baseN
|
||||
|
||||
auto pCreate = tbxCommandStreamReceiverFactory[hwInfo->platform.eRenderCoreFamily];
|
||||
|
||||
return pCreate ? pCreate(baseName, withAubDump, executionEnvironment) : nullptr;
|
||||
return pCreate ? pCreate(baseName, withAubDump, executionEnvironment, rootDeviceIndex) : nullptr;
|
||||
}
|
||||
} // namespace NEO
|
||||
|
||||
@@ -37,10 +37,10 @@ class TbxStream : public AubMemDump::AubStream {
|
||||
};
|
||||
|
||||
struct TbxCommandStreamReceiver {
|
||||
static CommandStreamReceiver *create(const std::string &baseName, bool withAubDump, ExecutionEnvironment &executionEnvironment);
|
||||
static CommandStreamReceiver *create(const std::string &baseName, bool withAubDump, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
|
||||
using TbxStream = NEO::TbxStream;
|
||||
};
|
||||
|
||||
typedef CommandStreamReceiver *(*TbxCommandStreamReceiverCreateFunc)(const std::string &baseName, bool withAubDump, ExecutionEnvironment &executionEnvironment);
|
||||
typedef CommandStreamReceiver *(*TbxCommandStreamReceiverCreateFunc)(const std::string &baseName, bool withAubDump, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
} // namespace NEO
|
||||
|
||||
@@ -64,9 +64,9 @@ class TbxCommandStreamReceiverHw : public CommandStreamReceiverSimulatedHw<GfxFa
|
||||
MOCKABLE_VIRTUAL void submitBatchBuffer(uint64_t batchBufferGpuAddress, const void *batchBuffer, size_t batchBufferSize, uint32_t memoryBank, uint64_t entryBits, bool overrideRingHead);
|
||||
void pollForCompletion() override;
|
||||
|
||||
static CommandStreamReceiver *create(const std::string &baseName, bool withAubDump, ExecutionEnvironment &executionEnvironment);
|
||||
static CommandStreamReceiver *create(const std::string &baseName, bool withAubDump, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
|
||||
TbxCommandStreamReceiverHw(ExecutionEnvironment &executionEnvironment);
|
||||
TbxCommandStreamReceiverHw(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
~TbxCommandStreamReceiverHw() override;
|
||||
|
||||
void initializeEngine();
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
namespace NEO {
|
||||
|
||||
template <typename GfxFamily>
|
||||
TbxCommandStreamReceiverHw<GfxFamily>::TbxCommandStreamReceiverHw(ExecutionEnvironment &executionEnvironment)
|
||||
: BaseClass(executionEnvironment) {
|
||||
TbxCommandStreamReceiverHw<GfxFamily>::TbxCommandStreamReceiverHw(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex)
|
||||
: BaseClass(executionEnvironment, rootDeviceIndex) {
|
||||
|
||||
physicalAddressAllocator.reset(this->createPhysicalAddressAllocator(&this->peekHwInfo()));
|
||||
executionEnvironment.initAubCenter(this->localMemoryEnabled, "", this->getType());
|
||||
@@ -147,7 +147,7 @@ void TbxCommandStreamReceiverHw<GfxFamily>::initializeEngine() {
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
CommandStreamReceiver *TbxCommandStreamReceiverHw<GfxFamily>::create(const std::string &baseName, bool withAubDump, ExecutionEnvironment &executionEnvironment) {
|
||||
CommandStreamReceiver *TbxCommandStreamReceiverHw<GfxFamily>::create(const std::string &baseName, bool withAubDump, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) {
|
||||
TbxCommandStreamReceiverHw<GfxFamily> *csr;
|
||||
if (withAubDump) {
|
||||
auto hwInfo = executionEnvironment.getHardwareInfo();
|
||||
@@ -159,7 +159,7 @@ CommandStreamReceiver *TbxCommandStreamReceiverHw<GfxFamily>::create(const std::
|
||||
}
|
||||
executionEnvironment.initAubCenter(localMemoryEnabled, fullName, CommandStreamReceiverType::CSR_TBX_WITH_AUB);
|
||||
|
||||
csr = new CommandStreamReceiverWithAUBDump<TbxCommandStreamReceiverHw<GfxFamily>>(baseName, executionEnvironment);
|
||||
csr = new CommandStreamReceiverWithAUBDump<TbxCommandStreamReceiverHw<GfxFamily>>(baseName, executionEnvironment, rootDeviceIndex);
|
||||
|
||||
auto aubCenter = executionEnvironment.rootDeviceEnvironments[0].aubCenter.get();
|
||||
UNRECOVERABLE_IF(nullptr == aubCenter);
|
||||
@@ -179,7 +179,7 @@ CommandStreamReceiver *TbxCommandStreamReceiverHw<GfxFamily>::create(const std::
|
||||
}
|
||||
}
|
||||
} else {
|
||||
csr = new TbxCommandStreamReceiverHw<GfxFamily>(executionEnvironment);
|
||||
csr = new TbxCommandStreamReceiverHw<GfxFamily>(executionEnvironment, rootDeviceIndex);
|
||||
}
|
||||
|
||||
if (!csr->aubManager) {
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
CommandStreamReceiver *createCommandStream(ExecutionEnvironment &executionEnvironment) {
|
||||
return createCommandStreamImpl(executionEnvironment);
|
||||
CommandStreamReceiver *createCommandStream(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) {
|
||||
return createCommandStreamImpl(executionEnvironment, rootDeviceIndex);
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -31,7 +31,7 @@ ExecutionEnvironment::~ExecutionEnvironment() {
|
||||
builtins.reset();
|
||||
rootDeviceEnvironments.clear();
|
||||
}
|
||||
extern CommandStreamReceiver *createCommandStream(ExecutionEnvironment &executionEnvironment);
|
||||
extern CommandStreamReceiver *createCommandStream(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
|
||||
void ExecutionEnvironment::initAubCenter(bool localMemoryEnabled, const std::string &aubFileName, CommandStreamReceiverType csrType) {
|
||||
if (!rootDeviceEnvironments[0].aubCenter) {
|
||||
@@ -57,7 +57,7 @@ bool ExecutionEnvironment::initializeCommandStreamReceiver(uint32_t rootDeviceIn
|
||||
if (this->rootDeviceEnvironments[rootDeviceIndex].commandStreamReceivers[internalDeviceIndex][deviceCsrIndex]) {
|
||||
return true;
|
||||
}
|
||||
std::unique_ptr<CommandStreamReceiver> commandStreamReceiver(createCommandStream(*this));
|
||||
std::unique_ptr<CommandStreamReceiver> commandStreamReceiver(createCommandStream(*this, rootDeviceIndex));
|
||||
if (!commandStreamReceiver) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
namespace NEO {
|
||||
|
||||
template <typename GfxFamily>
|
||||
CommandStreamReceiver *DeviceCommandStreamReceiver<GfxFamily>::create(bool withAubDump, ExecutionEnvironment &executionEnvironment) {
|
||||
CommandStreamReceiver *DeviceCommandStreamReceiver<GfxFamily>::create(bool withAubDump, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) {
|
||||
if (withAubDump) {
|
||||
return new CommandStreamReceiverWithAUBDump<DrmCommandStreamReceiver<GfxFamily>>("aubfile", executionEnvironment);
|
||||
return new CommandStreamReceiverWithAUBDump<DrmCommandStreamReceiver<GfxFamily>>("aubfile", executionEnvironment, rootDeviceIndex);
|
||||
} else {
|
||||
return new DrmCommandStreamReceiver<GfxFamily>(executionEnvironment);
|
||||
return new DrmCommandStreamReceiver<GfxFamily>(executionEnvironment, rootDeviceIndex);
|
||||
}
|
||||
};
|
||||
} // 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,
|
||||
DrmCommandStreamReceiver(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex,
|
||||
gemCloseWorkerMode mode = gemCloseWorkerMode::gemCloseWorkerActive);
|
||||
|
||||
FlushStamp flush(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency) override;
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
namespace NEO {
|
||||
|
||||
template <typename GfxFamily>
|
||||
DrmCommandStreamReceiver<GfxFamily>::DrmCommandStreamReceiver(ExecutionEnvironment &executionEnvironment, gemCloseWorkerMode mode)
|
||||
: BaseClass(executionEnvironment), gemCloseWorkerOperationMode(mode) {
|
||||
DrmCommandStreamReceiver<GfxFamily>::DrmCommandStreamReceiver(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, gemCloseWorkerMode mode)
|
||||
: BaseClass(executionEnvironment, rootDeviceIndex), gemCloseWorkerOperationMode(mode) {
|
||||
|
||||
this->drm = executionEnvironment.osInterface->get()->getDrm();
|
||||
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
namespace NEO {
|
||||
|
||||
template <typename GfxFamily>
|
||||
CommandStreamReceiver *DeviceCommandStreamReceiver<GfxFamily>::create(bool withAubDump, ExecutionEnvironment &executionEnvironment) {
|
||||
CommandStreamReceiver *DeviceCommandStreamReceiver<GfxFamily>::create(bool withAubDump, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) {
|
||||
if (withAubDump) {
|
||||
return new CommandStreamReceiverWithAUBDump<WddmCommandStreamReceiver<GfxFamily>>("aubfile", executionEnvironment);
|
||||
return new CommandStreamReceiverWithAUBDump<WddmCommandStreamReceiver<GfxFamily>>("aubfile", executionEnvironment, rootDeviceIndex);
|
||||
} else {
|
||||
return new WddmCommandStreamReceiver<GfxFamily>(executionEnvironment);
|
||||
return new WddmCommandStreamReceiver<GfxFamily>(executionEnvironment, rootDeviceIndex);
|
||||
}
|
||||
}
|
||||
} // namespace NEO
|
||||
|
||||
@@ -21,7 +21,7 @@ class WddmCommandStreamReceiver : public DeviceCommandStreamReceiver<GfxFamily>
|
||||
typedef DeviceCommandStreamReceiver<GfxFamily> BaseClass;
|
||||
|
||||
public:
|
||||
WddmCommandStreamReceiver(ExecutionEnvironment &executionEnvironment);
|
||||
WddmCommandStreamReceiver(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
virtual ~WddmCommandStreamReceiver();
|
||||
|
||||
FlushStamp flush(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency) override;
|
||||
|
||||
@@ -32,8 +32,8 @@ namespace NEO {
|
||||
DECLARE_COMMAND_BUFFER(CommandBufferHeader, UMD_OCL, FALSE, FALSE, PERFTAG_OCL);
|
||||
|
||||
template <typename GfxFamily>
|
||||
WddmCommandStreamReceiver<GfxFamily>::WddmCommandStreamReceiver(ExecutionEnvironment &executionEnvironment)
|
||||
: BaseClass(executionEnvironment) {
|
||||
WddmCommandStreamReceiver<GfxFamily>::WddmCommandStreamReceiver(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex)
|
||||
: BaseClass(executionEnvironment, rootDeviceIndex) {
|
||||
|
||||
notifyAubCaptureImpl = DeviceCallbacks<GfxFamily>::notifyAubCapture;
|
||||
this->wddm = executionEnvironment.osInterface->get()->getWddm();
|
||||
|
||||
@@ -34,9 +34,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);
|
||||
pCommandStreamReceiver = TbxCommandStreamReceiver::create(strfilename.str(), true, *device.executionEnvironment, device.getRootDeviceIndex());
|
||||
} else {
|
||||
pCommandStreamReceiver = AUBCommandStreamReceiver::create(strfilename.str(), true, *device.executionEnvironment);
|
||||
pCommandStreamReceiver = AUBCommandStreamReceiver::create(strfilename.str(), true, *device.executionEnvironment, device.getRootDeviceIndex());
|
||||
}
|
||||
ASSERT_NE(nullptr, pCommandStreamReceiver);
|
||||
|
||||
|
||||
@@ -38,9 +38,9 @@ class AUBFixture : public CommandQueueHwFixture {
|
||||
executionEnvironment = platformImpl->peekExecutionEnvironment();
|
||||
executionEnvironment->setHwInfo(&hwInfo);
|
||||
if (testMode == TestMode::AubTestsWithTbx) {
|
||||
this->csr = TbxCommandStreamReceiver::create(strfilename.str(), true, *executionEnvironment);
|
||||
this->csr = TbxCommandStreamReceiver::create(strfilename.str(), true, *executionEnvironment, 0);
|
||||
} else {
|
||||
this->csr = AUBCommandStreamReceiver::create(strfilename.str(), true, *executionEnvironment);
|
||||
this->csr = AUBCommandStreamReceiver::create(strfilename.str(), true, *executionEnvironment, 0);
|
||||
}
|
||||
|
||||
executionEnvironment->rootDeviceEnvironments[0].commandStreamReceivers.resize(deviceIndex + 1);
|
||||
|
||||
@@ -351,7 +351,7 @@ HWTEST_F(CommandQueueHwTest, GivenEventsWaitlistOnBlockingMapBufferWillWaitForEv
|
||||
|
||||
HWTEST_F(CommandQueueHwTest, GivenNotCompleteUserEventPassedToEnqueueWhenEventIsUnblockedThenAllSurfacesForBlockedCommandsAreMadeResident) {
|
||||
int32_t executionStamp = 0;
|
||||
auto mockCSR = new MockCsr<FamilyType>(executionStamp, *pDevice->executionEnvironment);
|
||||
auto mockCSR = new MockCsr<FamilyType>(executionStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCSR);
|
||||
|
||||
auto userEvent = make_releaseable<UserEvent>(context);
|
||||
@@ -1048,7 +1048,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);
|
||||
auto mockCSR = new MockCsr<FamilyType>(executionStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
|
||||
pDevice->resetCommandStreamReceiver(mockCSR);
|
||||
|
||||
@@ -1128,7 +1128,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);
|
||||
auto mockCSR = new MockCsr<FamilyType>(executionStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCSR);
|
||||
|
||||
MockKernelWithInternals mockKernelWithInternals(*pDevice);
|
||||
|
||||
@@ -25,7 +25,7 @@ using namespace NEO;
|
||||
|
||||
HWTEST_F(EnqueueHandlerTest, WhenEnqueingHandlerWithKernelThenProcessEvictionOnCsrIsCalled) {
|
||||
int32_t tag;
|
||||
auto csr = new MockCsrBase<FamilyType>(tag, *pDevice->executionEnvironment);
|
||||
auto csr = new MockCsrBase<FamilyType>(tag, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(csr);
|
||||
|
||||
MockKernelWithInternals mockKernel(*pDevice);
|
||||
@@ -39,7 +39,7 @@ HWTEST_F(EnqueueHandlerTest, WhenEnqueingHandlerWithKernelThenProcessEvictionOnC
|
||||
|
||||
HWTEST_F(EnqueueHandlerTest, givenEnqueueHandlerWithKernelWhenAubCsrIsActiveThenAddCommentWithKernelName) {
|
||||
int32_t tag;
|
||||
auto aubCsr = new MockCsrAub<FamilyType>(tag, *pDevice->executionEnvironment);
|
||||
auto aubCsr = new MockCsrAub<FamilyType>(tag, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(aubCsr);
|
||||
|
||||
MockKernelWithInternals mockKernel(*pDevice);
|
||||
@@ -57,7 +57,7 @@ HWTEST_F(EnqueueHandlerTest, givenEnqueueHandlerWithKernelWhenAubCsrIsActiveThen
|
||||
|
||||
HWTEST_F(EnqueueHandlerTest, givenEnqueueHandlerWithKernelSplitWhenAubCsrIsActiveThenAddCommentWithKernelName) {
|
||||
int32_t tag;
|
||||
auto aubCsr = new MockCsrAub<FamilyType>(tag, *pDevice->executionEnvironment);
|
||||
auto aubCsr = new MockCsrAub<FamilyType>(tag, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(aubCsr);
|
||||
|
||||
MockKernelWithInternals kernel1(*pDevice);
|
||||
@@ -79,7 +79,7 @@ HWTEST_F(EnqueueHandlerTest, givenEnqueueHandlerWithKernelSplitWhenAubCsrIsActiv
|
||||
|
||||
HWTEST_F(EnqueueHandlerTest, givenEnqueueHandlerWithEmptyDispatchInfoWhenAubCsrIsActiveThenDontAddCommentWithKernelName) {
|
||||
int32_t tag;
|
||||
auto aubCsr = new MockCsrAub<FamilyType>(tag, *pDevice->executionEnvironment);
|
||||
auto aubCsr = new MockCsrAub<FamilyType>(tag, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(aubCsr);
|
||||
|
||||
MockKernelWithInternals mockKernel(*pDevice);
|
||||
@@ -117,7 +117,7 @@ HWTEST_F(EnqueueHandlerWithAubSubCaptureTests, givenEnqueueHandlerWithAubSubCapt
|
||||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.AUBDumpSubCaptureMode.set(1);
|
||||
|
||||
auto aubCsr = new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment);
|
||||
auto aubCsr = new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(aubCsr);
|
||||
|
||||
AubSubCaptureCommon subCaptureCommon;
|
||||
@@ -139,7 +139,7 @@ HWTEST_F(EnqueueHandlerWithAubSubCaptureTests, givenEnqueueHandlerWithAubSubCapt
|
||||
DebugManager.flags.AUBDumpSubCaptureMode.set(1);
|
||||
DebugManager.flags.EnableTimestampPacket.set(true);
|
||||
|
||||
auto aubCsr = new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment);
|
||||
auto aubCsr = new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(aubCsr);
|
||||
|
||||
AubSubCaptureCommon subCaptureCommon;
|
||||
@@ -183,7 +183,7 @@ class MyCommandQueueHw : public CommandQueueHw<GfxFamily> {
|
||||
|
||||
HWTEST_F(EnqueueHandlerTest, givenLocalWorkgroupSizeGreaterThenGlobalWorkgroupSizeWhenEnqueueKernelThenLwsIsClamped) {
|
||||
int32_t tag;
|
||||
auto csr = new MockCsrBase<FamilyType>(tag, *pDevice->executionEnvironment);
|
||||
auto csr = new MockCsrBase<FamilyType>(tag, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(csr);
|
||||
MockKernelWithInternals mockKernel(*pDevice);
|
||||
auto mockProgram = mockKernel.mockProgram;
|
||||
@@ -217,7 +217,7 @@ HWTEST_F(EnqueueHandlerTest, givenLocalWorkgroupSizeGreaterThenGlobalWorkgroupSi
|
||||
|
||||
HWTEST_F(EnqueueHandlerTest, givenLocalWorkgroupSizeGreaterThenGlobalWorkgroupSizeAndNonUniformWorkGroupWhenEnqueueKernelThenClIvalidWorkGroupSizeIsReturned) {
|
||||
int32_t tag;
|
||||
auto csr = new MockCsrBase<FamilyType>(tag, *pDevice->executionEnvironment);
|
||||
auto csr = new MockCsrBase<FamilyType>(tag, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(csr);
|
||||
MockKernelWithInternals mockKernel(*pDevice);
|
||||
auto mockProgram = mockKernel.mockProgram;
|
||||
@@ -232,7 +232,7 @@ HWTEST_F(EnqueueHandlerTest, givenLocalWorkgroupSizeGreaterThenGlobalWorkgroupSi
|
||||
|
||||
HWTEST_F(EnqueueHandlerTest, WhenEnqueuingHandlerCallOnEnqueueMarkerThenCallProcessEvictionOnCsrIsNotCalled) {
|
||||
int32_t tag;
|
||||
auto csr = new MockCsrBase<FamilyType>(tag, *pDevice->executionEnvironment);
|
||||
auto csr = new MockCsrBase<FamilyType>(tag, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(csr);
|
||||
|
||||
auto mockCmdQ = std::unique_ptr<MockCommandQueueHw<FamilyType>>(new MockCommandQueueHw<FamilyType>(context, pDevice, 0));
|
||||
@@ -249,7 +249,7 @@ HWTEST_F(EnqueueHandlerTest, WhenEnqueuingHandlerCallOnEnqueueMarkerThenCallProc
|
||||
|
||||
HWTEST_F(EnqueueHandlerTest, WhenEnqueuingHandlerForMarkerOnUnblockedQueueThenTaskLevelIsNotIncremented) {
|
||||
int32_t tag;
|
||||
auto csr = new MockCsrBase<FamilyType>(tag, *pDevice->executionEnvironment);
|
||||
auto csr = new MockCsrBase<FamilyType>(tag, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(csr);
|
||||
|
||||
auto mockCmdQ = std::unique_ptr<MockCommandQueueHw<FamilyType>>(new MockCommandQueueHw<FamilyType>(context, pDevice, 0));
|
||||
@@ -267,7 +267,7 @@ HWTEST_F(EnqueueHandlerTest, WhenEnqueuingHandlerForMarkerOnUnblockedQueueThenTa
|
||||
|
||||
HWTEST_F(EnqueueHandlerTest, WhenEnqueuingHandlerForMarkerOnBlockedQueueThenTaskLevelIsNotIncremented) {
|
||||
int32_t tag;
|
||||
auto csr = new MockCsrBase<FamilyType>(tag, *pDevice->executionEnvironment);
|
||||
auto csr = new MockCsrBase<FamilyType>(tag, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(csr);
|
||||
|
||||
auto mockCmdQ = std::unique_ptr<MockCommandQueueHw<FamilyType>>(new MockCommandQueueHw<FamilyType>(context, pDevice, 0));
|
||||
@@ -371,7 +371,7 @@ HWTEST_F(EnqueueHandlerTest, WhenEnqueuingWithOutputEventThenEventIsRegistered)
|
||||
}
|
||||
|
||||
HWTEST_F(EnqueueHandlerTest, givenEnqueueHandlerWhenAddPatchInfoCommentsForAUBDumpIsNotSetThenPatchInfoDataIsNotTransferredToCSR) {
|
||||
auto csr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto csr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockHelper = new MockFlatBatchBufferHelper<FamilyType>(*pDevice->executionEnvironment);
|
||||
csr->overwriteFlatBatchBufferHelper(mockHelper);
|
||||
pDevice->resetCommandStreamReceiver(csr);
|
||||
@@ -393,7 +393,7 @@ HWTEST_F(EnqueueHandlerTest, givenEnqueueHandlerWhenAddPatchInfoCommentsForAUBDu
|
||||
DebugManager.flags.AddPatchInfoCommentsForAUBDump.set(true);
|
||||
DebugManager.flags.FlattenBatchBufferForAUBDump.set(true);
|
||||
|
||||
auto csr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto csr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockHelper = new MockFlatBatchBufferHelper<FamilyType>(*pDevice->executionEnvironment);
|
||||
csr->overwriteFlatBatchBufferHelper(mockHelper);
|
||||
pDevice->resetCommandStreamReceiver(csr);
|
||||
|
||||
@@ -405,7 +405,7 @@ HWTEST_F(EnqueueKernelTest, givenEnqueueWithGlobalWorkSizeWhenZeroValueIsPassedI
|
||||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenCommandStreamReceiverInBatchingModeWhenEnqueueKernelIsCalledThenKernelIsRecorded) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
@@ -434,7 +434,7 @@ HWTEST_F(EnqueueKernelTest, givenReducedAddressSpaceGraphicsAllocationForHostPtr
|
||||
auto hwInfoToModify = *platformDevices[0];
|
||||
hwInfoToModify.capabilityTable.gpuAddressSpace = MemoryConstants::max36BitAddress;
|
||||
device.reset(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfoToModify));
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->executionEnvironment, device->getRootDeviceIndex());
|
||||
device->resetCommandStreamReceiver(mockCsr);
|
||||
auto memoryManager = mockCsr->getMemoryManager();
|
||||
uint32_t hostPtr[10]{};
|
||||
@@ -458,7 +458,7 @@ HWTEST_F(EnqueueKernelTest, givenReducedAddressSpaceGraphicsAllocationForHostPtr
|
||||
auto hwInfoToModify = *platformDevices[0];
|
||||
hwInfoToModify.capabilityTable.gpuAddressSpace = MemoryConstants::max36BitAddress;
|
||||
device.reset(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfoToModify));
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->executionEnvironment, device->getRootDeviceIndex());
|
||||
device->resetCommandStreamReceiver(mockCsr);
|
||||
auto memoryManager = mockCsr->getMemoryManager();
|
||||
uint32_t hostPtr[10]{};
|
||||
@@ -483,7 +483,7 @@ HWTEST_F(EnqueueKernelTest, givenFullAddressSpaceGraphicsAllocationWhenEnqueueKe
|
||||
hwInfoToModify = *platformDevices[0];
|
||||
hwInfoToModify.capabilityTable.gpuAddressSpace = MemoryConstants::max48BitAddress;
|
||||
device.reset(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfoToModify));
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->executionEnvironment, device->getRootDeviceIndex());
|
||||
device->resetCommandStreamReceiver(mockCsr);
|
||||
auto memoryManager = mockCsr->getMemoryManager();
|
||||
uint32_t hostPtr[10]{};
|
||||
@@ -519,7 +519,7 @@ HWTEST_F(EnqueueKernelTest, givenDefaultCommandStreamReceiverWhenClFlushIsCalled
|
||||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenCommandStreamReceiverInBatchingModeAndBatchedKernelWhenFlushIsCalledThenKernelIsSubmitted) {
|
||||
auto mockCsrmockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsrmockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
mockCsrmockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsrmockCsr);
|
||||
|
||||
@@ -540,7 +540,7 @@ HWTEST_F(EnqueueKernelTest, givenCommandStreamReceiverInBatchingModeAndBatchedKe
|
||||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenCommandStreamReceiverInBatchingModeAndBatchedKernelWhenFlushIsCalledTwiceThenNothingChanges) {
|
||||
auto mockCsrmockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsrmockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
mockCsrmockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsrmockCsr);
|
||||
|
||||
@@ -587,7 +587,7 @@ HWTEST_F(EnqueueKernelTest, givenCommandStreamReceiverInBatchingModeWhenKernelIs
|
||||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenCommandStreamReceiverInBatchingModeWhenFlushIsCalledOnTwoBatchedKernelsThenTheyAreExecutedInOrder) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
@@ -605,7 +605,7 @@ HWTEST_F(EnqueueKernelTest, givenCommandStreamReceiverInBatchingModeWhenFlushIsC
|
||||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenFinishIsCalledThenBatchesSubmissionsAreFlushed) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
@@ -624,7 +624,7 @@ HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenFinishIsCalledThenBatchesS
|
||||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenThressEnqueueKernelsAreCalledThenBatchesSubmissionsAreFlushed) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
@@ -644,7 +644,7 @@ HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenThressEnqueueKernelsAreCal
|
||||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenWaitForEventsIsCalledThenBatchedSubmissionsAreFlushed) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
@@ -668,7 +668,7 @@ HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenWaitForEventsIsCalledThenB
|
||||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenCommandIsFlushedThenFlushStampIsUpdatedInCommandQueueCsrAndEvent) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
@@ -700,7 +700,7 @@ HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenCommandIsFlushedThenFlushS
|
||||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenNonBlockingMapFollowsNdrCallThenFlushStampIsUpdatedProperly) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
@@ -718,7 +718,7 @@ HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenNonBlockingMapFollowsNdrCa
|
||||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenCommandWithEventIsFollowedByCommandWithoutEventThenFlushStampIsUpdatedInCommandQueueCsrAndEvent) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
@@ -750,7 +750,7 @@ HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenCommandWithEventIsFollowed
|
||||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenClFlushIsCalledThenQueueFlushStampIsUpdated) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
@@ -767,7 +767,7 @@ HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenClFlushIsCalledThenQueueFl
|
||||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenWaitForEventsIsCalledWithUnflushedTaskCountThenBatchedSubmissionsAreFlushed) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
@@ -791,7 +791,7 @@ HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenWaitForEventsIsCalledWithU
|
||||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenFinishIsCalledWithUnflushedTaskCountThenBatchedSubmissionsAreFlushed) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
@@ -818,7 +818,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, pDevice, props, nullptr);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
@@ -860,7 +860,7 @@ HWTEST_F(EnqueueKernelTest, givenInOrderCommandQueueWhenEnqueueKernelThatHasShar
|
||||
const cl_queue_properties props[] = {0};
|
||||
auto inOrderQueue = clCreateCommandQueueWithProperties(context, pDevice, props, nullptr);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
@@ -881,7 +881,7 @@ HWTEST_F(EnqueueKernelTest, givenInOrderCommandQueueWhenEnqueueKernelThatHasShar
|
||||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenInOrderCommandQueueWhenEnqueueKernelThatHasSharedObjectsAsArgIsMadeThenPipeControlDoesntHaveDcFlush) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
@@ -897,7 +897,7 @@ HWTEST_F(EnqueueKernelTest, givenInOrderCommandQueueWhenEnqueueKernelReturningEv
|
||||
const cl_queue_properties props[] = {0};
|
||||
auto inOrderQueue = clCreateCommandQueueWithProperties(context, pDevice, props, nullptr);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
mockCsr->timestampPacketWriteEnabled = false;
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
@@ -924,7 +924,7 @@ HWTEST_F(EnqueueKernelTest, givenInOrderCommandQueueWhenEnqueueKernelReturningEv
|
||||
const cl_queue_properties props[] = {0};
|
||||
auto inOrderQueue = clCreateCommandQueueWithProperties(context, pDevice, props, nullptr);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->enableNTo1SubmissionModel();
|
||||
@@ -948,7 +948,7 @@ HWTEST_F(EnqueueKernelTest, givenInOrderCommandQueueWhenEnqueueKernelReturningEv
|
||||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenOutOfOrderCommandQueueWhenEnqueueKernelReturningEventIsMadeThenPipeControlPositionIsRecorded) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
@@ -976,7 +976,7 @@ HWTEST_F(EnqueueKernelTest, givenOutOfOrderCommandQueueWhenEnqueueKernelReturnin
|
||||
HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenBlockingCallIsMadeThenEventAssociatedWithCommandHasProperFlushStamp) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.MakeEachEnqueueBlocking.set(true);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
@@ -993,7 +993,7 @@ HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenBlockingCallIsMadeThenEven
|
||||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenKernelWhenItIsEnqueuedThenAllResourceGraphicsAllocationsAreUpdatedWithCsrTaskCount) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
MockKernelWithInternals mockKernel(*pDevice);
|
||||
@@ -1069,7 +1069,7 @@ TEST_F(EnqueueKernelTest, givenEnqueueCommandThatLocalWorkgroupSizeContainsZeroW
|
||||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenVMEKernelWhenEnqueueKernelThenDispatchFlagsHaveMediaSamplerRequired) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
@@ -1081,7 +1081,7 @@ HWTEST_F(EnqueueKernelTest, givenVMEKernelWhenEnqueueKernelThenDispatchFlagsHave
|
||||
}
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenNonVMEKernelWhenEnqueueKernelThenDispatchFlagsDoesntHaveMediaSamplerRequired) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
|
||||
@@ -432,7 +432,7 @@ INSTANTIATE_TEST_CASE_P(EnqueueKernel,
|
||||
typedef EnqueueKernelTypeTest<int> EnqueueKernelWithScratch;
|
||||
|
||||
HWTEST_P(EnqueueKernelWithScratch, GivenKernelRequiringScratchWhenItIsEnqueuedWithDifferentScratchSizesThenPreviousScratchAllocationIsMadeNonResidentPriorStoringOnResueList) {
|
||||
auto mockCsr = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
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);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
@@ -1251,7 +1251,8 @@ HWTEST_F(EnqueueSvmTestLocalMemory, givenEnabledLocalMemoryWhenMappedSvmRegionAn
|
||||
|
||||
template <typename GfxFamily>
|
||||
struct FailCsr : public CommandStreamReceiverHw<GfxFamily> {
|
||||
FailCsr(ExecutionEnvironment &executionEnvironment) : CommandStreamReceiverHw<GfxFamily>(executionEnvironment){};
|
||||
using CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiverHw;
|
||||
|
||||
bool createAllocationForHostSurface(HostPtrSurface &surface, bool requiresL3Flush) override {
|
||||
return CL_FALSE;
|
||||
}
|
||||
@@ -1286,7 +1287,7 @@ HWTEST_F(EnqueueSvmTest, GivenDstHostPtrWhenHostPtrAllocationCreationFailsThenRe
|
||||
void *pDstSVM = dstHostPtr;
|
||||
void *pSrcSVM = ptrSVM;
|
||||
MockCommandQueueHw<FamilyType> cmdQ(context, pDevice, nullptr);
|
||||
auto failCsr = std::make_unique<FailCsr<FamilyType>>(*pDevice->getExecutionEnvironment());
|
||||
auto failCsr = std::make_unique<FailCsr<FamilyType>>(*pDevice->getExecutionEnvironment(), pDevice->getRootDeviceIndex());
|
||||
CommandStreamReceiver *oldCommandStreamReceiver = cmdQ.gpgpuEngine->commandStreamReceiver;
|
||||
cmdQ.gpgpuEngine->commandStreamReceiver = failCsr.get();
|
||||
retVal = cmdQ.enqueueSVMMemcpy(
|
||||
@@ -1307,7 +1308,7 @@ HWTEST_F(EnqueueSvmTest, GivenSrcHostPtrAndSizeZeroWhenHostPtrAllocationCreation
|
||||
void *pDstSVM = ptrSVM;
|
||||
void *pSrcSVM = srcHostPtr;
|
||||
MockCommandQueueHw<FamilyType> cmdQ(context, pDevice, nullptr);
|
||||
auto failCsr = std::make_unique<FailCsr<FamilyType>>(*pDevice->getExecutionEnvironment());
|
||||
auto failCsr = std::make_unique<FailCsr<FamilyType>>(*pDevice->getExecutionEnvironment(), pDevice->getRootDeviceIndex());
|
||||
CommandStreamReceiver *oldCommandStreamReceiver = cmdQ.gpgpuEngine->commandStreamReceiver;
|
||||
cmdQ.gpgpuEngine->commandStreamReceiver = failCsr.get();
|
||||
retVal = cmdQ.enqueueSVMMemcpy(
|
||||
@@ -1329,7 +1330,7 @@ HWTEST_F(EnqueueSvmTest, givenDstHostPtrAndSrcHostPtrWhenHostPtrAllocationCreati
|
||||
void *pDstSVM = dstHostPtr;
|
||||
void *pSrcSVM = srcHostPtr;
|
||||
MockCommandQueueHw<FamilyType> cmdQ(context, pDevice, nullptr);
|
||||
auto failCsr = std::make_unique<FailCsr<FamilyType>>(*pDevice->getExecutionEnvironment());
|
||||
auto failCsr = std::make_unique<FailCsr<FamilyType>>(*pDevice->getExecutionEnvironment(), pDevice->getRootDeviceIndex());
|
||||
CommandStreamReceiver *oldCommandStreamReceiver = cmdQ.gpgpuEngine->commandStreamReceiver;
|
||||
cmdQ.gpgpuEngine->commandStreamReceiver = failCsr.get();
|
||||
retVal = cmdQ.enqueueSVMMemcpy(
|
||||
|
||||
@@ -30,7 +30,7 @@ class CommandStreamReceiverMock : public UltCommandStreamReceiver<FamilyType> {
|
||||
|
||||
public:
|
||||
size_t expectedToFreeCount = (size_t)-1;
|
||||
CommandStreamReceiverMock(Device *pDevice) : UltCommandStreamReceiver<FamilyType>(*pDevice->getExecutionEnvironment()) {
|
||||
CommandStreamReceiverMock(Device *pDevice) : UltCommandStreamReceiver<FamilyType>(*pDevice->getExecutionEnvironment(), pDevice->getRootDeviceIndex()) {
|
||||
this->pDevice = pDevice;
|
||||
}
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ HWTEST_F(OOQTaskTests, givenCommandQueueWithLowerTaskLevelThenCsrWhenItIsSubmitt
|
||||
}
|
||||
|
||||
HWTEST_F(OOQTaskTests, givenCommandQueueAtTaskLevel100WhenMultipleEnqueueAreDoneThenTaskLevelDoesntChnage) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
mockCsr->taskLevel = 100;
|
||||
@@ -136,7 +136,7 @@ HWTEST_F(OOQTaskTests, givenCommandQueueAtTaskLevel100WhenMultipleEnqueueAreDone
|
||||
}
|
||||
|
||||
HWTEST_F(OOQTaskTests, givenCommandQueueAtTaskLevel100WhenItIsFlushedAndFollowedByNewCommandsThenTheyHaveHigherTaskLevel) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
mockCsr->taskLevel = 100;
|
||||
@@ -155,7 +155,7 @@ HWTEST_F(OOQTaskTests, givenCommandQueueAtTaskLevel100WhenItIsFlushedAndFollowed
|
||||
}
|
||||
|
||||
HWTEST_F(OOQTaskTests, givenCommandQueueAtTaskLevel100WhenItIsFlushedAndFollowedByNewCommandsAndBarrierThenCsrTaskLevelIncreases) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
mockCsr->taskLevel = 100;
|
||||
@@ -175,7 +175,7 @@ HWTEST_F(OOQTaskTests, givenCommandQueueAtTaskLevel100WhenItIsFlushedAndFollowed
|
||||
}
|
||||
|
||||
HWTEST_F(OOQTaskTests, givenCommandQueueAtTaskLevel100WhenItIsFlushedAndFollowedByNewCommandsAndMarkerThenCsrTaskLevelIsNotIncreasing) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
mockCsr->taskLevel = 100;
|
||||
@@ -195,7 +195,7 @@ HWTEST_F(OOQTaskTests, givenCommandQueueAtTaskLevel100WhenItIsFlushedAndFollowed
|
||||
}
|
||||
|
||||
HWTEST_F(OOQTaskTests, givenTwoEnqueueCommandSynchronizedByEventsWhenTheyAreEnqueueThenSecondHasHigherTaskLevelThenFirst) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
auto currentTaskLevel = this->pCmdQ->taskLevel;
|
||||
|
||||
@@ -67,12 +67,12 @@ TEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenItIsCreat
|
||||
|
||||
hwInfo->platform.eRenderCoreFamily = GFXCORE_FAMILY_FORCE_ULONG; // wrong gfx core family
|
||||
|
||||
CommandStreamReceiver *aubCsr = AUBCommandStreamReceiver::create("", true, *pDevice->executionEnvironment);
|
||||
CommandStreamReceiver *aubCsr = AUBCommandStreamReceiver::create("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
EXPECT_EQ(nullptr, aubCsr);
|
||||
}
|
||||
|
||||
TEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenTypeIsCheckedThenAubCsrIsReturned) {
|
||||
std::unique_ptr<CommandStreamReceiver> aubCsr(AUBCommandStreamReceiver::create("", true, *pDevice->executionEnvironment));
|
||||
std::unique_ptr<CommandStreamReceiver> aubCsr(AUBCommandStreamReceiver::create("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
EXPECT_NE(nullptr, aubCsr);
|
||||
EXPECT_EQ(CommandStreamReceiverType::CSR_AUB, aubCsr->getType());
|
||||
}
|
||||
@@ -83,7 +83,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenItIsCre
|
||||
MockExecutionEnvironment executionEnvironment(platformDevices[0], false);
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, executionEnvironment);
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, executionEnvironment, 0);
|
||||
ASSERT_NE(nullptr, aubCsr);
|
||||
|
||||
EXPECT_EQ(nullptr, aubCsr->aubManager);
|
||||
@@ -93,64 +93,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));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
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));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
EXPECT_EQ(DispatchMode::ImmediateDispatch, aubCsr->peekDispatchMode());
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenItIsCreatedThenMemoryManagerIsNotNull) {
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
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);
|
||||
auto aubCsr2 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment);
|
||||
auto aubCsr1 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr2 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
EXPECT_EQ(aubCsr1->stream, aubCsr2->stream);
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenMultipleInstancesAreCreatedThenTheyUseTheSameFileStream) {
|
||||
auto aubCsr1 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment);
|
||||
auto aubCsr1 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto streamProvider1 = pDevice->executionEnvironment->rootDeviceEnvironments[0].aubCenter->getStreamProvider();
|
||||
EXPECT_NE(nullptr, streamProvider1);
|
||||
auto aubCsr2 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment);
|
||||
auto aubCsr2 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
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);
|
||||
auto aubCsr1 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto physicalAddressAlocator1 = pDevice->executionEnvironment->rootDeviceEnvironments[0].aubCenter->getPhysicalAddressAllocator();
|
||||
EXPECT_NE(nullptr, physicalAddressAlocator1);
|
||||
auto aubCsr2 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment);
|
||||
auto aubCsr2 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
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);
|
||||
auto aubCsr1 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto addressMapper1 = pDevice->executionEnvironment->rootDeviceEnvironments[0].aubCenter->getAddressMapper();
|
||||
EXPECT_NE(nullptr, addressMapper1);
|
||||
auto aubCsr2 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment);
|
||||
auto aubCsr2 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
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);
|
||||
auto aubCsr1 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto subCaptureCommon1 = pDevice->executionEnvironment->rootDeviceEnvironments[0].aubCenter->getSubCaptureCommon();
|
||||
EXPECT_NE(nullptr, subCaptureCommon1);
|
||||
auto aubCsr2 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment);
|
||||
auto aubCsr2 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto subCaptureCommon2 = pDevice->executionEnvironment->rootDeviceEnvironments[0].aubCenter->getSubCaptureCommon();
|
||||
EXPECT_NE(nullptr, subCaptureCommon2);
|
||||
EXPECT_EQ(subCaptureCommon1, subCaptureCommon2);
|
||||
@@ -163,7 +163,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)));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(static_cast<AUBCommandStreamReceiverHw<FamilyType> *>(AUBCommandStreamReceiver::create(fileName, true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex())));
|
||||
ASSERT_NE(nullptr, aubCsr);
|
||||
|
||||
EXPECT_TRUE(aubCsr->isFileOpen());
|
||||
@@ -179,7 +179,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)));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(static_cast<AUBCommandStreamReceiverHw<FamilyType> *>(AUBCommandStreamReceiver::create(fileName, true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex())));
|
||||
EXPECT_EQ(nullptr, aubCsr->hardwareContextController.get());
|
||||
|
||||
aubCsr->setupContext(osContext);
|
||||
@@ -196,7 +196,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)));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(static_cast<AUBCommandStreamReceiverHw<FamilyType> *>(AUBCommandStreamReceiver::create(fileName, true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex())));
|
||||
EXPECT_EQ(nullptr, aubCsr->hardwareContextController.get());
|
||||
|
||||
aubCsr->setupContext(osContext);
|
||||
@@ -209,14 +209,14 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptur
|
||||
std::string fileName = "file_name.aub";
|
||||
MockExecutionEnvironment executionEnvironment(platformDevices[0]);
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(static_cast<AUBCommandStreamReceiverHw<FamilyType> *>(AUBCommandStreamReceiver::create(fileName, true, executionEnvironment)));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(static_cast<AUBCommandStreamReceiverHw<FamilyType> *>(AUBCommandStreamReceiver::create(fileName, true, executionEnvironment, 0)));
|
||||
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));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
memoryManager.reset(new OsAgnosticMemoryManager(*pDevice->executionEnvironment));
|
||||
aubCsr->setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
auto gfxAllocation = memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{MemoryConstants::pageSize});
|
||||
@@ -256,8 +256,8 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenMultipl
|
||||
auto engineInstance = HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances()[0];
|
||||
MockOsContext osContext(0, 1, engineInstance, PreemptionMode::Disabled, false);
|
||||
|
||||
auto aubCsr1 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment);
|
||||
auto aubCsr2 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment);
|
||||
auto aubCsr1 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto aubCsr2 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
|
||||
aubCsr1->setupContext(osContext);
|
||||
aubCsr1->initializeEngine();
|
||||
@@ -718,7 +718,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));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
aubCsr->setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
memoryManager.reset(new OsAgnosticMemoryManager(*pDevice->executionEnvironment));
|
||||
|
||||
@@ -749,7 +749,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));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
memoryManager.reset(new OsAgnosticMemoryManager(*pDevice->executionEnvironment));
|
||||
aubCsr->setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
|
||||
@@ -770,7 +770,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));
|
||||
std::unique_ptr<MockAubCsrToTestDumpAubNonWritable<FamilyType>> aubCsr(new MockAubCsrToTestDumpAubNonWritable<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
memoryManager.reset(new OsAgnosticMemoryManager(*pDevice->executionEnvironment));
|
||||
aubCsr->setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
|
||||
@@ -795,7 +795,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));
|
||||
std::unique_ptr<MockAubCsrToTestDumpAubNonWritable<FamilyType>> aubCsr(new MockAubCsrToTestDumpAubNonWritable<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
memoryManager.reset(new OsAgnosticMemoryManager(*pDevice->executionEnvironment));
|
||||
aubCsr->setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
|
||||
@@ -819,7 +819,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenProcess
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenOsContextWithMultipleDevicesSupportedWhenSetupIsCalledThenCreateMultipleHardwareContexts) {
|
||||
MockOsContext osContext(1, getDeviceBitfieldForNDevices(2), aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false);
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment);
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
aubCsr->setupContext(osContext);
|
||||
|
||||
EXPECT_EQ(2u, aubCsr->hardwareContextController->hardwareContexts.size());
|
||||
@@ -827,7 +827,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));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
aubCsr->setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
|
||||
memoryManager.reset(new OsAgnosticMemoryManager(*pDevice->executionEnvironment));
|
||||
@@ -841,7 +841,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));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
memoryManager.reset(new OsAgnosticMemoryManager(*pDevice->executionEnvironment));
|
||||
aubCsr->setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
auto gfxAllocation = memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{MemoryConstants::pageSize});
|
||||
@@ -853,14 +853,14 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenGraphic
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenGraphicsAllocationSizeIsZeroThenWriteMemoryIsNotAllowed) {
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
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);
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
aubCsr->setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
size_t size = 100;
|
||||
auto ptr = std::make_unique<char[]>(size);
|
||||
@@ -871,7 +871,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenAllocat
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenAllocationSizeInAllocationViewIsZeroThenWriteMemoryIsNotAllowed) {
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment);
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
AllocationView allocationView(0x1234, 0);
|
||||
aubCsr->setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
EXPECT_FALSE(aubCsr->writeMemory(allocationView));
|
||||
@@ -881,7 +881,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)));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(static_cast<MockAubCsr<FamilyType> *>(AUBCommandStreamReceiver::create("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex())));
|
||||
EXPECT_NE(nullptr, aubCsr);
|
||||
|
||||
EXPECT_TRUE(aubCsr->isFileOpen());
|
||||
@@ -890,7 +890,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenAUBDump
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptureModeWhenAubSubCaptureIsActivatedThenFileIsOpened) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", false, *pDevice->executionEnvironment));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
@@ -912,7 +912,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptur
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptureModeWhenAubSubCaptureRemainsActivedThenTheSameFileShouldBeKeptOpened) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", false, *pDevice->executionEnvironment));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
@@ -937,7 +937,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptur
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptureModeWhenAubSubCaptureIsActivatedWithNewFileNameThenNewFileShouldBeReOpened) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", false, *pDevice->executionEnvironment));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::string newFileName = "new_file_name.aub";
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
@@ -966,7 +966,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptur
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptureModeWhenAubSubCaptureIsActivatedForNewFileThenOldEngineInfoShouldBeFreed) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", false, *pDevice->executionEnvironment));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::string newFileName = "new_file_name.aub";
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
@@ -995,7 +995,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptur
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptureModeWhenAubSubCaptureIsActivatedThenForceDumpingAllocationsAubNonWritable) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
std::unique_ptr<MockAubCsrToTestDumpAubNonWritable<FamilyType>> aubCsr(new MockAubCsrToTestDumpAubNonWritable<FamilyType>("", false, *pDevice->executionEnvironment));
|
||||
std::unique_ptr<MockAubCsrToTestDumpAubNonWritable<FamilyType>> aubCsr(new MockAubCsrToTestDumpAubNonWritable<FamilyType>("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
@@ -1015,7 +1015,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptur
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptureModeWhenAubSubCaptureRemainsActivatedThenDontForceDumpingAllocationsAubNonWritable) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
std::unique_ptr<MockAubCsrToTestDumpAubNonWritable<FamilyType>> aubCsr(new MockAubCsrToTestDumpAubNonWritable<FamilyType>("", false, *pDevice->executionEnvironment));
|
||||
std::unique_ptr<MockAubCsrToTestDumpAubNonWritable<FamilyType>> aubCsr(new MockAubCsrToTestDumpAubNonWritable<FamilyType>("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
@@ -1036,7 +1036,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptur
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptureModeWhenSubCaptureModeRemainsDeactivatedThenSubCaptureIsDisabled) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", false, *pDevice->executionEnvironment));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
@@ -1055,7 +1055,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptur
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptureModeWhenSubCaptureIsToggledOnThenSubCaptureGetsEnabled) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", false, *pDevice->executionEnvironment));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
@@ -1074,7 +1074,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptur
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInStandaloneAndSubCaptureModeWhenSubCaptureRemainsDeactivatedThenNeitherProgrammingFlagsAreInitializedNorCsrIsFlushed) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
@@ -1094,7 +1094,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInStandalon
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInStandaloneAndSubCaptureModeWhenSubCaptureRemainsActivatedThenNeitherProgrammingFlagsAreInitializedNorCsrIsFlushed) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
@@ -1114,7 +1114,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInStandalon
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInStandaloneAndSubCaptureModeWhenSubCaptureGetsActivatedThenProgrammingFlagsAreInitialized) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
@@ -1134,7 +1134,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInStandalon
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInStandaloneAndSubCaptureModeWhenSubCaptureGetsDeactivatedThenCsrIsFlushed) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
|
||||
@@ -36,7 +36,7 @@ using namespace NEO;
|
||||
using AubCommandStreamReceiverTests = Test<AubCommandStreamReceiverFixture>;
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenForcedBatchBufferFlatteningInImmediateDispatchModeThenNewCombinedBatchBufferIsCreated) {
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<MemoryManager> memoryManager(new OsAgnosticMemoryManager(*pDevice->executionEnvironment));
|
||||
auto flatBatchBufferHelper = new FlatBatchBufferHelperHw<FamilyType>(*pDevice->executionEnvironment);
|
||||
aubCsr->overwriteFlatBatchBufferHelper(flatBatchBufferHelper);
|
||||
@@ -65,7 +65,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenForcedB
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenForcedBatchBufferInImmediateDispatchModeAndNoChainedBatchBufferThenCombinedBatchBufferIsNotCreated) {
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<MemoryManager> memoryManager(new OsAgnosticMemoryManager(*pDevice->executionEnvironment));
|
||||
auto flatBatchBufferHelper = new FlatBatchBufferHelperHw<FamilyType>(*pDevice->executionEnvironment);
|
||||
aubCsr->overwriteFlatBatchBufferHelper(flatBatchBufferHelper);
|
||||
@@ -88,7 +88,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenForcedB
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenForcedBatchBufferAndNotImmediateOrBatchedDispatchModeThenCombinedBatchBufferIsNotCreated) {
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
std::unique_ptr<MemoryManager> memoryManager(new OsAgnosticMemoryManager(*pDevice->executionEnvironment));
|
||||
auto flatBatchBufferHelper = new FlatBatchBufferHelperHw<FamilyType>(*pDevice->executionEnvironment);
|
||||
aubCsr->overwriteFlatBatchBufferHelper(flatBatchBufferHelper);
|
||||
@@ -371,7 +371,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));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
|
||||
PatchInfoData patchInfo1(0xA000, 0u, PatchInfoAllocationType::KernelArg, 0x6000, 0x100, PatchInfoAllocationType::IndirectObjectHeap);
|
||||
PatchInfoData patchInfo2(0xB000, 0u, PatchInfoAllocationType::KernelArg, 0x6000, 0x200, PatchInfoAllocationType::IndirectObjectHeap);
|
||||
@@ -396,7 +396,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenAddBatc
|
||||
DebugManagerStateRestore dbgRestore;
|
||||
DebugManager.flags.FlattenBatchBufferForAUBDump.set(true);
|
||||
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
|
||||
MI_BATCH_BUFFER_START bbStart;
|
||||
|
||||
@@ -459,7 +459,7 @@ HWTEST_F(AubCommandStreamReceiverNoHostPtrTests, givenAubCommandStreamReceiverWh
|
||||
auto engineInstance = HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances()[0];
|
||||
|
||||
MockOsContext osContext(0, 1, engineInstance, PreemptionMode::Disabled, false);
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *executionEnvironment));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *executionEnvironment, 0));
|
||||
aubCsr->setupContext(osContext);
|
||||
|
||||
cl_image_desc imgDesc = {};
|
||||
@@ -490,7 +490,7 @@ HWTEST_F(AubCommandStreamReceiverNoHostPtrTests, givenAubCommandStreamReceiverWh
|
||||
auto memoryManager = new OsAgnosticMemoryManagerForImagesWithNoHostPtr(*executionEnvironment);
|
||||
executionEnvironment->memoryManager.reset(memoryManager);
|
||||
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *executionEnvironment));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *executionEnvironment, 0));
|
||||
auto osContext = memoryManager->createAndRegisterOsContext(aubCsr.get(), getChosenEngineType(**platformDevices), 0, PreemptionMode::Disabled, false);
|
||||
aubCsr->setupContext(*osContext);
|
||||
auto gfxAllocation = memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{MemoryConstants::pageSize});
|
||||
@@ -503,19 +503,19 @@ HWTEST_F(AubCommandStreamReceiverNoHostPtrTests, givenAubCommandStreamReceiverWh
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenNoDbgDeviceIdFlagWhenAubCsrIsCreatedThenUseDefaultDeviceId) {
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
EXPECT_EQ(pDevice->executionEnvironment->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));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
EXPECT_EQ(9u, aubCsr->aubDeviceId);
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenGetGTTDataIsCalledThenLocalMemoryIsSetAccordingToCsrFeature) {
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
AubGTTData data = {};
|
||||
aubCsr->getGTTData(nullptr, data);
|
||||
EXPECT_TRUE(data.present);
|
||||
@@ -541,7 +541,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenPhysicalAddressWhenSetGttEntryIsCal
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, whenGetMemoryBankForGttIsCalledThenCorrectBankIsReturned) {
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
aubCsr->localMemoryEnabled = false;
|
||||
|
||||
aubCsr->setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
@@ -550,7 +550,7 @@ HWTEST_F(AubCommandStreamReceiverTests, whenGetMemoryBankForGttIsCalledThenCorre
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenEntryBitsPresentAndWritableWhenGetAddressSpaceFromPTEBitsIsCalledThenTraceNonLocalIsReturned) {
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment));
|
||||
std::unique_ptr<MockAubCsr<FamilyType>> aubCsr(new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
|
||||
auto space = aubCsr->getAddressSpaceFromPTEBits(PageTableEntry::presentBit | PageTableEntry::writableBit);
|
||||
EXPECT_EQ(AubMemDump::AddressSpaceValues::TraceNonlocal, space);
|
||||
@@ -575,7 +575,7 @@ struct MockAubCsrToTestExternalAllocations : public AUBCommandStreamReceiverHw<G
|
||||
};
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenMakeResidentExternalIsCalledThenGivenAllocationViewShouldBeAddedToExternalAllocations) {
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestExternalAllocations<FamilyType>>("", true, *pDevice->executionEnvironment);
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestExternalAllocations<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
size_t size = 100;
|
||||
auto ptr = std::make_unique<char[]>(size);
|
||||
auto addr = reinterpret_cast<uint64_t>(ptr.get());
|
||||
@@ -589,7 +589,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenMakeRes
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenMakeNonResidentExternalIsCalledThenMatchingAllocationViewShouldBeRemovedFromExternalAllocations) {
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestExternalAllocations<FamilyType>>("", true, *pDevice->executionEnvironment);
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestExternalAllocations<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
size_t size = 100;
|
||||
auto ptr = std::make_unique<char[]>(size);
|
||||
auto addr = reinterpret_cast<uint64_t>(ptr.get());
|
||||
@@ -602,7 +602,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenMakeNon
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenMakeNonResidentExternalIsCalledThenNonMatchingAllocationViewShouldNotBeRemovedFromExternalAllocations) {
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestExternalAllocations<FamilyType>>("", true, *pDevice->executionEnvironment);
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestExternalAllocations<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
size_t size = 100;
|
||||
auto ptr = std::make_unique<char[]>(size);
|
||||
auto addr = reinterpret_cast<uint64_t>(ptr.get());
|
||||
@@ -615,7 +615,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenMakeNon
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenProcessResidencyIsCalledThenExternalAllocationsShouldBeMadeResident) {
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestExternalAllocations<FamilyType>>("", true, *pDevice->executionEnvironment);
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestExternalAllocations<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
size_t size = 100;
|
||||
auto ptr = std::make_unique<char[]>(size);
|
||||
auto addr = reinterpret_cast<uint64_t>(ptr.get());
|
||||
@@ -633,7 +633,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenProcess
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenProcessResidencyIsCalledThenExternalAllocationWithZeroSizeShouldNotBeMadeResident) {
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestExternalAllocations<FamilyType>>("", true, *pDevice->executionEnvironment);
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestExternalAllocations<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
AllocationView externalAllocation(0, 0);
|
||||
aubCsr->makeResidentExternal(externalAllocation);
|
||||
|
||||
@@ -650,7 +650,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);
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
aubCsr->setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
std::unique_ptr<MemoryManager> memoryManager(new OsAgnosticMemoryManager(*pDevice->executionEnvironment));
|
||||
|
||||
@@ -689,7 +689,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenWriteMe
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, whenAubCommandStreamReceiverIsCreatedThenPPGTTAndGGTTCreatedHavePhysicalAddressAllocatorSet) {
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", false, *pDevice->executionEnvironment);
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
ASSERT_NE(nullptr, aubCsr->ppgtt.get());
|
||||
ASSERT_NE(nullptr, aubCsr->ggtt.get());
|
||||
|
||||
@@ -707,7 +707,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenEngineI
|
||||
MockExecutionEnvironment executionEnvironment(platformDevices[0]);
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestDumpContext<FamilyType>>("", true, executionEnvironment);
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestDumpContext<FamilyType>>("", true, executionEnvironment, 0);
|
||||
EXPECT_NE(nullptr, aubCsr);
|
||||
EXPECT_EQ(nullptr, aubCsr->hardwareContextController.get());
|
||||
aubCsr->aubManager = nullptr;
|
||||
@@ -723,7 +723,7 @@ HWTEST_F(InjectMmmioTest, givenAddMmioKeySetToZeroWhenInitAdditionalMmioCalledTh
|
||||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.AubDumpAddMmioRegistersList.set("");
|
||||
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestDumpContext<FamilyType>>("", true, *pDevice->executionEnvironment);
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestDumpContext<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
EXPECT_NE(nullptr, aubCsr);
|
||||
|
||||
auto stream = std::make_unique<MockAubFileStreamMockMmioWrite>();
|
||||
@@ -740,7 +740,7 @@ HWTEST_F(InjectMmmioTest, givenAddMmioRegistersListSetWhenInitAdditionalMmioCall
|
||||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.AubDumpAddMmioRegistersList.set(registers);
|
||||
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestDumpContext<FamilyType>>("", true, *pDevice->executionEnvironment);
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestDumpContext<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
EXPECT_NE(nullptr, aubCsr);
|
||||
|
||||
auto stream = std::make_unique<MockAubFileStreamMockMmioWrite>();
|
||||
@@ -757,7 +757,7 @@ HWTEST_F(InjectMmmioTest, givenLongSequenceOfAddMmioRegistersListSetWhenInitAddi
|
||||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.AubDumpAddMmioRegistersList.set(registers);
|
||||
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestDumpContext<FamilyType>>("", true, *pDevice->executionEnvironment);
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestDumpContext<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
EXPECT_NE(nullptr, aubCsr);
|
||||
|
||||
auto stream = std::make_unique<MockAubFileStreamMockMmioWrite>();
|
||||
@@ -775,7 +775,7 @@ HWTEST_F(InjectMmmioTest, givenSequenceWithIncompletePairOfAddMmioRegistersListS
|
||||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.AubDumpAddMmioRegistersList.set(registers);
|
||||
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestDumpContext<FamilyType>>("", true, *pDevice->executionEnvironment);
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestDumpContext<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
EXPECT_NE(nullptr, aubCsr);
|
||||
|
||||
auto stream = std::make_unique<MockAubFileStreamMockMmioWrite>();
|
||||
@@ -794,7 +794,7 @@ HWTEST_F(InjectMmmioTest, givenAddMmioRegistersListSetWithSemicolonAtTheEndWhenI
|
||||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.AubDumpAddMmioRegistersList.set(registers);
|
||||
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestDumpContext<FamilyType>>("", true, *pDevice->executionEnvironment);
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestDumpContext<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
EXPECT_NE(nullptr, aubCsr);
|
||||
|
||||
auto stream = std::make_unique<MockAubFileStreamMockMmioWrite>();
|
||||
@@ -811,7 +811,7 @@ HWTEST_F(InjectMmmioTest, givenAddMmioRegistersListSetWithInvalidValueWhenInitAd
|
||||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.AubDumpAddMmioRegistersList.set(registers);
|
||||
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestDumpContext<FamilyType>>("", true, *pDevice->executionEnvironment);
|
||||
auto aubCsr = std::make_unique<MockAubCsrToTestDumpContext<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
EXPECT_NE(nullptr, aubCsr);
|
||||
|
||||
auto stream = std::make_unique<MockAubFileStreamMockMmioWrite>();
|
||||
@@ -838,7 +838,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());
|
||||
MyMockAubCsr myMockCsr(std::string(), true, *pDevice->getExecutionEnvironment(), pDevice->getRootDeviceIndex());
|
||||
myMockCsr.setupContext(pDevice->getExecutionEnvironment()->rootDeviceEnvironments[0].commandStreamReceivers[0][0]->getOsContext());
|
||||
myMockCsr.stream = mockStream.get();
|
||||
|
||||
@@ -852,17 +852,17 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCsrWhenAskedForMemoryExpectation
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenObtainingPreferredTagPoolSizeThenReturnOne) {
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment);
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
EXPECT_EQ(1u, aubCsr->getPreferredTagPoolSize());
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenSshSizeIsObtainedItEqualsTo64KB) {
|
||||
auto aubCsr = std::make_unique<MockAubCsr<FamilyType>>("", true, *pDevice->executionEnvironment);
|
||||
auto aubCsr = std::make_unique<MockAubCsr<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
EXPECT_EQ(64 * KB, aubCsr->defaultSshSize);
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenPhysicalAddressAllocatorIsCreatedThenItIsNotNull) {
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment);
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
std::unique_ptr<PhysicalAddressAllocator> allocator(aubCsr.createPhysicalAddressAllocator(&hardwareInfo));
|
||||
ASSERT_NE(nullptr, allocator);
|
||||
}
|
||||
@@ -871,7 +871,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenGraphicsAllocationWritableWhenDumpA
|
||||
DebugManagerStateRestore dbgRestore;
|
||||
DebugManager.flags.AUBDumpBufferFormat.set("BIN");
|
||||
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment);
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
|
||||
@@ -897,7 +897,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenCompressedGraphicsAllocationWritabl
|
||||
mockAubCenter->aubManager = std::make_unique<MockAubManager>();
|
||||
|
||||
pDevice->executionEnvironment->rootDeviceEnvironments[0].aubCenter.reset(mockAubCenter);
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment);
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
|
||||
@@ -918,7 +918,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenCompressedGraphicsAllocationWritabl
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenGraphicsAllocationWritableWhenDumpAllocationIsCalledButDumpFormatIsNotSpecifiedThenGraphicsAllocationShouldNotBeDumped) {
|
||||
DebugManagerStateRestore dbgRestore;
|
||||
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment);
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
|
||||
@@ -941,7 +941,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenGraphicsAllocationNonWritableWhenDu
|
||||
DebugManagerStateRestore dbgRestore;
|
||||
DebugManager.flags.AUBDumpBufferFormat.set("BIN");
|
||||
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment);
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
|
||||
@@ -965,7 +965,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenGraphicsAllocationNotDumpableWhenDu
|
||||
DebugManager.flags.AUBDumpAllocsOnEnqueueReadOnly.set(true);
|
||||
DebugManager.flags.AUBDumpBufferFormat.set("BIN");
|
||||
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment);
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
|
||||
@@ -990,7 +990,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenGraphicsAllocationDumpableWhenDumpA
|
||||
DebugManager.flags.AUBDumpAllocsOnEnqueueReadOnly.set(true);
|
||||
DebugManager.flags.AUBDumpBufferFormat.set("BIN");
|
||||
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment);
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
|
||||
@@ -1014,7 +1014,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenGraphicsAllocationWritableWhenDumpA
|
||||
DebugManagerStateRestore dbgRestore;
|
||||
DebugManager.flags.AUBDumpBufferFormat.set("BIN");
|
||||
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment);
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
aubCsr.latestSentTaskCount = 1;
|
||||
|
||||
@@ -38,7 +38,7 @@ using ::testing::Return;
|
||||
using AubFileStreamTests = Test<AubCommandStreamReceiverFixture>;
|
||||
|
||||
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenInitFileIsCalledWithInvalidFileNameThenFileIsNotOpened) {
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment);
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
std::string invalidFileName = "";
|
||||
|
||||
EXPECT_THROW(aubCsr->initFile(invalidFileName), std::exception);
|
||||
@@ -47,7 +47,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenInitFileIsCalledWi
|
||||
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWithoutAubManagerWhenInitFileIsCalledWithInvalidFileNameThenFileIsNotOpened) {
|
||||
MockExecutionEnvironment executionEnvironment(platformDevices[0]);
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, executionEnvironment);
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, executionEnvironment, 0);
|
||||
std::string invalidFileName = "";
|
||||
aubCsr->aubManager = nullptr;
|
||||
|
||||
@@ -55,7 +55,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWithoutAubManagerWhenI
|
||||
}
|
||||
|
||||
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenInitFileIsCalledThenFileIsOpenedAndFileNameIsStored) {
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment);
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
std::string fileName = "file_name.aub";
|
||||
|
||||
aubCsr->initFile(fileName);
|
||||
@@ -68,7 +68,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenInitFileIsCalledTh
|
||||
}
|
||||
|
||||
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenReopenFileIsCalledThenFileWithSpecifiedNameIsReopened) {
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment);
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
std::string fileName = "file_name.aub";
|
||||
std::string newFileName = "new_file_name.aub";
|
||||
|
||||
@@ -83,7 +83,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);
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
std::string fileName = "file_name.aub";
|
||||
aubCsr->aubManager = nullptr;
|
||||
aubCsr->stream = mockAubFileStream.get();
|
||||
@@ -97,7 +97,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);
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
std::string fileName = "file_name.aub";
|
||||
aubCsr->aubManager = mockAubManager.get();
|
||||
|
||||
@@ -109,7 +109,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);
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
std::string fileName = "file_name.aub";
|
||||
aubCsr->aubManager = nullptr;
|
||||
aubCsr->stream = mockAubFileStream.get();
|
||||
@@ -131,7 +131,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);
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
std::string fileName = "file_name.aub";
|
||||
aubCsr->aubManager = mockAubManager.get();
|
||||
|
||||
@@ -152,7 +152,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);
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
std::string fileName = "file_name.aub";
|
||||
|
||||
aubCsr->stream = mockAubFileStream.get();
|
||||
@@ -163,7 +163,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);
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
std::string fileName = "file_name.aub";
|
||||
|
||||
aubCsr->stream = mockAubFileStream.get();
|
||||
@@ -297,7 +297,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenCallingAddAubComme
|
||||
}
|
||||
|
||||
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWithAubManagerWhenCallingAddAubCommentThenCallAddCommentOnAubManager) {
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment);
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
auto mockAubManager = static_cast<MockAubManager *>(aubCsr.aubManager);
|
||||
@@ -378,7 +378,7 @@ HWTEST_F(AubFileStreamTests, givenNoNewTaskSinceLastPollWhenDeletingAubCsrThenDo
|
||||
}
|
||||
|
||||
HWTEST_F(AubFileStreamTests, givenNewTasksAndHardwareContextPresentWhenCallingPollForCompletionThenCallPollForCompletion) {
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment);
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
auto hardwareContext = static_cast<MockHardwareContext *>(aubCsr.hardwareContextController->hardwareContexts[0].get());
|
||||
@@ -392,7 +392,7 @@ HWTEST_F(AubFileStreamTests, givenNewTasksAndHardwareContextPresentWhenCallingPo
|
||||
}
|
||||
|
||||
HWTEST_F(AubFileStreamTests, givenNoNewTasksAndHardwareContextPresentWhenCallingPollForCompletionThenDontCallPollForCompletion) {
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment);
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
auto hardwareContext = static_cast<MockHardwareContext *>(aubCsr.hardwareContextController->hardwareContexts[0].get());
|
||||
@@ -491,7 +491,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWithHardwareContextInS
|
||||
DebugManagerStateRestore stateRestore;
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto aubSubCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment);
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
auto hardwareContext = static_cast<MockHardwareContext *>(aubCsr.hardwareContextController->hardwareContexts[0].get());
|
||||
@@ -518,7 +518,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWithHardwareContextInS
|
||||
DebugManagerStateRestore stateRestore;
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto aubSubCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment);
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
auto hardwareContext = static_cast<MockHardwareContext *>(aubCsr.hardwareContextController->hardwareContexts[0].get());
|
||||
@@ -569,7 +569,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenExpectMemoryNotEqu
|
||||
}
|
||||
|
||||
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenFlushIsCalledThenItShouldCallTheExpectedHwContextFunctions) {
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment);
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
auto mockHardwareContext = static_cast<MockHardwareContext *>(aubCsr.hardwareContextController->hardwareContexts[0].get());
|
||||
@@ -593,7 +593,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenFlushIsCalledThenI
|
||||
}
|
||||
|
||||
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenFlushIsCalledWithZeroSizedBufferThenSubmitIsNotCalledOnHwContext) {
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment);
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
auto mockHardwareContext = static_cast<MockHardwareContext *>(aubCsr.hardwareContextController->hardwareContexts[0].get());
|
||||
@@ -613,7 +613,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenFlushIsCalledWithZ
|
||||
}
|
||||
|
||||
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenMakeResidentIsCalledThenItShouldCallTheExpectedHwContextFunctions) {
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment);
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
|
||||
@@ -625,7 +625,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenMakeResidentIsCall
|
||||
}
|
||||
|
||||
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenExpectMemoryEqualIsCalledThenItShouldCallTheExpectedHwContextFunctions) {
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment);
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
auto mockHardwareContext = static_cast<MockHardwareContext *>(aubCsr.hardwareContextController->hardwareContexts[0].get());
|
||||
@@ -637,7 +637,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenExpectMemoryEqualI
|
||||
}
|
||||
|
||||
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenExpectMemoryNotEqualIsCalledThenItShouldCallTheExpectedHwContextFunctions) {
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment);
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
auto mockHardwareContext = static_cast<MockHardwareContext *>(aubCsr.hardwareContextController->hardwareContexts[0].get());
|
||||
@@ -665,7 +665,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);
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
aubCsr->setupContext(pDevice->executionEnvironment->rootDeviceEnvironments[0].commandStreamReceivers[0][0]->getOsContext());
|
||||
|
||||
aubCsr->stream = mockAubFileStream.get();
|
||||
@@ -685,7 +685,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);
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>(fileName.c_str(), true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
|
||||
aubCsr->aubManager = nullptr;
|
||||
aubCsr->stream = mockAubFileStream.get();
|
||||
@@ -702,7 +702,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);
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>(fileName.c_str(), true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
|
||||
aubCsr->stream = mockAubFileStream.get();
|
||||
aubCsr->setupContext(pDevice->executionEnvironment->rootDeviceEnvironments[0].commandStreamReceivers[0][0]->getOsContext());
|
||||
|
||||
@@ -193,7 +193,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeAndMidThread
|
||||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInDefaultModeAndMidThreadPreemptionWhenFlushTaskIsCalledThenSipKernelIsMadeResident) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
@@ -240,7 +240,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenDeviceWithThreadGroupPreempti
|
||||
DebugManagerStateRestore dbgRestore;
|
||||
DebugManager.flags.ForcePreemptionMode.set(static_cast<int32_t>(PreemptionMode::ThreadGroup));
|
||||
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->setPreemptionMode(PreemptionMode::ThreadGroup);
|
||||
pDevice->resetCommandStreamReceiver(commandStreamReceiver);
|
||||
|
||||
@@ -764,8 +764,8 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, flushTaskWithOnlyEnoughMemoryForPr
|
||||
|
||||
template <typename FamilyType>
|
||||
struct CommandStreamReceiverHwLog : public UltCommandStreamReceiver<FamilyType> {
|
||||
CommandStreamReceiverHwLog(ExecutionEnvironment &executionEnvironment) : UltCommandStreamReceiver<FamilyType>(executionEnvironment),
|
||||
flushCount(0) {
|
||||
CommandStreamReceiverHwLog(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) : UltCommandStreamReceiver<FamilyType>(executionEnvironment, rootDeviceIndex),
|
||||
flushCount(0) {
|
||||
}
|
||||
|
||||
FlushStamp flush(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency) override {
|
||||
@@ -777,7 +777,7 @@ struct CommandStreamReceiverHwLog : public UltCommandStreamReceiver<FamilyType>
|
||||
};
|
||||
|
||||
HWTEST_F(CommandStreamReceiverFlushTaskTests, flushTaskWithBothCSCallsFlushOnce) {
|
||||
CommandStreamReceiverHwLog<FamilyType> commandStreamReceiver(*pDevice->executionEnvironment);
|
||||
CommandStreamReceiverHwLog<FamilyType> commandStreamReceiver(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
commandStreamReceiver.initializeTagAllocation();
|
||||
commandStreamReceiver.createPreemptionAllocation();
|
||||
commandStream.getSpace(sizeof(typename FamilyType::MI_NOOP));
|
||||
@@ -873,7 +873,7 @@ HWTEST_F(CommandStreamReceiverCQFlushTaskTests, getCSShouldReturnACSWithEnoughSi
|
||||
HWTEST_F(CommandStreamReceiverFlushTaskTests, blockingFlushTaskWithOnlyPipeControl) {
|
||||
typedef typename FamilyType::PIPE_CONTROL PIPE_CONTROL;
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(commandStreamReceiver);
|
||||
|
||||
// Configure the CSR to not need to submit any state or commands
|
||||
|
||||
@@ -359,7 +359,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests,
|
||||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverFlushTaskTests, givenDefaultCommandStreamReceiverThenRoundRobinPolicyIsSelected) {
|
||||
MockCsrHw<FamilyType> commandStreamReceiver(*pDevice->executionEnvironment);
|
||||
MockCsrHw<FamilyType> commandStreamReceiver(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
EXPECT_EQ(PreambleHelper<FamilyType>::getDefaultThreadArbitrationPolicy(), commandStreamReceiver.peekThreadArbitrationPolicy());
|
||||
}
|
||||
|
||||
@@ -369,7 +369,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenKernelWithSlmWhenPreviousSLML
|
||||
MockContext ctx(pDevice);
|
||||
MockKernelWithInternals kernel(*pDevice);
|
||||
CommandQueueHw<FamilyType> commandQueue(&ctx, pDevice, 0);
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(commandStreamReceiver);
|
||||
|
||||
auto &commandStreamCSR = commandStreamReceiver->getCS();
|
||||
@@ -394,7 +394,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenKernelWithSlmWhenPreviousSLML
|
||||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverFlushTaskTests, CreateCommandStreamReceiverHw) {
|
||||
auto csrHw = CommandStreamReceiverHw<FamilyType>::create(*pDevice->executionEnvironment);
|
||||
auto csrHw = CommandStreamReceiverHw<FamilyType>::create(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
EXPECT_NE(nullptr, csrHw);
|
||||
|
||||
GmmPageTableMngr *ptm = csrHw->createPageTableManager();
|
||||
@@ -405,14 +405,14 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, CreateCommandStreamReceiverHw) {
|
||||
int32_t GetCsr = DebugManager.flags.SetCommandStreamReceiver.get();
|
||||
EXPECT_EQ(0, GetCsr);
|
||||
|
||||
auto csr = NEO::createCommandStream(*pDevice->executionEnvironment);
|
||||
auto csr = NEO::createCommandStream(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
EXPECT_NE(nullptr, csr);
|
||||
delete csr;
|
||||
DebugManager.flags.SetCommandStreamReceiver.set(0);
|
||||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverFlushTaskTests, handleTagAndScratchAllocationsResidencyOnEachFlush) {
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(commandStreamReceiver);
|
||||
|
||||
commandStreamReceiver->setRequiredScratchSizes(1024, 0); // whatever > 0
|
||||
@@ -474,7 +474,7 @@ struct MockScratchController : public ScratchSpaceController {
|
||||
};
|
||||
|
||||
HWTEST_F(CommandStreamReceiverFlushTaskTests, whenScratchIsRequiredForFirstFlushAndPrivateScratchForSecondFlushThenHandleResidencyProperly) {
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto scratchController = new MockScratchController(*pDevice->executionEnvironment, *commandStreamReceiver->getInternalAllocationStorage());
|
||||
commandStreamReceiver->scratchSpaceController.reset(scratchController);
|
||||
pDevice->resetCommandStreamReceiver(commandStreamReceiver);
|
||||
@@ -509,7 +509,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, whenScratchIsRequiredForFirstFlush
|
||||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverFlushTaskTests, whenPrivateScratchIsRequiredForFirstFlushAndCommonScratchForSecondFlushThenHandleResidencyProperly) {
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto scratchController = new MockScratchController(*pDevice->executionEnvironment, *commandStreamReceiver->getInternalAllocationStorage());
|
||||
commandStreamReceiver->scratchSpaceController.reset(scratchController);
|
||||
pDevice->resetCommandStreamReceiver(commandStreamReceiver);
|
||||
@@ -551,7 +551,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests, givenTwoConsecu
|
||||
MockContext ctx(pDevice);
|
||||
MockKernelWithInternals kernel(*pDevice);
|
||||
CommandQueueHw<FamilyType> commandQueue(&ctx, pDevice, 0);
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(commandStreamReceiver);
|
||||
|
||||
size_t GWS = 1;
|
||||
@@ -665,7 +665,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests, givenNDRangeKer
|
||||
MockContext ctx(pDevice);
|
||||
MockKernelWithInternals kernel(*pDevice);
|
||||
CommandQueueHw<FamilyType> commandQueue(&ctx, pDevice, 0);
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(commandStreamReceiver);
|
||||
|
||||
size_t GWS = 1;
|
||||
@@ -781,7 +781,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, InForced32BitAllocationsModeDoNotS
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.Force32bitAddressing.set(true);
|
||||
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
|
||||
pDevice->getMemoryManager()->setForce32BitAllocations(true);
|
||||
|
||||
@@ -815,7 +815,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, InForced32BitAllocationsModeStore3
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.Force32bitAddressing.set(true);
|
||||
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
|
||||
pDevice->getMemoryManager()->setForce32BitAllocations(true);
|
||||
|
||||
@@ -1057,7 +1057,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInNonDirtyStateWhenflushTa
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
configureCSRtoNonDirtyState<FamilyType>();
|
||||
@@ -1081,7 +1081,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInNonDirtyStateAndBatching
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
|
||||
@@ -32,7 +32,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenFlushTas
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
@@ -89,7 +89,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeAndTwoRecord
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
@@ -140,7 +140,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeAndThreeReco
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
@@ -202,7 +202,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeAndThreeReco
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
@@ -270,7 +270,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenFlushTas
|
||||
auto initialBase = commandStream.getCpuBase();
|
||||
auto initialUsed = commandStream.getUsed();
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
@@ -343,7 +343,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenRecorded
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
@@ -412,7 +412,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenRecorded
|
||||
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));
|
||||
std::unique_ptr<MockCsrHw2<FamilyType>> mockCsr(new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
EXPECT_EQ(DispatchMode::AdaptiveDispatch, mockCsr->dispatchMode);
|
||||
}
|
||||
|
||||
@@ -420,7 +420,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenBlocking
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
@@ -448,7 +448,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenBlocking
|
||||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverFlushTaskTests, givenBufferToFlushWhenFlushTaskCalledThenUpdateFlushStamp) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
commandStream.getSpace(1);
|
||||
@@ -461,7 +461,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenBufferToFlushWhenFlushTaskCal
|
||||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverFlushTaskTests, givenNothingToFlushWhenFlushTaskCalledThenDontFlushStamp) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
configureCSRtoNonDirtyState<FamilyType>();
|
||||
@@ -478,7 +478,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenFlushTas
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
@@ -532,7 +532,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenWaitForT
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
@@ -572,7 +572,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenEnqueueI
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
@@ -612,7 +612,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenSusbsequ
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
@@ -670,7 +670,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenTotalRes
|
||||
ExecutionEnvironment *executionEnvironment = platformImpl->peekExecutionEnvironment();
|
||||
auto mockedMemoryManager = new MockedMemoryManager(*executionEnvironment);
|
||||
executionEnvironment->memoryManager.reset(mockedMemoryManager);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*executionEnvironment, 0);
|
||||
executionEnvironment->rootDeviceEnvironments[0].commandStreamReceivers.resize(1);
|
||||
executionEnvironment->rootDeviceEnvironments[0].commandStreamReceivers[0].push_back(std::unique_ptr<CommandStreamReceiver>(mockCsr));
|
||||
|
||||
@@ -732,7 +732,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests,
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
@@ -813,7 +813,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenDcFlushI
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
@@ -841,7 +841,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenCommandA
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
@@ -872,7 +872,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWithOutOfOrd
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
@@ -903,7 +903,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenDcFlushI
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
@@ -936,7 +936,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenEpiloguePipeControlThenDcFlus
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
@@ -975,7 +975,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenEpiloguePipeControlWhendDcFlu
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
@@ -1010,7 +1010,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests,
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->timestampPacketWriteEnabled = false;
|
||||
|
||||
@@ -1069,7 +1069,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeAndOoqFlagSe
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
@@ -1108,7 +1108,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenPipeCont
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
@@ -1170,7 +1170,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests,
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
@@ -1311,7 +1311,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenDispatchFlagsWithThrottleSetT
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
@@ -1343,7 +1343,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenDispatchFlagsWithThrottleSetT
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
@@ -1375,7 +1375,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCommandQueueWithThrottleHintW
|
||||
cl_queue_properties properties[] = {CL_QUEUE_THROTTLE_KHR, CL_QUEUE_THROTTLE_LOW_KHR, 0};
|
||||
CommandQueueHw<FamilyType> commandQueue(&context, pDevice, properties);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
cl_int retVal = CL_SUCCESS;
|
||||
@@ -1392,7 +1392,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenDispatchFlagsWithThrottleSetT
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
@@ -1472,7 +1472,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenDispatchFlagsWithNewSliceCoun
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
@@ -1505,7 +1505,7 @@ class UltCommandStreamReceiverForDispatchFlags : public UltCommandStreamReceiver
|
||||
using BaseClass = UltCommandStreamReceiver<GfxFamily>;
|
||||
|
||||
public:
|
||||
UltCommandStreamReceiverForDispatchFlags(ExecutionEnvironment &executionEnvironment) : BaseClass(executionEnvironment) {}
|
||||
UltCommandStreamReceiverForDispatchFlags(ExecutionEnvironment &executionEnvironment) : BaseClass(executionEnvironment, 0) {}
|
||||
|
||||
CompletionStamp flushTask(LinearStream &commandStream, size_t commandStreamStart,
|
||||
const IndirectHeap &dsh, const IndirectHeap &ioh, const IndirectHeap &ssh,
|
||||
|
||||
@@ -62,7 +62,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskGmockTests, givenCsrInBatchingModeThreeRe
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockHelper = new MockFlatBatchBufferHelper<FamilyType>(*pDevice->executionEnvironment);
|
||||
mockCsr->overwriteFlatBatchBufferHelper(mockHelper);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
@@ -129,7 +129,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskGmockTests, givenMockCommandStreamerWhenA
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockHelper = new MockFlatBatchBufferHelper<FamilyType>(*pDevice->executionEnvironment);
|
||||
mockCsr->overwriteFlatBatchBufferHelper(mockHelper);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
@@ -156,7 +156,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskGmockTests, givenMockCommandStreamerWhenA
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto mockHelper = new MockFlatBatchBufferHelper<FamilyType>(*pDevice->executionEnvironment);
|
||||
mockCsr->overwriteFlatBatchBufferHelper(mockHelper);
|
||||
|
||||
@@ -207,7 +207,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));
|
||||
std::unique_ptr<MockCsrHw2<FamilyType>> mockCsr(new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
auto mockHelper = new MockFlatBatchBufferHelper<FamilyType>(*pDevice->executionEnvironment);
|
||||
mockCsr->overwriteFlatBatchBufferHelper(mockHelper);
|
||||
|
||||
@@ -262,7 +262,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskGmockTests, givenPatch
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
std::unique_ptr<MockCsrHw2<FamilyType>> mockCsr(new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment));
|
||||
std::unique_ptr<MockCsrHw2<FamilyType>> mockCsr(new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
mockCsr->overwriteFlatBatchBufferHelper(new MockFlatBatchBufferHelper<FamilyType>(*pDevice->executionEnvironment));
|
||||
|
||||
bool stateBaseAddressDirty;
|
||||
@@ -281,7 +281,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskGmockTests, givenPatch
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
std::unique_ptr<MockCsrHw2<FamilyType>> mockCsr(new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment));
|
||||
std::unique_ptr<MockCsrHw2<FamilyType>> mockCsr(new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
mockCsr->overwriteFlatBatchBufferHelper(new MockFlatBatchBufferHelper<FamilyType>(*pDevice->executionEnvironment));
|
||||
|
||||
bool stateBaseAddressDirty;
|
||||
@@ -302,7 +302,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskGmockTests, givenPatch
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
std::unique_ptr<MockCsrHw2<FamilyType>> mockCsr(new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment));
|
||||
std::unique_ptr<MockCsrHw2<FamilyType>> mockCsr(new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
mockCsr->overwriteFlatBatchBufferHelper(new MockFlatBatchBufferHelper<FamilyType>(*pDevice->executionEnvironment));
|
||||
|
||||
DispatchFlags flags = DispatchFlagsHelper::createDefaultDispatchFlags();
|
||||
|
||||
@@ -242,7 +242,7 @@ HWTEST_F(CommandStreamReceiverFlushTests, shouldAlignToCacheLineSize) {
|
||||
typedef Test<DeviceFixture> CommandStreamReceiverHwTest;
|
||||
|
||||
HWTEST_F(CommandStreamReceiverHwTest, givenCsrHwWhenTypeIsCheckedThenCsrHwIsReturned) {
|
||||
auto csr = std::unique_ptr<CommandStreamReceiver>(CommandStreamReceiverHw<FamilyType>::create(*pDevice->executionEnvironment));
|
||||
auto csr = std::unique_ptr<CommandStreamReceiver>(CommandStreamReceiverHw<FamilyType>::create(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
|
||||
EXPECT_EQ(CommandStreamReceiverType::CSR_HW, csr->getType());
|
||||
}
|
||||
@@ -253,7 +253,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverHwTest, WhenCommandStreamReceiv
|
||||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverHwTest, WhenScratchSpaceIsNotRequiredThenScratchAllocationIsNotCreated) {
|
||||
auto commandStreamReceiver = std::make_unique<MockCsrHw<FamilyType>>(*pDevice->executionEnvironment);
|
||||
auto commandStreamReceiver = std::make_unique<MockCsrHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto scratchController = commandStreamReceiver->getScratchSpaceController();
|
||||
|
||||
bool stateBaseAddressDirty = false;
|
||||
@@ -266,7 +266,7 @@ HWTEST_F(CommandStreamReceiverHwTest, WhenScratchSpaceIsNotRequiredThenScratchAl
|
||||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverHwTest, WhenScratchSpaceIsRequiredThenCorrectAddressIsReturned) {
|
||||
auto commandStreamReceiver = std::make_unique<MockCsrHw<FamilyType>>(*pDevice->executionEnvironment);
|
||||
auto commandStreamReceiver = std::make_unique<MockCsrHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto scratchController = commandStreamReceiver->getScratchSpaceController();
|
||||
|
||||
bool cfeStateDirty = false;
|
||||
@@ -282,7 +282,7 @@ HWTEST_F(CommandStreamReceiverHwTest, WhenScratchSpaceIsRequiredThenCorrectAddre
|
||||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverHwTest, WhenScratchSpaceIsNotRequiredThenGshAddressZeroIsReturned) {
|
||||
auto commandStreamReceiver = std::make_unique<MockCsrHw<FamilyType>>(*pDevice->executionEnvironment);
|
||||
auto commandStreamReceiver = std::make_unique<MockCsrHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
auto scratchController = commandStreamReceiver->getScratchSpaceController();
|
||||
|
||||
EXPECT_EQ(nullptr, scratchController->getScratchSpaceAllocation());
|
||||
@@ -564,7 +564,7 @@ HWTEST_F(BcsTests, whenBlitFromHostPtrCalledThenCallWaitWithKmdFallback) {
|
||||
uint32_t waitForTaskCountWithKmdNotifyFallbackCalled = 0;
|
||||
};
|
||||
|
||||
auto myMockCsr = std::make_unique<::testing::NiceMock<MyMockCsr>>(*pDevice->getExecutionEnvironment());
|
||||
auto myMockCsr = std::make_unique<::testing::NiceMock<MyMockCsr>>(*pDevice->getExecutionEnvironment(), pDevice->getRootDeviceIndex());
|
||||
auto &bcsOsContext = pDevice->getUltCommandStreamReceiver<FamilyType>().getOsContext();
|
||||
myMockCsr->initializeTagAllocation();
|
||||
myMockCsr->setupContext(bcsOsContext);
|
||||
|
||||
@@ -34,7 +34,7 @@ void CommandStreamReceiverHwTest<GfxFamily>::givenKernelWithSlmWhenPreviousNOSLM
|
||||
MockContext ctx(pDevice);
|
||||
MockKernelWithInternals kernel(*pDevice);
|
||||
CommandQueueHw<GfxFamily> commandQueue(&ctx, pDevice, 0);
|
||||
auto commandStreamReceiver = new MockCsrHw<GfxFamily>(*pDevice->executionEnvironment);
|
||||
auto commandStreamReceiver = new MockCsrHw<GfxFamily>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(commandStreamReceiver);
|
||||
|
||||
auto &commandStreamCSR = commandStreamReceiver->getCS();
|
||||
@@ -75,7 +75,7 @@ void CommandStreamReceiverHwTest<GfxFamily>::givenBlockedKernelWithSlmWhenPrevio
|
||||
MockContext ctx(pDevice);
|
||||
MockKernelWithInternals kernel(*pDevice);
|
||||
CommandQueueHw<GfxFamily> commandQueue(&ctx, pDevice, 0);
|
||||
auto commandStreamReceiver = new MockCsrHw<GfxFamily>(*pDevice->executionEnvironment);
|
||||
auto commandStreamReceiver = new MockCsrHw<GfxFamily>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(commandStreamReceiver);
|
||||
cl_event blockingEvent;
|
||||
MockEvent<UserEvent> mockEvent(&ctx);
|
||||
|
||||
@@ -228,7 +228,7 @@ HWTEST_F(CommandStreamReceiverTest, givenCsrWhenAllocateHeapMemoryIsCalledThenHe
|
||||
TEST(CommandStreamReceiverSimpleTest, givenCSRWithoutTagAllocationWhenGetTagAllocationIsCalledThenNullptrIsReturned) {
|
||||
ExecutionEnvironment executionEnvironment;
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
MockCommandStreamReceiver csr(executionEnvironment);
|
||||
MockCommandStreamReceiver csr(executionEnvironment, 0);
|
||||
EXPECT_EQ(nullptr, csr.getTagAllocation());
|
||||
}
|
||||
|
||||
@@ -236,16 +236,16 @@ HWTEST_F(CommandStreamReceiverTest, givenDebugVariableEnabledWhenCreatingCsrThen
|
||||
DebugManagerStateRestore restore;
|
||||
|
||||
DebugManager.flags.EnableTimestampPacket.set(true);
|
||||
CommandStreamReceiverHw<FamilyType> csr1(*pDevice->executionEnvironment);
|
||||
CommandStreamReceiverHw<FamilyType> csr1(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
EXPECT_TRUE(csr1.peekTimestampPacketWriteEnabled());
|
||||
|
||||
DebugManager.flags.EnableTimestampPacket.set(false);
|
||||
CommandStreamReceiverHw<FamilyType> csr2(*pDevice->executionEnvironment);
|
||||
CommandStreamReceiverHw<FamilyType> csr2(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
EXPECT_FALSE(csr2.peekTimestampPacketWriteEnabled());
|
||||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverTest, whenCsrIsCreatedThenUseTimestampPacketWriteIfPossible) {
|
||||
CommandStreamReceiverHw<FamilyType> csr(*pDevice->executionEnvironment);
|
||||
CommandStreamReceiverHw<FamilyType> csr(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
EXPECT_EQ(UnitTestHelper<FamilyType>::isTimestampPacketWriteSupported(), csr.peekTimestampPacketWriteEnabled());
|
||||
}
|
||||
|
||||
@@ -301,7 +301,7 @@ TEST(CommandStreamReceiverSimpleTest, givenCommandStreamReceiverWhenItIsDestroye
|
||||
mockGraphicsAllocation->destructorCalled = &destructorCalled;
|
||||
MockExecutionEnvironment executionEnvironment(*platformDevices);
|
||||
executionEnvironment.rootDeviceEnvironments[0].commandStreamReceivers.resize(1);
|
||||
executionEnvironment.rootDeviceEnvironments[0].commandStreamReceivers[0].push_back(std::make_unique<MockCommandStreamReceiver>(executionEnvironment));
|
||||
executionEnvironment.rootDeviceEnvironments[0].commandStreamReceivers[0].push_back(std::make_unique<MockCommandStreamReceiver>(executionEnvironment, 0));
|
||||
auto csr = executionEnvironment.rootDeviceEnvironments[0].commandStreamReceivers[0][0].get();
|
||||
executionEnvironment.memoryManager.reset(new OsAgnosticMemoryManager(executionEnvironment));
|
||||
csr->setTagAllocation(mockGraphicsAllocation);
|
||||
@@ -312,7 +312,7 @@ TEST(CommandStreamReceiverSimpleTest, givenCommandStreamReceiverWhenItIsDestroye
|
||||
|
||||
TEST(CommandStreamReceiverSimpleTest, givenCommandStreamReceiverWhenInitializeTagAllocationIsCalledThenTagAllocationIsBeingAllocated) {
|
||||
MockExecutionEnvironment executionEnvironment(*platformDevices);
|
||||
auto csr = new MockCommandStreamReceiver(executionEnvironment);
|
||||
auto csr = new MockCommandStreamReceiver(executionEnvironment, 0);
|
||||
executionEnvironment.rootDeviceEnvironments[0].commandStreamReceivers.resize(1);
|
||||
executionEnvironment.rootDeviceEnvironments[0].commandStreamReceivers[0].push_back(std::unique_ptr<CommandStreamReceiver>(csr));
|
||||
executionEnvironment.memoryManager.reset(new OsAgnosticMemoryManager(executionEnvironment));
|
||||
@@ -330,7 +330,7 @@ TEST(CommandStreamReceiverSimpleTest, givenNullHardwareDebugModeWhenInitializeTa
|
||||
DebugManager.flags.EnableNullHardware.set(true);
|
||||
MockExecutionEnvironment executionEnvironment(*platformDevices);
|
||||
executionEnvironment.rootDeviceEnvironments[0].commandStreamReceivers.resize(1);
|
||||
auto csr = new MockCommandStreamReceiver(executionEnvironment);
|
||||
auto csr = new MockCommandStreamReceiver(executionEnvironment, 0);
|
||||
executionEnvironment.rootDeviceEnvironments[0].commandStreamReceivers[0].push_back(std::unique_ptr<CommandStreamReceiver>(csr));
|
||||
executionEnvironment.memoryManager.reset(new OsAgnosticMemoryManager(executionEnvironment));
|
||||
EXPECT_EQ(nullptr, csr->getTagAllocation());
|
||||
@@ -344,7 +344,7 @@ TEST(CommandStreamReceiverSimpleTest, givenNullHardwareDebugModeWhenInitializeTa
|
||||
TEST(CommandStreamReceiverSimpleTest, givenVariousDataSetsWhenVerifyingMemoryThenCorrectValueIsReturned) {
|
||||
ExecutionEnvironment executionEnvironment;
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
MockCommandStreamReceiver csr(executionEnvironment);
|
||||
MockCommandStreamReceiver csr(executionEnvironment, 0);
|
||||
|
||||
constexpr size_t setSize = 6;
|
||||
uint8_t setA1[setSize] = {4, 3, 2, 1, 2, 10};
|
||||
@@ -600,7 +600,7 @@ HWTEST_P(CommandStreamReceiverWithAubSubCaptureTest, givenCommandStreamReceiverW
|
||||
|
||||
ExecutionEnvironment executionEnvironment;
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
MyMockCsr mockCsr(executionEnvironment);
|
||||
MyMockCsr mockCsr(executionEnvironment, 0);
|
||||
|
||||
mockCsr.programForAubSubCapture(wasActiveInPreviousEnqueue, isActive);
|
||||
|
||||
@@ -623,7 +623,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
TEST(CommandStreamReceiverDeviceIndexTest, givenCsrWithOsContextWhenGetDeviceIndexThenGetHighestEnabledBitInDeviceBitfield) {
|
||||
ExecutionEnvironment executioneEnvironment;
|
||||
executioneEnvironment.initializeMemoryManager();
|
||||
MockCommandStreamReceiver csr(executioneEnvironment);
|
||||
MockCommandStreamReceiver csr(executioneEnvironment, 0);
|
||||
auto osContext = executioneEnvironment.memoryManager->createAndRegisterOsContext(&csr, aub_stream::EngineType::ENGINE_RCS, 0b10, PreemptionMode::Disabled, false);
|
||||
|
||||
csr.setupContext(*osContext);
|
||||
@@ -633,7 +633,7 @@ TEST(CommandStreamReceiverDeviceIndexTest, givenCsrWithOsContextWhenGetDeviceInd
|
||||
TEST(CommandStreamReceiverDeviceIndexTest, givenOsContextWithNoDeviceBitfieldWhenGettingDeviceIndexThenZeroIsReturned) {
|
||||
ExecutionEnvironment executioneEnvironment;
|
||||
executioneEnvironment.initializeMemoryManager();
|
||||
MockCommandStreamReceiver csr(executioneEnvironment);
|
||||
MockCommandStreamReceiver csr(executioneEnvironment, 0);
|
||||
auto osContext = executioneEnvironment.memoryManager->createAndRegisterOsContext(&csr, aub_stream::EngineType::ENGINE_RCS, 0b00, PreemptionMode::Disabled, false);
|
||||
|
||||
csr.setupContext(*osContext);
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
using namespace NEO;
|
||||
|
||||
struct MyMockCsr : UltCommandStreamReceiver<DEFAULT_TEST_FAMILY_NAME> {
|
||||
MyMockCsr(ExecutionEnvironment &executionEnvironment)
|
||||
: UltCommandStreamReceiver(executionEnvironment) {
|
||||
MyMockCsr(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex)
|
||||
: UltCommandStreamReceiver(executionEnvironment, rootDeviceIndex) {
|
||||
}
|
||||
|
||||
FlushStamp flush(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency) override {
|
||||
@@ -95,8 +95,8 @@ struct MyMockCsr : UltCommandStreamReceiver<DEFAULT_TEST_FAMILY_NAME> {
|
||||
|
||||
template <typename BaseCSR>
|
||||
struct MyMockCsrWithAubDump : CommandStreamReceiverWithAUBDump<BaseCSR> {
|
||||
MyMockCsrWithAubDump<BaseCSR>(bool createAubCSR, ExecutionEnvironment &executionEnvironment) : CommandStreamReceiverWithAUBDump<BaseCSR>("aubfile", executionEnvironment) {
|
||||
this->aubCSR.reset(createAubCSR ? new MyMockCsr(executionEnvironment) : nullptr);
|
||||
MyMockCsrWithAubDump<BaseCSR>(bool createAubCSR, ExecutionEnvironment &executionEnvironment) : CommandStreamReceiverWithAUBDump<BaseCSR>("aubfile", executionEnvironment, 0) {
|
||||
this->aubCSR.reset(createAubCSR ? new MyMockCsr(executionEnvironment, 0) : nullptr);
|
||||
}
|
||||
|
||||
MyMockCsr &getAubMockCsr() const {
|
||||
@@ -137,7 +137,7 @@ HWTEST_F(CommandStreamReceiverWithAubDumpSimpleTest, givenCsrWithAubDumpWhenSett
|
||||
ExecutionEnvironment *executionEnvironment = platformImpl->peekExecutionEnvironment();
|
||||
executionEnvironment->initializeMemoryManager();
|
||||
|
||||
CommandStreamReceiverWithAUBDump<UltCommandStreamReceiver<FamilyType>> csrWithAubDump("aubfile", *executionEnvironment);
|
||||
CommandStreamReceiverWithAUBDump<UltCommandStreamReceiver<FamilyType>> csrWithAubDump("aubfile", *executionEnvironment, 0);
|
||||
MockOsContext osContext(0, 1, HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances()[0],
|
||||
PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]), false);
|
||||
|
||||
@@ -155,7 +155,7 @@ HWTEST_F(CommandStreamReceiverWithAubDumpSimpleTest, givenAubManagerAvailableWhe
|
||||
mockAubCenter->aubManager = std::unique_ptr<MockAubManager>(mockManager);
|
||||
executionEnvironment->rootDeviceEnvironments[0].aubCenter = std::unique_ptr<MockAubCenter>(mockAubCenter);
|
||||
|
||||
CommandStreamReceiverWithAUBDump<TbxCommandStreamReceiverHw<FamilyType>> csrWithAubDump("aubfile", *executionEnvironment);
|
||||
CommandStreamReceiverWithAUBDump<TbxCommandStreamReceiverHw<FamilyType>> csrWithAubDump("aubfile", *executionEnvironment, 0);
|
||||
ASSERT_EQ(nullptr, csrWithAubDump.aubCSR);
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ HWTEST_F(CommandStreamReceiverWithAubDumpSimpleTest, givenAubManagerAvailableWhe
|
||||
executionEnvironment->initializeMemoryManager();
|
||||
executionEnvironment->rootDeviceEnvironments[0].aubCenter = std::unique_ptr<MockAubCenter>(mockAubCenter);
|
||||
|
||||
CommandStreamReceiverWithAUBDump<UltCommandStreamReceiver<FamilyType>> csrWithAubDump("aubfile", *executionEnvironment);
|
||||
CommandStreamReceiverWithAUBDump<UltCommandStreamReceiver<FamilyType>> csrWithAubDump("aubfile", *executionEnvironment, 0);
|
||||
ASSERT_NE(nullptr, csrWithAubDump.aubCSR);
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ HWTEST_F(CommandStreamReceiverWithAubDumpSimpleTest, givenNullAubManagerAvailabl
|
||||
executionEnvironment->initializeMemoryManager();
|
||||
executionEnvironment->rootDeviceEnvironments[0].aubCenter = std::unique_ptr<MockAubCenter>(mockAubCenter);
|
||||
|
||||
CommandStreamReceiverWithAUBDump<TbxCommandStreamReceiverHw<FamilyType>> csrWithAubDump("aubfile", *executionEnvironment);
|
||||
CommandStreamReceiverWithAUBDump<TbxCommandStreamReceiverHw<FamilyType>> csrWithAubDump("aubfile", *executionEnvironment, 0);
|
||||
EXPECT_NE(nullptr, csrWithAubDump.aubCSR);
|
||||
}
|
||||
|
||||
@@ -188,7 +188,7 @@ HWTEST_F(CommandStreamReceiverWithAubDumpSimpleTest, givenAubManagerNotAvailable
|
||||
|
||||
MockExecutionEnvironment executionEnvironment(platformDevices[0]);
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
CommandStreamReceiverWithAUBDump<UltCommandStreamReceiver<FamilyType>> csrWithAubDump("aubfile", executionEnvironment);
|
||||
CommandStreamReceiverWithAUBDump<UltCommandStreamReceiver<FamilyType>> csrWithAubDump("aubfile", executionEnvironment, 0);
|
||||
ASSERT_NE(nullptr, csrWithAubDump.aubCSR);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ HWTEST_P(CreateCommandStreamReceiverTest, givenCreateCommandStreamWhenCsrIsSetTo
|
||||
VariableBackup<bool> backup(&overrideCommandStreamReceiverCreation, true);
|
||||
DebugManager.flags.SetCommandStreamReceiver.set(csrType);
|
||||
executionEnvironment->rootDeviceEnvironments[0].commandStreamReceivers.resize(1);
|
||||
executionEnvironment->rootDeviceEnvironments[0].commandStreamReceivers[0].push_back(std::unique_ptr<CommandStreamReceiver>(createCommandStream(*executionEnvironment)));
|
||||
executionEnvironment->rootDeviceEnvironments[0].commandStreamReceivers[0].push_back(std::unique_ptr<CommandStreamReceiver>(createCommandStream(*executionEnvironment, 0)));
|
||||
|
||||
if (csrType < CommandStreamReceiverType::CSR_TYPES_NUM) {
|
||||
EXPECT_NE(nullptr, executionEnvironment->rootDeviceEnvironments[0].commandStreamReceivers[0][0].get());
|
||||
|
||||
@@ -591,7 +591,7 @@ HWTEST_F(SubmissionsAggregatorTests, givenMultipleQueuesWhenCmdBuffersAreRecorde
|
||||
MockKernelWithInternals kernel(*device.get());
|
||||
CommandQueueHw<FamilyType> cmdQ1(context.get(), device.get(), 0);
|
||||
CommandQueueHw<FamilyType> cmdQ2(context.get(), device.get(), 0);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->executionEnvironment, device->getRootDeviceIndex());
|
||||
size_t GWS = 1;
|
||||
|
||||
overrideCsr(mockCsr);
|
||||
@@ -623,7 +623,7 @@ HWTEST_F(SubmissionsAggregatorTests, givenMultipleQueuesWhenCmdBuffersAreRecorde
|
||||
HWTEST_F(SubmissionsAggregatorTests, givenCmdQueueWhenCmdBufferWithEventIsRecordedThenAssignFlushStampObjForEveryone) {
|
||||
MockKernelWithInternals kernel(*device.get());
|
||||
CommandQueueHw<FamilyType> cmdQ1(context.get(), device.get(), 0);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->executionEnvironment, device->getRootDeviceIndex());
|
||||
size_t GWS = 1;
|
||||
|
||||
overrideCsr(mockCsr);
|
||||
@@ -649,7 +649,7 @@ HWTEST_F(SubmissionsAggregatorTests, givenMultipleCmdBuffersWhenFlushThenUpdateA
|
||||
MockKernelWithInternals kernel(*device.get());
|
||||
CommandQueueHw<FamilyType> cmdQ1(context.get(), device.get(), 0);
|
||||
CommandQueueHw<FamilyType> cmdQ2(context.get(), device.get(), 0);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->executionEnvironment, device->getRootDeviceIndex());
|
||||
size_t GWS = 1;
|
||||
|
||||
overrideCsr(mockCsr);
|
||||
@@ -676,7 +676,7 @@ HWTEST_F(SubmissionsAggregatorTests, givenMultipleCmdBuffersWhenNotAggregatedDur
|
||||
MockKernelWithInternals kernel(*device.get());
|
||||
CommandQueueHw<FamilyType> cmdQ1(context.get(), device.get(), 0);
|
||||
CommandQueueHw<FamilyType> cmdQ2(context.get(), device.get(), 0);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->executionEnvironment, device->getRootDeviceIndex());
|
||||
size_t GWS = 1;
|
||||
|
||||
overrideCsr(mockCsr);
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace NEO {
|
||||
|
||||
void TbxCommandStreamFixture::SetUp(MockDevice *pDevice) {
|
||||
// Create our TBX command stream receiver based on HW type
|
||||
pCommandStreamReceiver = TbxCommandStreamReceiver::create("", false, *pDevice->executionEnvironment);
|
||||
pCommandStreamReceiver = TbxCommandStreamReceiver::create("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
ASSERT_NE(nullptr, pCommandStreamReceiver);
|
||||
mmTbx = new TbxMemoryManager(*pDevice->executionEnvironment);
|
||||
pDevice->resetCommandStreamReceiver(pCommandStreamReceiver);
|
||||
|
||||
@@ -151,7 +151,7 @@ TEST(TbxCommandStreamReceiverTest, givenNullFactoryEntryWhenTbxCsrIsCreatedThenN
|
||||
|
||||
tbxCommandStreamReceiverFactory[family] = nullptr;
|
||||
|
||||
CommandStreamReceiver *csr = TbxCommandStreamReceiver::create("", false, *executionEnvironment);
|
||||
CommandStreamReceiver *csr = TbxCommandStreamReceiver::create("", false, *executionEnvironment, 0);
|
||||
EXPECT_EQ(nullptr, csr);
|
||||
}
|
||||
|
||||
@@ -161,14 +161,14 @@ TEST(TbxCommandStreamReceiverTest, givenTbxCommandStreamReceiverWhenItIsCreatedW
|
||||
|
||||
hwInfo->platform.eRenderCoreFamily = GFXCORE_FAMILY_FORCE_ULONG; // wrong gfx core family
|
||||
|
||||
CommandStreamReceiver *csr = TbxCommandStreamReceiver::create("", false, *executionEnvironment);
|
||||
CommandStreamReceiver *csr = TbxCommandStreamReceiver::create("", false, *executionEnvironment, 0);
|
||||
EXPECT_EQ(nullptr, csr);
|
||||
}
|
||||
|
||||
TEST(TbxCommandStreamReceiverTest, givenTbxCommandStreamReceiverWhenTypeIsCheckedThenTbxCsrIsReturned) {
|
||||
ExecutionEnvironment *executionEnvironment = platformImpl->peekExecutionEnvironment();
|
||||
executionEnvironment->initializeMemoryManager();
|
||||
std::unique_ptr<CommandStreamReceiver> csr(TbxCommandStreamReceiver::create("", false, *executionEnvironment));
|
||||
std::unique_ptr<CommandStreamReceiver> csr(TbxCommandStreamReceiver::create("", false, *executionEnvironment, 0));
|
||||
EXPECT_NE(nullptr, csr);
|
||||
EXPECT_EQ(CommandStreamReceiverType::CSR_TBX, csr->getType());
|
||||
}
|
||||
@@ -196,7 +196,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)));
|
||||
TbxCommandStreamReceiverHw<FamilyType>::create("aubfile", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex())));
|
||||
|
||||
EXPECT_TRUE(tbxCsrWithAubDump->aubManager->isOpen());
|
||||
EXPECT_STREQ("aubcapture_file_name.aub", tbxCsrWithAubDump->aubManager->getFileName().c_str());
|
||||
@@ -379,7 +379,7 @@ 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)));
|
||||
std::unique_ptr<TbxCommandStreamReceiverHw<FamilyType>> tbxCsr(reinterpret_cast<TbxCommandStreamReceiverHw<FamilyType> *>(TbxCommandStreamReceiver::create("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex())));
|
||||
EXPECT_EQ(9u, tbxCsr->aubDeviceId);
|
||||
}
|
||||
|
||||
@@ -415,7 +415,7 @@ HWTEST_F(TbxCommandSteamSimpleTest, givenTbxCsrWhenCallingWaitForTaskCountWithKm
|
||||
std::set<GraphicsAllocation *> downloadedAllocations;
|
||||
};
|
||||
|
||||
MockTbxCsr tbxCsr{*pDevice->executionEnvironment};
|
||||
MockTbxCsr tbxCsr{*pDevice->executionEnvironment, pDevice->getRootDeviceIndex()};
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false);
|
||||
uint32_t tag = 0u;
|
||||
tbxCsr.setupContext(osContext);
|
||||
@@ -462,7 +462,7 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverWhenItIsCreatedWith
|
||||
MockExecutionEnvironment executionEnvironment(platformDevices[0], false);
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
|
||||
auto tbxCsr = std::make_unique<TbxCommandStreamReceiverHw<FamilyType>>(executionEnvironment);
|
||||
auto tbxCsr = std::make_unique<TbxCommandStreamReceiverHw<FamilyType>>(executionEnvironment, 0);
|
||||
EXPECT_EQ(nullptr, executionEnvironment.rootDeviceEnvironments[0].aubCenter->getAubManager());
|
||||
}
|
||||
|
||||
@@ -560,7 +560,7 @@ 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)));
|
||||
TbxCommandStreamReceiverHw<FamilyType>::create("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex())));
|
||||
|
||||
EXPECT_FALSE(tbxCsr->streamInitialized);
|
||||
}
|
||||
@@ -576,7 +576,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)));
|
||||
std::unique_ptr<TbxCommandStreamReceiverHw<FamilyType>> tbxCsr(reinterpret_cast<TbxCommandStreamReceiverHw<FamilyType> *>(TbxCommandStreamReceiver::create(fileName, false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex())));
|
||||
EXPECT_EQ(nullptr, tbxCsr->hardwareContextController.get());
|
||||
|
||||
tbxCsr->setupContext(osContext);
|
||||
@@ -584,11 +584,11 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrWhenOsContextIsSetThenCreateHardwareC
|
||||
}
|
||||
|
||||
HWTEST_F(TbxCommandStreamTests, givenTbxCsrWhenPollForCompletionImplIsCalledThenSimulatedCsrMethodIsCalled) {
|
||||
std::unique_ptr<TbxCommandStreamReceiverHw<FamilyType>> tbxCsr(reinterpret_cast<TbxCommandStreamReceiverHw<FamilyType> *>(TbxCommandStreamReceiver::create("", false, *pDevice->executionEnvironment)));
|
||||
std::unique_ptr<TbxCommandStreamReceiverHw<FamilyType>> tbxCsr(reinterpret_cast<TbxCommandStreamReceiverHw<FamilyType> *>(TbxCommandStreamReceiver::create("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex())));
|
||||
tbxCsr->pollForCompletionImpl();
|
||||
}
|
||||
HWTEST_F(TbxCommandStreamTests, givenTbxCsrWhenItIsQueriedForPreferredTagPoolSizeThenOneIsReturned) {
|
||||
std::unique_ptr<TbxCommandStreamReceiverHw<FamilyType>> tbxCsr(reinterpret_cast<TbxCommandStreamReceiverHw<FamilyType> *>(TbxCommandStreamReceiver::create("", false, *pDevice->executionEnvironment)));
|
||||
std::unique_ptr<TbxCommandStreamReceiverHw<FamilyType>> tbxCsr(reinterpret_cast<TbxCommandStreamReceiverHw<FamilyType> *>(TbxCommandStreamReceiver::create("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex())));
|
||||
EXPECT_EQ(1u, tbxCsr->getPreferredTagPoolSize());
|
||||
}
|
||||
|
||||
@@ -601,7 +601,7 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrWhenCreatedWithAubDumpThenFileNameIsE
|
||||
|
||||
auto fullName = AUBCommandStreamReceiver::createFullFilePath(*platformDevices[0], "aubfile");
|
||||
|
||||
std::unique_ptr<TbxCommandStreamReceiverHw<FamilyType>> tbxCsr(reinterpret_cast<TbxCommandStreamReceiverHw<FamilyType> *>(TbxCommandStreamReceiver::create("aubfile", true, executionEnvironment)));
|
||||
std::unique_ptr<TbxCommandStreamReceiverHw<FamilyType>> tbxCsr(reinterpret_cast<TbxCommandStreamReceiverHw<FamilyType> *>(TbxCommandStreamReceiver::create("aubfile", true, executionEnvironment, 0)));
|
||||
EXPECT_STREQ(fullName.c_str(), executionEnvironment.aubFileNameReceived.c_str());
|
||||
}
|
||||
|
||||
@@ -611,7 +611,7 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrWhenCreatedWithAubDumpThenOpenIsCalle
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
|
||||
std::unique_ptr<TbxCommandStreamReceiverHw<FamilyType>> tbxCsrWithAubDump(reinterpret_cast<TbxCommandStreamReceiverHw<FamilyType> *>(
|
||||
TbxCommandStreamReceiver::create("aubfile", true, executionEnvironment)));
|
||||
TbxCommandStreamReceiver::create("aubfile", true, executionEnvironment, 0)));
|
||||
EXPECT_TRUE(tbxCsrWithAubDump->aubManager->isOpen());
|
||||
}
|
||||
|
||||
@@ -624,7 +624,7 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrWhenCreatedWithAubDumpInSubCaptureMod
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
|
||||
std::unique_ptr<TbxCommandStreamReceiverHw<FamilyType>> tbxCsrWithAubDump(static_cast<TbxCommandStreamReceiverHw<FamilyType> *>(
|
||||
TbxCommandStreamReceiver::create("aubfile", true, executionEnvironment)));
|
||||
TbxCommandStreamReceiver::create("aubfile", true, executionEnvironment, 0)));
|
||||
EXPECT_TRUE(tbxCsrWithAubDump->aubManager->isOpen());
|
||||
|
||||
auto subCaptureManager = tbxCsrWithAubDump->subCaptureManager.get();
|
||||
@@ -640,10 +640,10 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrWhenCreatedWithAubDumpSeveralTimesThe
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
|
||||
auto tbxCsrWithAubDump1 = std::unique_ptr<TbxCommandStreamReceiverHw<FamilyType>>(reinterpret_cast<TbxCommandStreamReceiverHw<FamilyType> *>(
|
||||
TbxCommandStreamReceiverHw<FamilyType>::create("aubfile", true, executionEnvironment)));
|
||||
TbxCommandStreamReceiverHw<FamilyType>::create("aubfile", true, executionEnvironment, 0)));
|
||||
|
||||
auto tbxCsrWithAubDump2 = std::unique_ptr<TbxCommandStreamReceiverHw<FamilyType>>(reinterpret_cast<TbxCommandStreamReceiverHw<FamilyType> *>(
|
||||
TbxCommandStreamReceiverHw<FamilyType>::create("aubfile", true, executionEnvironment)));
|
||||
TbxCommandStreamReceiverHw<FamilyType>::create("aubfile", true, executionEnvironment, 0)));
|
||||
|
||||
auto mockManager = reinterpret_cast<MockAubManager *>(executionEnvironment.rootDeviceEnvironments[0].aubCenter->getAubManager());
|
||||
EXPECT_EQ(1u, mockManager->openCalledCnt);
|
||||
@@ -773,7 +773,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));
|
||||
std::unique_ptr<MockTbxCsrToTestDumpTbxNonWritable<FamilyType>> tbxCsr(new MockTbxCsrToTestDumpTbxNonWritable<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
memoryManager.reset(new OsAgnosticMemoryManager(*pDevice->executionEnvironment));
|
||||
tbxCsr->setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
|
||||
@@ -793,7 +793,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));
|
||||
std::unique_ptr<MockTbxCsrToTestDumpTbxNonWritable<FamilyType>> tbxCsr(new MockTbxCsrToTestDumpTbxNonWritable<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
memoryManager.reset(new OsAgnosticMemoryManager(*pDevice->executionEnvironment));
|
||||
tbxCsr->setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
|
||||
@@ -893,4 +893,4 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrInNonSubCaptureModeWhenCheckAndActiva
|
||||
auto status = tbxCsr.checkAndActivateAubSubCapture(dispatchInfo);
|
||||
EXPECT_FALSE(status.isActive);
|
||||
EXPECT_FALSE(status.wasActiveInPreviousEnqueue);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ TEST_F(DeviceTest, getEngineTypeDefault) {
|
||||
|
||||
TEST(DeviceCleanup, givenDeviceWhenItIsDestroyedThenFlushBatchedSubmissionsIsCalled) {
|
||||
auto mockDevice = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
|
||||
MockCommandStreamReceiver *csr = new MockCommandStreamReceiver(*mockDevice->getExecutionEnvironment());
|
||||
MockCommandStreamReceiver *csr = new MockCommandStreamReceiver(*mockDevice->getExecutionEnvironment(), mockDevice->getRootDeviceIndex());
|
||||
mockDevice->resetCommandStreamReceiver(csr);
|
||||
int flushedBatchedSubmissionsCalledCount = 0;
|
||||
csr->flushBatchedSubmissionsCallCounter = &flushedBatchedSubmissionsCalledCount;
|
||||
|
||||
@@ -974,7 +974,7 @@ HWTEST_F(InternalsEventTest, GivenBufferWithoutZeroCopyOnCommandMapOrUnmapFlushe
|
||||
};
|
||||
|
||||
int32_t executionStamp = 0;
|
||||
auto csr = new MockCsr<FamilyType>(executionStamp, *pDevice->executionEnvironment);
|
||||
auto csr = new MockCsr<FamilyType>(executionStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(csr);
|
||||
|
||||
const cl_queue_properties props[3] = {CL_QUEUE_PROPERTIES, 0, 0};
|
||||
@@ -1392,7 +1392,7 @@ TEST_F(EventTest, addChildForEventCompleted) {
|
||||
|
||||
HWTEST_F(EventTest, givenQuickKmdSleepRequestWhenWaitIsCalledThenPassRequestToWaitingFunction) {
|
||||
struct MyCsr : public UltCommandStreamReceiver<FamilyType> {
|
||||
MyCsr(const ExecutionEnvironment &executionEnvironment) : UltCommandStreamReceiver<FamilyType>(const_cast<ExecutionEnvironment &>(executionEnvironment)) {}
|
||||
MyCsr(const ExecutionEnvironment &executionEnvironment) : UltCommandStreamReceiver<FamilyType>(const_cast<ExecutionEnvironment &>(executionEnvironment), 0) {}
|
||||
MOCK_METHOD3(waitForCompletionWithTimeout, bool(bool enableTimeout, int64_t timeoutMs, uint32_t taskCountToWait));
|
||||
};
|
||||
HardwareInfo localHwInfo = pDevice->getHardwareInfo();
|
||||
@@ -1419,7 +1419,7 @@ HWTEST_F(EventTest, givenQuickKmdSleepRequestWhenWaitIsCalledThenPassRequestToWa
|
||||
|
||||
HWTEST_F(EventTest, givenNonQuickKmdSleepRequestWhenWaitIsCalledThenPassRequestToWaitingFunction) {
|
||||
struct MyCsr : public UltCommandStreamReceiver<FamilyType> {
|
||||
MyCsr(const ExecutionEnvironment &executionEnvironment) : UltCommandStreamReceiver<FamilyType>(const_cast<ExecutionEnvironment &>(executionEnvironment)) {}
|
||||
MyCsr(const ExecutionEnvironment &executionEnvironment) : UltCommandStreamReceiver<FamilyType>(const_cast<ExecutionEnvironment &>(executionEnvironment), 0) {}
|
||||
MOCK_METHOD3(waitForCompletionWithTimeout, bool(bool enableTimeout, int64_t timeoutMs, uint32_t taskCountToWait));
|
||||
};
|
||||
HardwareInfo localHwInfo = pDevice->getHardwareInfo();
|
||||
|
||||
@@ -217,7 +217,7 @@ TEST(ExecutionEnvironment, givenExecutionEnvironmentWithVariousMembersWhenItIsDe
|
||||
AubCenterMock(uint32_t &destructorId) : DestructorCounted(destructorId, platformDevices[0], false, "", CommandStreamReceiverType::CSR_AUB) {}
|
||||
};
|
||||
struct CommandStreamReceiverMock : public DestructorCounted<MockCommandStreamReceiver, 3> {
|
||||
CommandStreamReceiverMock(uint32_t &destructorId, ExecutionEnvironment &executionEnvironment) : DestructorCounted(destructorId, executionEnvironment) {}
|
||||
CommandStreamReceiverMock(uint32_t &destructorId, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) : DestructorCounted(destructorId, executionEnvironment, rootDeviceIndex) {}
|
||||
};
|
||||
struct BuiltinsMock : public DestructorCounted<BuiltIns, 2> {
|
||||
BuiltinsMock(uint32_t &destructorId) : DestructorCounted(destructorId) {}
|
||||
@@ -237,7 +237,7 @@ TEST(ExecutionEnvironment, givenExecutionEnvironmentWithVariousMembersWhenItIsDe
|
||||
executionEnvironment->memoryOperationsInterface = std::make_unique<MemoryOperationsHandlerMock>(destructorId);
|
||||
executionEnvironment->memoryManager = std::make_unique<MemoryMangerMock>(destructorId, *executionEnvironment);
|
||||
executionEnvironment->rootDeviceEnvironments[0].aubCenter = std::make_unique<AubCenterMock>(destructorId);
|
||||
executionEnvironment->rootDeviceEnvironments[0].commandStreamReceivers[0].push_back(std::make_unique<CommandStreamReceiverMock>(destructorId, *executionEnvironment));
|
||||
executionEnvironment->rootDeviceEnvironments[0].commandStreamReceivers[0].push_back(std::make_unique<CommandStreamReceiverMock>(destructorId, *executionEnvironment, 0));
|
||||
executionEnvironment->builtins = std::make_unique<BuiltinsMock>(destructorId);
|
||||
executionEnvironment->compilerInterface = std::make_unique<CompilerInterfaceMock>(destructorId);
|
||||
executionEnvironment->sourceLevelDebugger = std::make_unique<SourceLevelDebuggerMock>(destructorId);
|
||||
|
||||
@@ -107,7 +107,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);
|
||||
auto mockCSR = new MockCsr<FamilyType>(executionStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCSR);
|
||||
|
||||
size_t kernelRequiringPrivateSurface = pKernel->getProgram()->getBlockKernelManager()->getCount();
|
||||
@@ -381,7 +381,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelEnqueueTest, givenNonBlockedQueueWhenPar
|
||||
MockMultiDispatchInfo multiDispatchInfo(pKernel);
|
||||
|
||||
int32_t executionStamp = 0;
|
||||
auto mockCSR = new MockCsrBase<FamilyType>(executionStamp, *pDevice->executionEnvironment);
|
||||
auto mockCSR = new MockCsrBase<FamilyType>(executionStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCSR);
|
||||
|
||||
pCmdQ->enqueueKernel(pKernel, 1, globalOffsets, workItems, workItems, 0, nullptr, nullptr);
|
||||
@@ -538,7 +538,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelEnqueueFixture, ParentKernelEnqueuedToNo
|
||||
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);
|
||||
auto mockCsr = new MockCsr<FamilyType>(execStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
pCmdQ->enqueueKernel(parentKernel, 1, offset, gws, gws, 0, nullptr, nullptr);
|
||||
@@ -562,7 +562,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelEnqueueFixture, ParentKernelEnqueuedWith
|
||||
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);
|
||||
auto mockCsr = new MockCsr<FamilyType>(execStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
|
||||
BuiltinKernelsSimulation::SchedulerSimulation<FamilyType>::enabled = false;
|
||||
|
||||
@@ -579,7 +579,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelEnqueueFixture, ParentKernelEnqueuedWith
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelEnqueueFixture, givenCsrInBatchingModeWhenExecutionModelKernelIsSubmittedThenItIsFlushed) {
|
||||
if (pDevice->getSupportedClVersion() >= 20) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
@@ -605,7 +605,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelEnqueueFixture, ParentKernelEnqueueMarks
|
||||
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);
|
||||
auto mockCsr = new MockCsr<FamilyType>(execStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
mockCsr->setMediaVFEStateDirty(false);
|
||||
|
||||
@@ -35,7 +35,7 @@ struct BufferEnqueueFixture : public HardwareParse,
|
||||
|
||||
template <typename FamilyType>
|
||||
void initializeFixture() {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*executionEnvironment, 0);
|
||||
|
||||
executionEnvironment->rootDeviceEnvironments[0].commandStreamReceivers.resize(1);
|
||||
executionEnvironment->rootDeviceEnvironments[0].commandStreamReceivers[0].push_back(std::unique_ptr<CommandStreamReceiver>(mockCsr));
|
||||
|
||||
@@ -17,7 +17,7 @@ using namespace NEO;
|
||||
|
||||
void MemoryManagerWithCsrFixture::SetUp() {
|
||||
executionEnvironment.setHwInfo(*platformDevices);
|
||||
csr = new MockCommandStreamReceiver(this->executionEnvironment);
|
||||
csr = new MockCommandStreamReceiver(this->executionEnvironment, 0);
|
||||
memoryManager = new MockMemoryManager(executionEnvironment);
|
||||
executionEnvironment.memoryManager.reset(memoryManager);
|
||||
csr->tagAddress = ¤tGpuTag;
|
||||
|
||||
@@ -20,7 +20,7 @@ struct Gen11CoherencyRequirements : public ::testing::Test {
|
||||
|
||||
struct myCsr : public CommandStreamReceiverHw<ICLFamily> {
|
||||
using CommandStreamReceiver::commandStream;
|
||||
myCsr(ExecutionEnvironment &executionEnvironment) : CommandStreamReceiverHw<ICLFamily>(executionEnvironment){};
|
||||
myCsr(ExecutionEnvironment &executionEnvironment) : CommandStreamReceiverHw<ICLFamily>(executionEnvironment, 0){};
|
||||
CsrSizeRequestFlags *getCsrRequestFlags() { return &csrSizeRequestFlags; }
|
||||
};
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ struct Gen11MediaSamplerProgramingTest : public ::testing::Test {
|
||||
struct myCsr : public CommandStreamReceiverHw<ICLFamily> {
|
||||
using CommandStreamReceiver::commandStream;
|
||||
using CommandStreamReceiverHw<ICLFamily>::programMediaSampler;
|
||||
myCsr(ExecutionEnvironment &executionEnvironment) : CommandStreamReceiverHw<ICLFamily>(executionEnvironment){};
|
||||
myCsr(ExecutionEnvironment &executionEnvironment) : CommandStreamReceiverHw<ICLFamily>(executionEnvironment, 0){};
|
||||
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) {}
|
||||
: TbxCommandStreamReceiverHw<FamilyType>(executionEnvironment, 0) {}
|
||||
using TbxCommandStreamReceiverHw<FamilyType>::getpollNotEqualValueForPollForCompletion;
|
||||
using TbxCommandStreamReceiverHw<FamilyType>::getMaskAndValueForPollForCompletion;
|
||||
};
|
||||
|
||||
@@ -21,7 +21,7 @@ using namespace NEO;
|
||||
using Gen12LPAubCommandStreamReceiverTests = Test<DeviceFixture>;
|
||||
|
||||
GEN12LPTEST_F(Gen12LPAubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenGetGUCWorkQueueItemHeaderIsCalledThenAppropriateValueDependingOnEngineTypeIsReturned) {
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
MockOsContext rcsOsContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false);
|
||||
MockOsContext ccsOsContext(0, 1, aub_stream::ENGINE_CCS, PreemptionMode::Disabled, false);
|
||||
|
||||
@@ -35,7 +35,7 @@ GEN12LPTEST_F(Gen12LPAubCommandStreamReceiverTests, givenAubCommandStreamReceive
|
||||
}
|
||||
|
||||
GEN12LPTEST_F(Gen12LPAubCommandStreamReceiverTests, givenGraphicsAlloctionWhenGetPPGTTAdditionalBitsIsCalledThenAppropriateValueIsReturned) {
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment));
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
MockGraphicsAllocation allocation(nullptr, 0);
|
||||
auto bits = aubCsr->getPPGTTAdditionalBits(&allocation);
|
||||
constexpr uint64_t expectedBits = BIT(PageTableEntry::presentBit) | BIT(PageTableEntry::writableBit);
|
||||
@@ -45,7 +45,7 @@ GEN12LPTEST_F(Gen12LPAubCommandStreamReceiverTests, givenGraphicsAlloctionWhenGe
|
||||
|
||||
GEN12LPTEST_F(Gen12LPAubCommandStreamReceiverTests, givenCCSEnabledWhenEngineMmiosAreInitializedThenExpectL3ConfigMmioIsWritten) {
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_CCS, PreemptionMode::Disabled, false);
|
||||
AUBCommandStreamReceiverHw<FamilyType> aubCsr("", true, *pDevice->executionEnvironment);
|
||||
AUBCommandStreamReceiverHw<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
aubCsr.setupContext(osContext);
|
||||
|
||||
auto stream = std::make_unique<MockAubFileStreamMockMmioWrite>();
|
||||
@@ -58,7 +58,7 @@ GEN12LPTEST_F(Gen12LPAubCommandStreamReceiverTests, givenCCSEnabledWhenEngineMmi
|
||||
|
||||
GEN12LPTEST_F(Gen12LPAubCommandStreamReceiverTests, givenRCSEnabledWhenEngineMmiosAreInitializedThenExpectL3ConfigMmioIsWritten) {
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false);
|
||||
AUBCommandStreamReceiverHw<FamilyType> aubCsr("", true, *pDevice->executionEnvironment);
|
||||
AUBCommandStreamReceiverHw<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
aubCsr.setupContext(osContext);
|
||||
|
||||
auto stream = std::make_unique<MockAubFileStreamMockMmioWrite>();
|
||||
|
||||
@@ -21,7 +21,7 @@ struct Gen12LpCoherencyRequirements : public ::testing::Test {
|
||||
|
||||
struct myCsr : public CommandStreamReceiverHw<TGLLPFamily> {
|
||||
using CommandStreamReceiver::commandStream;
|
||||
myCsr(ExecutionEnvironment &executionEnvironment) : CommandStreamReceiverHw<TGLLPFamily>(executionEnvironment){};
|
||||
myCsr(ExecutionEnvironment &executionEnvironment) : CommandStreamReceiverHw<TGLLPFamily>(executionEnvironment, 0){};
|
||||
CsrSizeRequestFlags *getCsrRequestFlags() { return &csrSizeRequestFlags; }
|
||||
};
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ GEN12LPTEST_F(CommandStreamReceiverHwTestGen12lp, givenPreambleSentWhenL3ConfigR
|
||||
MockContext ctx(pDevice);
|
||||
MockKernelWithInternals kernel(*pDevice);
|
||||
CommandQueueHw<FamilyType> commandQueue(&ctx, pDevice, 0);
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(commandStreamReceiver);
|
||||
auto &commandStreamCSR = commandStreamReceiver->getCS();
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ class MockSimulatedCsrHw : public CommandStreamReceiverSimulatedHw<FamilyType> {
|
||||
};
|
||||
|
||||
GEN12LPTEST_F(Gen12LPCommandStreamReceiverSimulatedCommonHwTests, givenAubCommandStreamReceiverWhewGlobalMmiosAreInitializedThenMOCSRegistersAreConfigured) {
|
||||
MockSimulatedCsrHw<FamilyType> csrSimulatedCommonHw(*pDevice->executionEnvironment);
|
||||
MockSimulatedCsrHw<FamilyType> csrSimulatedCommonHw(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
|
||||
auto stream = std::make_unique<MockAubStreamMockMmioWrite>();
|
||||
csrSimulatedCommonHw.stream = stream.get();
|
||||
@@ -102,7 +102,7 @@ GEN12LPTEST_F(Gen12LPCommandStreamReceiverSimulatedCommonHwTests, givenAubComman
|
||||
}
|
||||
|
||||
GEN12LPTEST_F(Gen12LPCommandStreamReceiverSimulatedCommonHwTests, givenAubCommandStreamReceiverWhenGlobalMmiosAreInitializedThenLNCFRegistersAreConfigured) {
|
||||
MockSimulatedCsrHw<FamilyType> csrSimulatedCommonHw(*pDevice->executionEnvironment);
|
||||
MockSimulatedCsrHw<FamilyType> csrSimulatedCommonHw(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
|
||||
auto stream = std::make_unique<MockAubStreamMockMmioWrite>();
|
||||
csrSimulatedCommonHw.stream = stream.get();
|
||||
|
||||
@@ -16,7 +16,7 @@ using namespace NEO;
|
||||
using Gen12LPTbxCommandStreamReceiverTests = Test<DeviceFixture>;
|
||||
|
||||
GEN12LPTEST_F(Gen12LPTbxCommandStreamReceiverTests, givenNullPtrGraphicsAlloctionWhenGetPPGTTAdditionalBitsIsCalledThenAppropriateValueIsReturned) {
|
||||
auto tbxCsr = std::make_unique<TbxCommandStreamReceiverHw<FamilyType>>(*pDevice->executionEnvironment);
|
||||
auto tbxCsr = std::make_unique<TbxCommandStreamReceiverHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
GraphicsAllocation *allocation = nullptr;
|
||||
auto bits = tbxCsr->getPPGTTAdditionalBits(allocation);
|
||||
constexpr uint64_t expectedBits = BIT(PageTableEntry::presentBit) | BIT(PageTableEntry::writableBit);
|
||||
@@ -25,7 +25,7 @@ GEN12LPTEST_F(Gen12LPTbxCommandStreamReceiverTests, givenNullPtrGraphicsAlloctio
|
||||
}
|
||||
|
||||
GEN12LPTEST_F(Gen12LPTbxCommandStreamReceiverTests, givenGraphicsAlloctionWWhenGetPPGTTAdditionalBitsIsCalledThenAppropriateValueIsReturned) {
|
||||
auto tbxCsr = std::make_unique<TbxCommandStreamReceiverHw<FamilyType>>(*pDevice->executionEnvironment);
|
||||
auto tbxCsr = std::make_unique<TbxCommandStreamReceiverHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockGraphicsAllocation allocation(nullptr, 0);
|
||||
auto bits = tbxCsr->getPPGTTAdditionalBits(&allocation);
|
||||
constexpr uint64_t expectedBits = BIT(PageTableEntry::presentBit) | BIT(PageTableEntry::writableBit);
|
||||
@@ -37,7 +37,7 @@ GEN12LPTEST_F(Gen12LPTbxCommandStreamReceiverTests, whenAskedForPollForCompletio
|
||||
class MyMockTbxHw : public TbxCommandStreamReceiverHw<FamilyType> {
|
||||
public:
|
||||
MyMockTbxHw(ExecutionEnvironment &executionEnvironment)
|
||||
: TbxCommandStreamReceiverHw<FamilyType>(executionEnvironment) {}
|
||||
: TbxCommandStreamReceiverHw<FamilyType>(executionEnvironment, 0) {}
|
||||
using TbxCommandStreamReceiverHw<FamilyType>::getpollNotEqualValueForPollForCompletion;
|
||||
using TbxCommandStreamReceiverHw<FamilyType>::getMaskAndValueForPollForCompletion;
|
||||
};
|
||||
|
||||
@@ -33,7 +33,7 @@ GEN12LPTEST_F(Gen12LpGmmCallbacksTests, givenCsrWithoutAubDumpWhenNotifyAubCaptu
|
||||
HardwareInfo *hwInfo = nullptr;
|
||||
ExecutionEnvironment *executionEnvironment = getExecutionEnvironmentImpl(hwInfo);
|
||||
executionEnvironment->initializeMemoryManager();
|
||||
auto csr = std::make_unique<WddmCommandStreamReceiver<FamilyType>>(*executionEnvironment);
|
||||
auto csr = std::make_unique<WddmCommandStreamReceiver<FamilyType>>(*executionEnvironment, 0);
|
||||
uint64_t address = 0xFEDCBA9876543210;
|
||||
size_t size = 1024;
|
||||
|
||||
@@ -46,7 +46,7 @@ GEN12LPTEST_F(Gen12LpGmmCallbacksTests, givenWddmCsrWhenWriteL3CalledThenWriteTw
|
||||
typedef typename FamilyType::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM;
|
||||
ExecutionEnvironment *executionEnvironment = platformImpl->peekExecutionEnvironment();
|
||||
executionEnvironment->initializeMemoryManager();
|
||||
UltCommandStreamReceiver<FamilyType> csr(*executionEnvironment);
|
||||
UltCommandStreamReceiver<FamilyType> csr(*executionEnvironment, 0);
|
||||
uint8_t buffer[128] = {};
|
||||
csr.commandStream.replaceBuffer(buffer, 128);
|
||||
|
||||
@@ -79,7 +79,7 @@ GEN12LPTEST_F(Gen12LpGmmCallbacksTests, givenCcsEnabledhenWriteL3CalledThenSetRe
|
||||
ExecutionEnvironment executionEnvironment;
|
||||
executionEnvironment.setHwInfo(&localHwInfo);
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
UltCommandStreamReceiver<FamilyType> csr(executionEnvironment);
|
||||
UltCommandStreamReceiver<FamilyType> csr(executionEnvironment, 0);
|
||||
uint8_t buffer[128] = {};
|
||||
csr.commandStream.replaceBuffer(buffer, 128);
|
||||
|
||||
@@ -106,7 +106,7 @@ GEN12LPTEST_F(Gen12LpGmmCallbacksTests, givenCcsDisabledhenWriteL3CalledThenSetR
|
||||
ExecutionEnvironment executionEnvironment;
|
||||
executionEnvironment.setHwInfo(&localHwInfo);
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
UltCommandStreamReceiver<FamilyType> csr(executionEnvironment);
|
||||
UltCommandStreamReceiver<FamilyType> csr(executionEnvironment, 0);
|
||||
uint8_t buffer[128] = {};
|
||||
csr.commandStream.replaceBuffer(buffer, 128);
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ typedef ::testing::Test Gen8CoherencyRequirements;
|
||||
GEN8TEST_F(Gen8CoherencyRequirements, noCoherencyProgramming) {
|
||||
ExecutionEnvironment *executionEnvironment = platformImpl->peekExecutionEnvironment();
|
||||
executionEnvironment->initializeMemoryManager();
|
||||
CommandStreamReceiverHw<BDWFamily> csr(*executionEnvironment);
|
||||
CommandStreamReceiverHw<BDWFamily> csr(*executionEnvironment, 0);
|
||||
LinearStream stream;
|
||||
DispatchFlags flags = DispatchFlagsHelper::createDefaultDispatchFlags();
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ GEN8TEST_F(CommandStreamReceiverHwTestGen8, GivenBlockedKernelWithSlmWhenPreviou
|
||||
}
|
||||
|
||||
GEN8TEST_F(CommandStreamReceiverHwTestGen8, GivenChangedL3ConfigWhenL3IsProgrammedThenClearSLMWorkAroundIsAdded) {
|
||||
MockCsrHw2<FamilyType> csr(*pDevice->executionEnvironment);
|
||||
MockCsrHw2<FamilyType> csr(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
csr.csrSizeRequestFlags.l3ConfigChanged = true;
|
||||
csr.isPreambleSent = true;
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ GEN8TEST_F(Gen8PreemptionEnqueueKernelTest, givenSecondEnqueueWithTheSamePreempt
|
||||
|
||||
GEN8TEST_F(Gen8PreemptionEnqueueKernelTest, givenValidKernelForPreemptionWhenEnqueueKernelCalledThenPassDevicePreemptionMode) {
|
||||
pDevice->setPreemptionMode(PreemptionMode::ThreadGroup);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
MockKernelWithInternals mockKernel(*pDevice);
|
||||
@@ -84,7 +84,7 @@ GEN8TEST_F(Gen8PreemptionEnqueueKernelTest, givenValidKernelForPreemptionWhenEnq
|
||||
|
||||
GEN8TEST_F(Gen8PreemptionEnqueueKernelTest, givenValidKernelForPreemptionWhenEnqueueKernelCalledAndBlockedThenPassDevicePreemptionMode) {
|
||||
pDevice->setPreemptionMode(PreemptionMode::ThreadGroup);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
MockKernelWithInternals mockKernel(*pDevice);
|
||||
@@ -105,7 +105,7 @@ GEN8TEST_F(Gen8PreemptionEnqueueKernelTest, givenValidKernelForPreemptionWhenEnq
|
||||
|
||||
GEN8TEST_F(Gen8PreemptionEnqueueKernelTest, givenDisabledPreemptionWhenEnqueueKernelCalledThenPassDisabledPreemptionMode) {
|
||||
pDevice->setPreemptionMode(PreemptionMode::Disabled);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
MockKernelWithInternals mockKernel(*pDevice);
|
||||
|
||||
@@ -18,7 +18,7 @@ typedef ::testing::Test Gen9CoherencyRequirements;
|
||||
GEN9TEST_F(Gen9CoherencyRequirements, noCoherencyProgramming) {
|
||||
ExecutionEnvironment *executionEnvironment = platformImpl->peekExecutionEnvironment();
|
||||
executionEnvironment->initializeMemoryManager();
|
||||
CommandStreamReceiverHw<SKLFamily> csr(*executionEnvironment);
|
||||
CommandStreamReceiverHw<SKLFamily> csr(*executionEnvironment, 0);
|
||||
LinearStream stream;
|
||||
DispatchFlags flags = DispatchFlagsHelper::createDefaultDispatchFlags();
|
||||
|
||||
|
||||
@@ -209,7 +209,7 @@ GEN9TEST_F(Gen9ThreadGroupPreemptionEnqueueKernelTest, givenSecondEnqueueWithThe
|
||||
GEN9TEST_F(Gen9PreemptionEnqueueKernelTest, givenValidKernelForPreemptionWhenEnqueueKernelCalledThenPassDevicePreemptionModeThreadGroup) {
|
||||
pDevice->setPreemptionMode(PreemptionMode::ThreadGroup);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
MockKernelWithInternals mockKernel(*pDevice);
|
||||
@@ -226,7 +226,7 @@ GEN9TEST_F(Gen9PreemptionEnqueueKernelTest, givenValidKernelForPreemptionWhenEnq
|
||||
GEN9TEST_F(Gen9PreemptionEnqueueKernelTest, givenValidKernelForPreemptionWhenEnqueueKernelCalledAndBlockedThenPassDevicePreemptionModeThreadGroup) {
|
||||
pDevice->setPreemptionMode(PreemptionMode::ThreadGroup);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
MockKernelWithInternals mockKernel(*pDevice);
|
||||
@@ -426,7 +426,7 @@ GEN9TEST_F(Gen9MidThreadPreemptionEnqueueKernelTest, givenSecondEnqueueWithTheSa
|
||||
GEN9TEST_F(Gen9PreemptionEnqueueKernelTest, givenDisabledPreemptionWhenEnqueueKernelCalledThenPassDisabledPreemptionMode) {
|
||||
pDevice->setPreemptionMode(PreemptionMode::Disabled);
|
||||
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
pDevice->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
MockKernelWithInternals mockKernel(*pDevice);
|
||||
|
||||
@@ -71,7 +71,7 @@ struct KmdNotifyTests : public ::testing::Test {
|
||||
template <typename Family>
|
||||
class MockKmdNotifyCsr : public UltCommandStreamReceiver<Family> {
|
||||
public:
|
||||
MockKmdNotifyCsr(const ExecutionEnvironment &executionEnvironment) : UltCommandStreamReceiver<Family>(const_cast<ExecutionEnvironment &>(executionEnvironment)) {}
|
||||
MockKmdNotifyCsr(const ExecutionEnvironment &executionEnvironment) : UltCommandStreamReceiver<Family>(const_cast<ExecutionEnvironment &>(executionEnvironment), 0) {}
|
||||
MOCK_METHOD1(waitForFlushStamp, bool(FlushStamp &flushStampToWait));
|
||||
MOCK_METHOD3(waitForCompletionWithTimeout, bool(bool enableTimeout, int64_t timeoutMs, uint32_t taskCountToWait));
|
||||
};
|
||||
|
||||
@@ -23,7 +23,7 @@ using namespace NEO;
|
||||
TEST(CommandTest, mapUnmapSubmitWithoutTerminateFlagFlushesCsr) {
|
||||
std::unique_ptr<Device> device(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
|
||||
std::unique_ptr<MockCommandQueue> cmdQ(new MockCommandQueue(nullptr, device.get(), nullptr));
|
||||
MockCommandStreamReceiver csr(*device->getExecutionEnvironment());
|
||||
MockCommandStreamReceiver csr(*device->getExecutionEnvironment(), device->getRootDeviceIndex());
|
||||
MockBuffer buffer;
|
||||
|
||||
auto initialTaskCount = csr.peekTaskCount();
|
||||
@@ -40,7 +40,7 @@ TEST(CommandTest, mapUnmapSubmitWithoutTerminateFlagFlushesCsr) {
|
||||
TEST(CommandTest, mapUnmapSubmitWithTerminateFlagAbortsFlush) {
|
||||
std::unique_ptr<Device> device(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
|
||||
std::unique_ptr<MockCommandQueue> cmdQ(new MockCommandQueue(nullptr, device.get(), nullptr));
|
||||
MockCommandStreamReceiver csr(*device->getExecutionEnvironment());
|
||||
MockCommandStreamReceiver csr(*device->getExecutionEnvironment(), device->getRootDeviceIndex());
|
||||
MockBuffer buffer;
|
||||
|
||||
auto initialTaskCount = csr.peekTaskCount();
|
||||
@@ -60,7 +60,7 @@ TEST(CommandTest, mapUnmapSubmitWithTerminateFlagAbortsFlush) {
|
||||
TEST(CommandTest, markerSubmitWithoutTerminateFlagDosntFlushCsr) {
|
||||
std::unique_ptr<Device> device(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
|
||||
std::unique_ptr<MockCommandQueue> cmdQ(new MockCommandQueue(nullptr, device.get(), nullptr));
|
||||
MockCommandStreamReceiver csr(*device->getExecutionEnvironment());
|
||||
MockCommandStreamReceiver csr(*device->getExecutionEnvironment(), device->getRootDeviceIndex());
|
||||
MockBuffer buffer;
|
||||
|
||||
auto initialTaskCount = csr.peekTaskCount();
|
||||
@@ -74,7 +74,7 @@ TEST(CommandTest, markerSubmitWithoutTerminateFlagDosntFlushCsr) {
|
||||
TEST(CommandTest, markerSubmitWithTerminateFlagAbortsFlush) {
|
||||
std::unique_ptr<Device> device(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
|
||||
std::unique_ptr<MockCommandQueue> cmdQ(new MockCommandQueue(nullptr, device.get(), nullptr));
|
||||
MockCommandStreamReceiver csr(*device->getExecutionEnvironment());
|
||||
MockCommandStreamReceiver csr(*device->getExecutionEnvironment(), device->getRootDeviceIndex());
|
||||
MockBuffer buffer;
|
||||
|
||||
auto initialTaskCount = csr.peekTaskCount();
|
||||
@@ -164,7 +164,7 @@ class MockCsr1 : public CommandStreamReceiverHw<GfxFamily> {
|
||||
passedDispatchFlags = dispatchFlags;
|
||||
return CompletionStamp();
|
||||
}
|
||||
MockCsr1(ExecutionEnvironment &executionEnvironment) : CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiverHw(executionEnvironment) {}
|
||||
MockCsr1(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) : CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiverHw(executionEnvironment, rootDeviceIndex) {}
|
||||
DispatchFlags passedDispatchFlags = DispatchFlagsHelper::createDefaultDispatchFlags();
|
||||
using CommandStreamReceiver::timestampPacketWriteEnabled;
|
||||
};
|
||||
|
||||
@@ -209,7 +209,7 @@ TEST_F(TimestampPacketSimpleTests, whenObjectIsCreatedThenInitializeAllStamps) {
|
||||
}
|
||||
|
||||
HWTEST_F(TimestampPacketTests, givenCommandStreamReceiverHwWhenObtainingPreferredTagPoolSizeThenReturnCorrectValue) {
|
||||
CommandStreamReceiverHw<FamilyType> csr(*executionEnvironment);
|
||||
CommandStreamReceiverHw<FamilyType> csr(*executionEnvironment, 0);
|
||||
EXPECT_EQ(512u, csr.getPreferredTagPoolSize());
|
||||
}
|
||||
|
||||
@@ -1376,7 +1376,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());
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->getExecutionEnvironment(), device->getRootDeviceIndex());
|
||||
device->resetCommandStreamReceiver(mockCsr);
|
||||
mockCsr->timestampPacketWriteEnabled = true;
|
||||
mockCsr->storeFlushedTaskStream = true;
|
||||
|
||||
@@ -191,7 +191,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));
|
||||
std::unique_ptr<MockCsr<FamilyType>> csr(new MockCsr<FamilyType>(execStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex()));
|
||||
csr->setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
|
||||
pKernel->makeResident(*csr.get());
|
||||
|
||||
@@ -465,7 +465,7 @@ class CommandStreamReceiverMock : public CommandStreamReceiver {
|
||||
|
||||
bool isMultiOsContextCapable() const override { return false; }
|
||||
|
||||
CommandStreamReceiverMock() : BaseClass(*(new ExecutionEnvironment)) {
|
||||
CommandStreamReceiverMock() : BaseClass(*(new ExecutionEnvironment), 0) {
|
||||
this->mockExecutionEnvironment.reset(&this->executionEnvironment);
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
}
|
||||
@@ -548,7 +548,7 @@ TEST_F(KernelPrivateSurfaceTest, testPrivateSurface) {
|
||||
|
||||
// Test it
|
||||
auto executionEnvironment = pDevice->getExecutionEnvironment();
|
||||
std::unique_ptr<CommandStreamReceiverMock> csr(new CommandStreamReceiverMock(*executionEnvironment));
|
||||
std::unique_ptr<CommandStreamReceiverMock> csr(new CommandStreamReceiverMock(*executionEnvironment, 0));
|
||||
csr->setupContext(*pDevice->getDefaultEngine().osContext);
|
||||
csr->residency.clear();
|
||||
EXPECT_EQ(0u, csr->residency.size());
|
||||
|
||||
@@ -22,16 +22,16 @@ bool getDevicesResult = true;
|
||||
bool overrideCommandStreamReceiverCreation = false;
|
||||
bool overrideDeviceWithDefaultHardwareInfo = true;
|
||||
|
||||
CommandStreamReceiver *createCommandStream(ExecutionEnvironment &executionEnvironment) {
|
||||
CommandStreamReceiver *createCommandStream(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) {
|
||||
auto hwInfo = executionEnvironment.getHardwareInfo();
|
||||
|
||||
if (overrideCommandStreamReceiverCreation) {
|
||||
return createCommandStreamImpl(executionEnvironment);
|
||||
return createCommandStreamImpl(executionEnvironment, rootDeviceIndex);
|
||||
}
|
||||
|
||||
auto funcCreate = commandStreamReceiverFactory[IGFX_MAX_CORE + hwInfo->platform.eRenderCoreFamily];
|
||||
if (funcCreate) {
|
||||
return funcCreate(false, executionEnvironment);
|
||||
return funcCreate(false, executionEnvironment, rootDeviceIndex);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,6 @@ extern bool overrideCommandStreamReceiverCreation;
|
||||
extern bool overrideDeviceWithDefaultHardwareInfo;
|
||||
extern bool overrideMemoryManagerCreation;
|
||||
|
||||
extern CommandStreamReceiver *createCommandStream(ExecutionEnvironment &executionEnvironment);
|
||||
extern CommandStreamReceiver *createCommandStream(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
extern bool getDevices(size_t &numDevicesReturned, ExecutionEnvironment &executionEnvironment);
|
||||
} // namespace NEO
|
||||
|
||||
@@ -20,16 +20,16 @@ class UltAubCommandStreamReceiver : public AUBCommandStreamReceiverHw<GfxFamily>
|
||||
public:
|
||||
using BaseClass::osContext;
|
||||
|
||||
UltAubCommandStreamReceiver(const std::string &fileName, bool standalone, ExecutionEnvironment &executionEnvironment)
|
||||
: BaseClass(fileName, standalone, executionEnvironment) {
|
||||
UltAubCommandStreamReceiver(const std::string &fileName, bool standalone, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex)
|
||||
: BaseClass(fileName, standalone, executionEnvironment, rootDeviceIndex) {
|
||||
}
|
||||
|
||||
UltAubCommandStreamReceiver(ExecutionEnvironment &executionEnvironment)
|
||||
: BaseClass("aubfile", true, executionEnvironment) {
|
||||
UltAubCommandStreamReceiver(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex)
|
||||
: BaseClass("aubfile", true, executionEnvironment, rootDeviceIndex) {
|
||||
}
|
||||
|
||||
static CommandStreamReceiver *create(bool withAubDump, ExecutionEnvironment &executionEnvironment) {
|
||||
auto csr = new UltAubCommandStreamReceiver<GfxFamily>("aubfile", true, executionEnvironment);
|
||||
static CommandStreamReceiver *create(bool withAubDump, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) {
|
||||
auto csr = new UltAubCommandStreamReceiver<GfxFamily>("aubfile", true, executionEnvironment, rootDeviceIndex);
|
||||
|
||||
if (!csr->subCaptureManager->isSubCaptureMode()) {
|
||||
csr->openFile("aubfile");
|
||||
|
||||
@@ -75,10 +75,10 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw<GfxFamily>, publ
|
||||
virtual ~UltCommandStreamReceiver() override {
|
||||
}
|
||||
|
||||
UltCommandStreamReceiver(ExecutionEnvironment &executionEnvironment) : BaseClass(executionEnvironment), recursiveLockCounter(0),
|
||||
recordedDispatchFlags(DispatchFlagsHelper::createDefaultDispatchFlags()) {}
|
||||
static CommandStreamReceiver *create(bool withAubDump, ExecutionEnvironment &executionEnvironment) {
|
||||
return new UltCommandStreamReceiver<GfxFamily>(executionEnvironment);
|
||||
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);
|
||||
}
|
||||
|
||||
virtual GmmPageTableMngr *createPageTableManager() override {
|
||||
|
||||
@@ -690,7 +690,7 @@ struct BcsBufferTests : public ::testing::Test {
|
||||
public:
|
||||
BcsMockContext(Device *device) : MockContext(device) {
|
||||
bcsOsContext.reset(OsContext::create(nullptr, 0, 0, aub_stream::ENGINE_BCS, PreemptionMode::Disabled, false));
|
||||
bcsCsr.reset(createCommandStream(*device->getExecutionEnvironment()));
|
||||
bcsCsr.reset(createCommandStream(*device->getExecutionEnvironment(), device->getRootDeviceIndex()));
|
||||
bcsCsr->setupContext(*bcsOsContext);
|
||||
bcsCsr->initializeTagAllocation();
|
||||
}
|
||||
@@ -1137,7 +1137,7 @@ HWTEST_TEMPLATED_F(BcsBufferTests, givenInputAndOutputTimestampPacketWhenBlitCal
|
||||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(BcsBufferTests, givenBlockingEnqueueWhenUsingBcsThenCallWait) {
|
||||
auto myMockCsr = new MyMockCsr<FamilyType>(*device->getExecutionEnvironment());
|
||||
auto myMockCsr = new MyMockCsr<FamilyType>(*device->getExecutionEnvironment(), device->getRootDeviceIndex());
|
||||
myMockCsr->taskCount = 1234;
|
||||
myMockCsr->initializeTagAllocation();
|
||||
myMockCsr->setupContext(*bcsMockContext->bcsOsContext);
|
||||
@@ -1176,7 +1176,7 @@ HWTEST_TEMPLATED_F(BcsBufferTests, givenBlockingEnqueueWhenUsingBcsThenCallWait)
|
||||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(BcsBufferTests, givenBlockedEnqueueWhenUsingBcsThenWaitForValidTaskCountOnBlockingCall) {
|
||||
auto myMockCsr = new MyMockCsr<FamilyType>(*device->getExecutionEnvironment());
|
||||
auto myMockCsr = new MyMockCsr<FamilyType>(*device->getExecutionEnvironment(), device->getRootDeviceIndex());
|
||||
myMockCsr->taskCount = 1234;
|
||||
myMockCsr->initializeTagAllocation();
|
||||
myMockCsr->setupContext(*bcsMockContext->bcsOsContext);
|
||||
|
||||
@@ -21,7 +21,7 @@ using namespace NEO;
|
||||
template <typename Family>
|
||||
class MyCsr : public UltCommandStreamReceiver<Family> {
|
||||
public:
|
||||
MyCsr(const ExecutionEnvironment &executionEnvironment) : UltCommandStreamReceiver<Family>(const_cast<ExecutionEnvironment &>(executionEnvironment)) {}
|
||||
MyCsr(const ExecutionEnvironment &executionEnvironment) : UltCommandStreamReceiver<Family>(const_cast<ExecutionEnvironment &>(executionEnvironment), 0) {}
|
||||
MOCK_METHOD3(waitForCompletionWithTimeout, bool(bool enableTimeout, int64_t timeoutMs, uint32_t taskCountToWait));
|
||||
};
|
||||
|
||||
|
||||
@@ -861,7 +861,7 @@ HWTEST_F(HostPtrAllocationTest, givenOverlappingFragmentsWhenCheckIsCalledThenWa
|
||||
EXPECT_EQ(1u, engines.size());
|
||||
|
||||
auto csr0 = static_cast<MockCommandStreamReceiver *>(engines[0].commandStreamReceiver);
|
||||
auto csr1 = new MockCommandStreamReceiver(executionEnvironment);
|
||||
auto csr1 = new MockCommandStreamReceiver(executionEnvironment, 0);
|
||||
uint32_t csr0GpuTag = taskCountNotReady;
|
||||
uint32_t csr1GpuTag = taskCountNotReady;
|
||||
csr0->tagAddress = &csr0GpuTag;
|
||||
|
||||
@@ -63,7 +63,7 @@ HWTEST_TYPED_TEST(SurfaceTest, GivenSurfaceWhenInterfaceIsUsedThenSurfaceBehaves
|
||||
|
||||
ExecutionEnvironment *executionEnvironment = platformImpl->peekExecutionEnvironment();
|
||||
executionEnvironment->rootDeviceEnvironments[0].commandStreamReceivers.resize(1);
|
||||
MockCsr<FamilyType> *csr = new MockCsr<FamilyType>(execStamp, *executionEnvironment);
|
||||
MockCsr<FamilyType> *csr = new MockCsr<FamilyType>(execStamp, *executionEnvironment, 0);
|
||||
executionEnvironment->rootDeviceEnvironments[0].commandStreamReceivers[0].push_back(std::unique_ptr<CommandStreamReceiver>(csr));
|
||||
executionEnvironment->initializeMemoryManager();
|
||||
auto engine = HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances()[0];
|
||||
|
||||
@@ -19,10 +19,10 @@ class TestedDrmCommandStreamReceiver : public DrmCommandStreamReceiver<GfxFamily
|
||||
using CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiver::lastSentSliceCount;
|
||||
|
||||
TestedDrmCommandStreamReceiver(gemCloseWorkerMode mode, ExecutionEnvironment &executionEnvironment)
|
||||
: DrmCommandStreamReceiver<GfxFamily>(executionEnvironment, mode) {
|
||||
: DrmCommandStreamReceiver<GfxFamily>(executionEnvironment, 0, mode) {
|
||||
}
|
||||
TestedDrmCommandStreamReceiver(ExecutionEnvironment &executionEnvironment)
|
||||
: DrmCommandStreamReceiver<GfxFamily>(executionEnvironment, gemCloseWorkerMode::gemCloseWorkerInactive) {
|
||||
: DrmCommandStreamReceiver<GfxFamily>(executionEnvironment, 0, gemCloseWorkerMode::gemCloseWorkerInactive) {
|
||||
}
|
||||
|
||||
void overrideDispatchPolicy(DispatchMode overrideValue) {
|
||||
|
||||
@@ -55,14 +55,12 @@ struct MockAubCsrToTestDumpContext : public AUBCommandStreamReceiverHw<GfxFamily
|
||||
|
||||
template <typename GfxFamily>
|
||||
struct MockAubCsr : public AUBCommandStreamReceiverHw<GfxFamily> {
|
||||
MockAubCsr(const std::string &fileName, bool standalone, ExecutionEnvironment &executionEnvironment)
|
||||
: AUBCommandStreamReceiverHw<GfxFamily>(fileName, standalone, executionEnvironment){};
|
||||
|
||||
using CommandStreamReceiverHw<GfxFamily>::defaultSshSize;
|
||||
using AUBCommandStreamReceiverHw<GfxFamily>::taskCount;
|
||||
using AUBCommandStreamReceiverHw<GfxFamily>::latestSentTaskCount;
|
||||
using AUBCommandStreamReceiverHw<GfxFamily>::pollForCompletionTaskCount;
|
||||
using AUBCommandStreamReceiverHw<GfxFamily>::writeMemory;
|
||||
using AUBCommandStreamReceiverHw<GfxFamily>::AUBCommandStreamReceiverHw;
|
||||
|
||||
DispatchMode peekDispatchMode() const {
|
||||
return this->dispatchMode;
|
||||
@@ -182,7 +180,7 @@ std::unique_ptr<AubExecutionEnvironment> getEnvironment(bool createTagAllocation
|
||||
executionEnvironment->rootDeviceEnvironments[0].aubCenter.reset(new AubCenter());
|
||||
|
||||
executionEnvironment->rootDeviceEnvironments[0].commandStreamReceivers.resize(1);
|
||||
executionEnvironment->rootDeviceEnvironments[0].commandStreamReceivers[0].push_back(std::make_unique<CsrType>("", standalone, *executionEnvironment));
|
||||
executionEnvironment->rootDeviceEnvironments[0].commandStreamReceivers[0].push_back(std::make_unique<CsrType>("", standalone, *executionEnvironment, 0));
|
||||
executionEnvironment->initializeMemoryManager();
|
||||
if (createTagAllocation) {
|
||||
executionEnvironment->rootDeviceEnvironments[0].commandStreamReceivers[0][0]->initializeTagAllocation();
|
||||
|
||||
@@ -309,7 +309,6 @@ class MockCompilerInterface : public CompilerInterface {
|
||||
return std::unique_lock<std::mutex>(mtx);
|
||||
}
|
||||
|
||||
|
||||
void SetIgcMain(CIF::CIFMain *main) {
|
||||
this->igcMain.release();
|
||||
this->igcMain.reset(main);
|
||||
|
||||
@@ -37,8 +37,8 @@ class MockCsrBase : public UltCommandStreamReceiver<GfxFamily> {
|
||||
|
||||
MockCsrBase() = delete;
|
||||
|
||||
MockCsrBase(int32_t &execStamp, ExecutionEnvironment &executionEnvironment)
|
||||
: BaseUltCsrClass(executionEnvironment), executionStamp(&execStamp), flushTaskStamp(-1) {
|
||||
MockCsrBase(int32_t &execStamp, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex)
|
||||
: BaseUltCsrClass(executionEnvironment, rootDeviceIndex), executionStamp(&execStamp), flushTaskStamp(-1) {
|
||||
}
|
||||
|
||||
void makeResident(GraphicsAllocation &gfxAllocation) override {
|
||||
@@ -97,7 +97,7 @@ using MockCsrHw = MockCsrBase<GfxFamily>;
|
||||
template <typename GfxFamily>
|
||||
class MockCsrAub : public MockCsrBase<GfxFamily> {
|
||||
public:
|
||||
MockCsrAub(int32_t &execStamp, ExecutionEnvironment &executionEnvironment) : MockCsrBase<GfxFamily>(execStamp, executionEnvironment) {}
|
||||
MockCsrAub(int32_t &execStamp, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) : MockCsrBase<GfxFamily>(execStamp, executionEnvironment, rootDeviceIndex) {}
|
||||
CommandStreamReceiverType getType() override {
|
||||
return CommandStreamReceiverType::CSR_AUB;
|
||||
}
|
||||
@@ -111,7 +111,7 @@ class MockCsr : public MockCsrBase<GfxFamily> {
|
||||
|
||||
MockCsr() = delete;
|
||||
MockCsr(const HardwareInfo &hwInfoIn) = delete;
|
||||
MockCsr(int32_t &execStamp, ExecutionEnvironment &executionEnvironment) : BaseClass(execStamp, executionEnvironment) {
|
||||
MockCsr(int32_t &execStamp, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) : BaseClass(execStamp, executionEnvironment, rootDeviceIndex) {
|
||||
}
|
||||
|
||||
FlushStamp flush(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency) override {
|
||||
@@ -157,6 +157,7 @@ class MockCsrHw2 : public CommandStreamReceiverHw<GfxFamily> {
|
||||
using CommandStreamReceiverHw<GfxFamily>::programL3;
|
||||
using CommandStreamReceiverHw<GfxFamily>::csrSizeRequestFlags;
|
||||
using CommandStreamReceiverHw<GfxFamily>::programVFEState;
|
||||
using CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiverHw;
|
||||
using CommandStreamReceiver::commandStream;
|
||||
using CommandStreamReceiver::dispatchMode;
|
||||
using CommandStreamReceiver::isPreambleSent;
|
||||
@@ -168,7 +169,7 @@ class MockCsrHw2 : public CommandStreamReceiverHw<GfxFamily> {
|
||||
using CommandStreamReceiver::taskLevel;
|
||||
using CommandStreamReceiver::timestampPacketWriteEnabled;
|
||||
|
||||
MockCsrHw2(ExecutionEnvironment &executionEnvironment) : CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiverHw(executionEnvironment) {}
|
||||
MockCsrHw2(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) : CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiverHw(executionEnvironment, rootDeviceIndex) {}
|
||||
|
||||
SubmissionAggregator *peekSubmissionAggregator() {
|
||||
return this->submissionAggregator.get();
|
||||
|
||||
@@ -20,7 +20,7 @@ bool MockDevice::createSingleDevice = true;
|
||||
|
||||
MockDevice::MockDevice()
|
||||
: MockDevice(new MockExecutionEnvironment(), 0u) {
|
||||
CommandStreamReceiver *commandStreamReceiver = createCommandStream(*this->executionEnvironment);
|
||||
CommandStreamReceiver *commandStreamReceiver = createCommandStream(*this->executionEnvironment, this->getRootDeviceIndex());
|
||||
executionEnvironment->rootDeviceEnvironments[0].commandStreamReceivers.resize(internalDeviceIndex + 1);
|
||||
executionEnvironment->rootDeviceEnvironments[0].commandStreamReceivers[internalDeviceIndex].resize(defaultEngineIndex + 1);
|
||||
executionEnvironment->rootDeviceEnvironments[0].commandStreamReceivers[internalDeviceIndex][defaultEngineIndex].reset(commandStreamReceiver);
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace NEO {
|
||||
class OSTime;
|
||||
class FailMemoryManager;
|
||||
|
||||
extern CommandStreamReceiver *createCommandStream(ExecutionEnvironment &executionEnvironment);
|
||||
extern CommandStreamReceiver *createCommandStream(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
|
||||
class MockDevice : public RootDevice {
|
||||
public:
|
||||
|
||||
@@ -53,7 +53,7 @@ struct MockExecutionEnvironmentWithCsr : public ExecutionEnvironment {
|
||||
|
||||
for (uint32_t deviceIndex = 0; deviceIndex < devicesCount; deviceIndex++) {
|
||||
for (uint32_t csrIndex = 0; csrIndex < gpgpuEngines.size(); csrIndex++) {
|
||||
rootDeviceEnvironments[0].commandStreamReceivers[deviceIndex + offset].push_back(std::unique_ptr<CommandStreamReceiver>(new CsrType(*this)));
|
||||
rootDeviceEnvironments[0].commandStreamReceivers[deviceIndex + offset].push_back(std::unique_ptr<CommandStreamReceiver>(new CsrType(*this, deviceIndex)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ class MockTbxCsr : public TbxCommandStreamReceiverHw<GfxFamily> {
|
||||
using TbxCommandStreamReceiverHw<GfxFamily>::writeMemory;
|
||||
using TbxCommandStreamReceiverHw<GfxFamily>::allocationsForDownload;
|
||||
MockTbxCsr(ExecutionEnvironment &executionEnvironment)
|
||||
: TbxCommandStreamReceiverHw<GfxFamily>(executionEnvironment) {}
|
||||
: TbxCommandStreamReceiverHw<GfxFamily>(executionEnvironment, 0) {}
|
||||
|
||||
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));
|
||||
std::unique_ptr<CommandStreamReceiver> ptr(DeviceCommandStreamReceiver<FamilyType>::create(false, *executionEnvironment, 0));
|
||||
DrmMockSuccess mockDrm;
|
||||
EXPECT_NE(nullptr, ptr);
|
||||
}
|
||||
|
||||
HWTEST_F(DeviceCommandStreamLeaksTest, givenDefaultDrmCsrWhenItIsCreatedThenGemCloseWorkerInactiveModeIsSelected) {
|
||||
std::unique_ptr<CommandStreamReceiver> ptr(DeviceCommandStreamReceiver<FamilyType>::create(false, *executionEnvironment));
|
||||
std::unique_ptr<CommandStreamReceiver> ptr(DeviceCommandStreamReceiver<FamilyType>::create(false, *executionEnvironment, 0));
|
||||
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));
|
||||
std::unique_ptr<CommandStreamReceiver> ptr(DeviceCommandStreamReceiver<FamilyType>::create(true, *executionEnvironment, 0));
|
||||
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,8 +56,8 @@ HWTEST_F(DeviceCommandStreamLeaksTest, givenDefaultDrmCsrWithAubDumWhenItIsCreat
|
||||
}
|
||||
|
||||
HWTEST_F(DeviceCommandStreamLeaksTest, givenDefaultDrmCsrWhenOsInterfaceIsNullptrThenValidateDrm) {
|
||||
std::unique_ptr<CommandStreamReceiver> ptr(DeviceCommandStreamReceiver<FamilyType>::create(false, *executionEnvironment));
|
||||
std::unique_ptr<CommandStreamReceiver> ptr(DeviceCommandStreamReceiver<FamilyType>::create(false, *executionEnvironment, 0));
|
||||
auto drmCsr = (DrmCommandStreamReceiver<FamilyType> *)ptr.get();
|
||||
EXPECT_NE(nullptr, executionEnvironment->osInterface);
|
||||
EXPECT_EQ(drmCsr->getOSInterface()->get()->getDrm(), executionEnvironment->osInterface->get()->getDrm());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ class WddmCommandStreamFixture {
|
||||
memoryManager = new MockWddmMemoryManager(*executionEnvironment);
|
||||
executionEnvironment->memoryManager.reset(memoryManager);
|
||||
wddm = static_cast<WddmMock *>(executionEnvironment->osInterface->get()->getWddm());
|
||||
csr = new WddmCommandStreamReceiver<DEFAULT_TEST_FAMILY_NAME>(*executionEnvironment);
|
||||
csr = new WddmCommandStreamReceiver<DEFAULT_TEST_FAMILY_NAME>(*executionEnvironment, 0);
|
||||
device.reset(MockDevice::create<MockDevice>(executionEnvironment, 0u));
|
||||
|
||||
device->resetCommandStreamReceiver(csr);
|
||||
@@ -123,7 +123,7 @@ class WddmCommandStreamWithMockGdiFixture {
|
||||
wddm->gdi.reset(gdi);
|
||||
ASSERT_NE(wddm, nullptr);
|
||||
DebugManager.flags.CsrDispatchMode.set(static_cast<uint32_t>(DispatchMode::ImmediateDispatch));
|
||||
this->csr = new MockWddmCsr<DEFAULT_TEST_FAMILY_NAME>(*executionEnvironment);
|
||||
this->csr = new MockWddmCsr<DEFAULT_TEST_FAMILY_NAME>(*executionEnvironment, 0);
|
||||
memoryManager = new WddmMemoryManager(*executionEnvironment);
|
||||
ASSERT_NE(nullptr, memoryManager);
|
||||
executionEnvironment->memoryManager.reset(memoryManager);
|
||||
@@ -149,7 +149,7 @@ TEST_F(DeviceCommandStreamTest, CreateWddmCSR) {
|
||||
executionEnvironment->osInterface = std::make_unique<OSInterface>();
|
||||
executionEnvironment->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)));
|
||||
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)));
|
||||
EXPECT_NE(nullptr, csr);
|
||||
auto wddmFromCsr = csr->peekWddm();
|
||||
EXPECT_NE(nullptr, wddmFromCsr);
|
||||
@@ -161,7 +161,7 @@ TEST_F(DeviceCommandStreamTest, CreateWddmCSRWithAubDump) {
|
||||
executionEnvironment->osInterface = std::make_unique<OSInterface>();
|
||||
executionEnvironment->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)));
|
||||
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)));
|
||||
EXPECT_NE(nullptr, csr);
|
||||
auto wddmFromCsr = csr->peekWddm();
|
||||
EXPECT_NE(nullptr, wddmFromCsr);
|
||||
@@ -243,7 +243,7 @@ TEST(WddmPreemptionHeaderTests, givenWddmCommandStreamReceiverWhenPreemptionIsOf
|
||||
executionEnvironment->setHwInfo(hwInfo);
|
||||
auto wddm = static_cast<WddmMock *>(executionEnvironment->osInterface->get()->getWddm());
|
||||
executionEnvironment->rootDeviceEnvironments[0].commandStreamReceivers.resize(1);
|
||||
executionEnvironment->rootDeviceEnvironments[0].commandStreamReceivers[0].push_back(std::make_unique<MockWddmCsr<DEFAULT_TEST_FAMILY_NAME>>(*executionEnvironment));
|
||||
executionEnvironment->rootDeviceEnvironments[0].commandStreamReceivers[0].push_back(std::make_unique<MockWddmCsr<DEFAULT_TEST_FAMILY_NAME>>(*executionEnvironment, 0));
|
||||
executionEnvironment->memoryManager.reset(new MemoryManagerCreate<WddmMemoryManager>(false, false, *executionEnvironment));
|
||||
executionEnvironment->rootDeviceEnvironments[0].commandStreamReceivers[0][0]->overrideDispatchPolicy(DispatchMode::ImmediateDispatch);
|
||||
OsContextWin osContext(*wddm, 0u, 1, HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances()[0],
|
||||
@@ -269,7 +269,7 @@ TEST(WddmPreemptionHeaderTests, givenWddmCommandStreamReceiverWhenPreemptionIsOn
|
||||
executionEnvironment->setHwInfo(hwInfo);
|
||||
auto wddm = static_cast<WddmMock *>(executionEnvironment->osInterface->get()->getWddm());
|
||||
executionEnvironment->rootDeviceEnvironments[0].commandStreamReceivers.resize(1);
|
||||
executionEnvironment->rootDeviceEnvironments[0].commandStreamReceivers[0].push_back(std::make_unique<MockWddmCsr<DEFAULT_TEST_FAMILY_NAME>>(*executionEnvironment));
|
||||
executionEnvironment->rootDeviceEnvironments[0].commandStreamReceivers[0].push_back(std::make_unique<MockWddmCsr<DEFAULT_TEST_FAMILY_NAME>>(*executionEnvironment, 0));
|
||||
executionEnvironment->memoryManager.reset(new MemoryManagerCreate<WddmMemoryManager>(false, false, *executionEnvironment));
|
||||
executionEnvironment->rootDeviceEnvironments[0].commandStreamReceivers[0][0]->overrideDispatchPolicy(DispatchMode::ImmediateDispatch);
|
||||
OsContextWin osContext(*wddm, 0u, 1, HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances()[0],
|
||||
@@ -294,7 +294,7 @@ TEST(WddmPreemptionHeaderTests, givenDeviceSupportingPreemptionWhenCommandStream
|
||||
ExecutionEnvironment *executionEnvironment = getExecutionEnvironmentImpl(hwInfo);
|
||||
hwInfo->capabilityTable.defaultPreemptionMode = PreemptionMode::MidThread;
|
||||
executionEnvironment->setHwInfo(hwInfo);
|
||||
auto commandStreamReceiver = std::make_unique<MockWddmCsr<DEFAULT_TEST_FAMILY_NAME>>(*executionEnvironment);
|
||||
auto commandStreamReceiver = std::make_unique<MockWddmCsr<DEFAULT_TEST_FAMILY_NAME>>(*executionEnvironment, 0);
|
||||
auto commandHeader = commandStreamReceiver->commandBufferHeader;
|
||||
auto header = reinterpret_cast<COMMAND_BUFFER_HEADER *>(commandHeader);
|
||||
EXPECT_TRUE(header->NeedsMidBatchPreEmptionSupport);
|
||||
@@ -305,7 +305,7 @@ TEST(WddmPreemptionHeaderTests, givenDevicenotSupportingPreemptionWhenCommandStr
|
||||
ExecutionEnvironment *executionEnvironment = getExecutionEnvironmentImpl(hwInfo);
|
||||
hwInfo->capabilityTable.defaultPreemptionMode = PreemptionMode::Disabled;
|
||||
executionEnvironment->setHwInfo(hwInfo);
|
||||
auto commandStreamReceiver = std::make_unique<MockWddmCsr<DEFAULT_TEST_FAMILY_NAME>>(*executionEnvironment);
|
||||
auto commandStreamReceiver = std::make_unique<MockWddmCsr<DEFAULT_TEST_FAMILY_NAME>>(*executionEnvironment, 0);
|
||||
auto commandHeader = commandStreamReceiver->commandBufferHeader;
|
||||
auto header = reinterpret_cast<COMMAND_BUFFER_HEADER *>(commandHeader);
|
||||
EXPECT_FALSE(header->NeedsMidBatchPreEmptionSupport);
|
||||
@@ -808,7 +808,7 @@ HWTEST_F(WddmSimpleTest, givenDefaultWddmCsrWhenItIsCreatedThenBatchingIsTurnedO
|
||||
executionEnvironment->osInterface = std::make_unique<OSInterface>();
|
||||
executionEnvironment->osInterface->get()->setWddm(wddm);
|
||||
executionEnvironment->memoryOperationsInterface = std::make_unique<WddmMemoryOperationsHandler>(wddm);
|
||||
std::unique_ptr<MockWddmCsr<FamilyType>> mockCsr(new MockWddmCsr<FamilyType>(*executionEnvironment));
|
||||
std::unique_ptr<MockWddmCsr<FamilyType>> mockCsr(new MockWddmCsr<FamilyType>(*executionEnvironment, 0));
|
||||
EXPECT_EQ(DispatchMode::BatchedDispatch, mockCsr->dispatchMode);
|
||||
}
|
||||
|
||||
@@ -817,7 +817,7 @@ HWTEST_F(WddmDefaultTest, givenFtrWddmHwQueuesFlagWhenCreatingCsrThenPickWddmVer
|
||||
pDevice->executionEnvironment->osInterface = std::make_unique<OSInterface>();
|
||||
pDevice->executionEnvironment->osInterface->get()->setWddm(wddm);
|
||||
pDevice->executionEnvironment->memoryOperationsInterface = std::make_unique<WddmMemoryOperationsHandler>(wddm);
|
||||
WddmCommandStreamReceiver<FamilyType> wddmCsr(*pDevice->executionEnvironment);
|
||||
WddmCommandStreamReceiver<FamilyType> wddmCsr(*pDevice->executionEnvironment, 0);
|
||||
|
||||
auto wddmFromCsr = wddmCsr.peekWddm();
|
||||
EXPECT_EQ(typeid(*wddmFromCsr), typeid(WddmMock));
|
||||
@@ -850,7 +850,7 @@ HWTEST_P(WddmCsrCompressionParameterizedTest, givenEnabledCompressionWhenInitial
|
||||
myMockWddm = static_cast<WddmMock *>(executionEnvironment->osInterface->get()->getWddm());
|
||||
EXPECT_EQ(nullptr, myMockWddm->getPageTableManager());
|
||||
|
||||
MockWddmCsr<FamilyType> mockWddmCsr(*executionEnvironment);
|
||||
MockWddmCsr<FamilyType> mockWddmCsr(*executionEnvironment, 0);
|
||||
mockWddmCsr.createPageTableManager();
|
||||
ASSERT_NE(nullptr, myMockWddm->getPageTableManager());
|
||||
|
||||
@@ -872,7 +872,7 @@ HWTEST_F(WddmCsrCompressionTests, givenDisabledCompressionWhenInitializedThenDon
|
||||
std::unique_ptr<MockDevice> device(Device::create<MockDevice>(executionEnvironment, 0u));
|
||||
setCompressionEnabled(false, false);
|
||||
myMockWddm = static_cast<WddmMock *>(executionEnvironment->osInterface->get()->getWddm());
|
||||
MockWddmCsr<FamilyType> mockWddmCsr(*executionEnvironment);
|
||||
MockWddmCsr<FamilyType> mockWddmCsr(*executionEnvironment, 0);
|
||||
EXPECT_EQ(nullptr, myMockWddm->getPageTableManager());
|
||||
}
|
||||
|
||||
@@ -880,7 +880,7 @@ HWTEST_P(WddmCsrCompressionParameterizedTest, givenEnabledCompressionWhenFlushin
|
||||
ExecutionEnvironment *executionEnvironment = getExecutionEnvironmentImpl(hwInfo);
|
||||
setCompressionEnabled(compressionEnabled, !compressionEnabled);
|
||||
myMockWddm = static_cast<WddmMock *>(executionEnvironment->osInterface->get()->getWddm());
|
||||
auto mockWddmCsr = new MockWddmCsr<FamilyType>(*executionEnvironment);
|
||||
auto mockWddmCsr = new MockWddmCsr<FamilyType>(*executionEnvironment, 0);
|
||||
mockWddmCsr->createPageTableManager();
|
||||
mockWddmCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
executionEnvironment->memoryManager.reset(new WddmMemoryManager(*executionEnvironment));
|
||||
@@ -928,7 +928,7 @@ HWTEST_F(WddmCsrCompressionTests, givenDisabledCompressionWhenFlushingThenDontIn
|
||||
setCompressionEnabled(false, false);
|
||||
myMockWddm = static_cast<WddmMock *>(executionEnvironment->osInterface->get()->getWddm());
|
||||
|
||||
auto mockWddmCsr = new MockWddmCsr<FamilyType>(*executionEnvironment);
|
||||
auto mockWddmCsr = new MockWddmCsr<FamilyType>(*executionEnvironment, 0);
|
||||
mockWddmCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
executionEnvironment->memoryManager.reset(new WddmMemoryManager(*executionEnvironment));
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace NEO {
|
||||
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[IGFX_MAX_CORE];
|
||||
|
||||
CommandStreamReceiver *createMockCommandStreamReceiver(bool withAubDump, ExecutionEnvironment &executionEnvironment);
|
||||
CommandStreamReceiver *createMockCommandStreamReceiver(bool withAubDump, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
|
||||
class DriverInfoDeviceTest : public ::testing::Test {
|
||||
public:
|
||||
@@ -45,8 +45,8 @@ class DriverInfoDeviceTest : public ::testing::Test {
|
||||
const HardwareInfo *hwInfo;
|
||||
};
|
||||
|
||||
CommandStreamReceiver *createMockCommandStreamReceiver(bool withAubDump, ExecutionEnvironment &executionEnvironment) {
|
||||
auto csr = new MockCommandStreamReceiver(executionEnvironment);
|
||||
CommandStreamReceiver *createMockCommandStreamReceiver(bool withAubDump, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) {
|
||||
auto csr = new MockCommandStreamReceiver(executionEnvironment, rootDeviceIndex);
|
||||
if (!executionEnvironment.osInterface) {
|
||||
executionEnvironment.osInterface = std::make_unique<OSInterface>();
|
||||
auto wddm = new WddmMock();
|
||||
|
||||
@@ -1613,7 +1613,7 @@ TEST_F(WddmMemoryManagerTest2, givenReadOnlyMemoryPassedToPopulateOsHandlesWhenC
|
||||
|
||||
TEST(WddmMemoryManagerCleanupTest, givenUsedTagAllocationInWddmMemoryManagerWhenCleanupMemoryManagerThenDontAccessCsr) {
|
||||
ExecutionEnvironment &executionEnvironment = *platform()->peekExecutionEnvironment();
|
||||
auto csr = createCommandStream(executionEnvironment);
|
||||
auto csr = createCommandStream(executionEnvironment, 0);
|
||||
auto wddm = new WddmMock();
|
||||
auto preemptionMode = PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]);
|
||||
auto hwInfo = *platformDevices[0];
|
||||
|
||||
@@ -179,7 +179,7 @@ namespace NEO {
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[IGFX_MAX_CORE];
|
||||
}
|
||||
|
||||
CommandStreamReceiver *createMockCommandStreamReceiver(bool withAubDump, ExecutionEnvironment &executionEnvironment) {
|
||||
CommandStreamReceiver *createMockCommandStreamReceiver(bool withAubDump, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) {
|
||||
return nullptr;
|
||||
};
|
||||
|
||||
|
||||
@@ -442,7 +442,7 @@ HWTEST_P(PreemptionTest, whenFailToCreatePreemptionAllocationThenFailToCreateDev
|
||||
class MockUltCsr : public UltCommandStreamReceiver<FamilyType> {
|
||||
|
||||
public:
|
||||
MockUltCsr(ExecutionEnvironment &executionEnvironment) : UltCommandStreamReceiver<FamilyType>(executionEnvironment) {
|
||||
MockUltCsr(ExecutionEnvironment &executionEnvironment) : UltCommandStreamReceiver<FamilyType>(executionEnvironment, 0) {
|
||||
}
|
||||
|
||||
bool createPreemptionAllocation() override {
|
||||
|
||||
@@ -1367,7 +1367,7 @@ HWTEST_F(PatchTokenTests, givenKernelRequiringConstantAllocationWhenMakeResident
|
||||
ASSERT_EQ(CL_SUCCESS, retVal);
|
||||
ASSERT_NE(nullptr, pKernel);
|
||||
|
||||
auto pCommandStreamReceiver = new CommandStreamReceiverMock<FamilyType>(*pDevice->executionEnvironment);
|
||||
auto pCommandStreamReceiver = new CommandStreamReceiverMock<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
ASSERT_NE(nullptr, pCommandStreamReceiver);
|
||||
|
||||
pDevice->resetCommandStreamReceiver(pCommandStreamReceiver);
|
||||
|
||||
@@ -36,7 +36,7 @@ struct EnqueueBufferWindowsTest : public HardwareParse,
|
||||
|
||||
template <typename FamilyType>
|
||||
void initializeFixture() {
|
||||
auto wddmCsr = new WddmCommandStreamReceiver<FamilyType>(*executionEnvironment);
|
||||
auto wddmCsr = new WddmCommandStreamReceiver<FamilyType>(*executionEnvironment, 0);
|
||||
|
||||
executionEnvironment->rootDeviceEnvironments[0].commandStreamReceivers.resize(1);
|
||||
executionEnvironment->rootDeviceEnvironments[0].commandStreamReceivers[0].push_back(std::unique_ptr<CommandStreamReceiver>(wddmCsr));
|
||||
|
||||
@@ -65,7 +65,7 @@ struct GlArbSyncEventTest : public ::testing::Test {
|
||||
|
||||
void SetUp() override {
|
||||
executionEnvironment = platformImpl->peekExecutionEnvironment();
|
||||
auto mockCsr = new MockCommandStreamReceiver(*executionEnvironment);
|
||||
auto mockCsr = new MockCommandStreamReceiver(*executionEnvironment, 0);
|
||||
executionEnvironment->memoryManager = std::make_unique<OsAgnosticMemoryManager>(*executionEnvironment);
|
||||
device.reset(MockDevice::create<MockDevice>(executionEnvironment, 0u));
|
||||
device->resetCommandStreamReceiver(mockCsr);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user