fix: set correct initial DirectSubmission fence value

Related-To: HSD-18039278676

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2024-07-19 08:42:23 +00:00
committed by Compute-Runtime-Automation
parent 85c8c09990
commit 4fc37f9afd
4 changed files with 22 additions and 1 deletions

View File

@@ -204,6 +204,24 @@ HWTEST_F(DrmDirectSubmissionTest, givenDebugFlagSetWhenInitializingThenOverrideF
EXPECT_EQ(fenceStartValue, directSubmission.completionFenceValue);
}
HWTEST_F(DrmDirectSubmissionTest, givenLatestSentTaskCountWhenInitializingThenSetStartValue) {
DebugManagerStateRestore restorer;
TaskCountType fenceStartValue = 1234;
debugManager.flags.EnableDrmCompletionFence.set(1);
auto &commandStreamReceiver = device->getUltCommandStreamReceiver<FamilyType>();
commandStreamReceiver.latestSentTaskCount = fenceStartValue;
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);