mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 15:53:45 +08:00
Initial EXEC_OBJECT_ASYNC support
Change-Id: I68894fa403ed8adc432afcd1119ea7eb88093a11 Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
41fef1c71e
commit
28bc761607
@@ -747,6 +747,35 @@ HWTEST_TEMPLATED_F(DrmCommandStreamBatchingTests, givenCSRWhenFlushIsCalledThenP
|
||||
mm->freeGraphicsMemory(commandBuffer);
|
||||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(DrmCommandStreamBatchingTests, givenDebugFlagSetWhenCallingExecIoctlThenPassAsyncFlag) {
|
||||
DebugManagerStateRestore restore;
|
||||
|
||||
auto commandBuffer = mm->allocateGraphicsMemoryWithProperties(MockAllocationProperties{csr->getRootDeviceIndex(), MemoryConstants::pageSize});
|
||||
LinearStream cs(commandBuffer);
|
||||
|
||||
CommandStreamReceiverHw<FamilyType>::addBatchBufferEnd(cs, nullptr);
|
||||
CommandStreamReceiverHw<FamilyType>::alignToCacheLine(cs);
|
||||
BatchBuffer batchBuffer{cs.getGraphicsAllocation(), 0, 0, nullptr, false, false, QueueThrottle::MEDIUM, QueueSliceCount::defaultSliceCount, cs.getUsed(), &cs, nullptr};
|
||||
|
||||
uint64_t baseFlags = static_cast<OsContextLinux &>(csr->getOsContext()).getEngineFlag() | I915_EXEC_NO_RELOC;
|
||||
|
||||
{
|
||||
DebugManager.flags.UseAsyncDrmExec.set(0);
|
||||
csr->flush(batchBuffer, csr->getResidencyAllocations());
|
||||
|
||||
EXPECT_EQ(baseFlags, this->mock->execBuffer.flags);
|
||||
}
|
||||
|
||||
{
|
||||
DebugManager.flags.UseAsyncDrmExec.set(1);
|
||||
csr->flush(batchBuffer, csr->getResidencyAllocations());
|
||||
|
||||
EXPECT_EQ((baseFlags | EXEC_OBJECT_ASYNC), this->mock->execBuffer.flags);
|
||||
}
|
||||
|
||||
mm->freeGraphicsMemory(commandBuffer);
|
||||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(DrmCommandStreamBatchingTests, givenCsrWhenDispatchPolicyIsSetToBatchingThenCommandBufferIsNotSubmitted) {
|
||||
mock->reset();
|
||||
csr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
|
||||
@@ -161,3 +161,4 @@ LimitBlitterMaxHeight = -1
|
||||
FlushAfterEachBlit = -1
|
||||
UseCommandBufferHeaderSizeForWddmQueueSubmission = 0
|
||||
OverridePreemptionSurfaceSizeInMb = -1
|
||||
UseAsyncDrmExec = -1
|
||||
Reference in New Issue
Block a user