Debug flag to override fence start value

Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2022-12-01 14:08:43 +00:00
committed by Compute-Runtime-Automation
parent 03e19abbe5
commit 6f283d7bf5
4 changed files with 23 additions and 1 deletions

View File

@@ -489,4 +489,5 @@ UseHighAlignmentForHeapExtended = -1
ForceAutoGrfCompilationMode = -1
ForceComputeWalkerPostSyncFlush = -1
DirectSubmissionRelaxedOrdering = -1
DirectSubmissionRelaxedOrderingForBcs = -1
DirectSubmissionRelaxedOrderingForBcs = -1
OverrideUserFenceStartValue = -1

View File

@@ -173,6 +173,22 @@ HWTEST_F(DrmDirectSubmissionTest, givenCompletionFenceSupportWhenGettingCompleti
EXPECT_EQ(&directSubmission.completionFenceValue, directSubmission.getCompletionValuePointer());
}
HWTEST_F(DrmDirectSubmissionTest, givenDebugFlagSetWhenInitializingThenOverrideFenceStartValue) {
DebugManagerStateRestore restorer;
TaskCountType fenceStartValue = 1234;
DebugManager.flags.EnableDrmCompletionFence.set(1);
DebugManager.flags.OverrideUserFenceStartValue.set(static_cast<int32_t>(fenceStartValue));
auto &commandStreamReceiver = *device->getDefaultEngine().commandStreamReceiver;
auto drm = executionEnvironment.rootDeviceEnvironments[0]->osInterface->getDriverModel()->as<Drm>();
ASSERT_TRUE(drm->completionFenceSupport());
MockDrmDirectSubmission<FamilyType, RenderDispatcher<FamilyType>> directSubmission(commandStreamReceiver);
EXPECT_EQ(fenceStartValue, directSubmission.completionFenceValue);
}
HWTEST_F(DrmDirectSubmissionTest, givenNoCompletionFenceSupportWhenGettingCompletionFencePointerThenNullptrIsReturned) {
DebugManagerStateRestore restorer;
DebugManager.flags.EnableDrmCompletionFence.set(0);