mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
fix: setting flush stamp to not have zero value
when direct submission and monitor fence is not required then use current fence value to update flush stamp Related-To: NEO-9123 Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
0e8c3bf473
commit
3ad68cb7d6
@@ -150,7 +150,8 @@ uint64_t WddmDirectSubmission<GfxFamily, Dispatcher>::updateTagValue(bool requir
|
|||||||
if (requireMonitorFence) {
|
if (requireMonitorFence) {
|
||||||
return this->updateTagValueImpl();
|
return this->updateTagValueImpl();
|
||||||
}
|
}
|
||||||
return 0ull;
|
MonitoredFence ¤tFence = osContextWin->getResidencyController().getMonitoredFence();
|
||||||
|
return currentFence.currentFenceValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily, typename Dispatcher>
|
template <typename GfxFamily, typename Dispatcher>
|
||||||
|
|||||||
@@ -454,22 +454,6 @@ HWTEST_F(WddmDirectSubmissionTest, givenWddmWhenUpdatingTagValueThenExpectcomple
|
|||||||
EXPECT_EQ(value, wddmDirectSubmission.ringBuffers[wddmDirectSubmission.currentRingBuffer].completionFence);
|
EXPECT_EQ(value, wddmDirectSubmission.ringBuffers[wddmDirectSubmission.currentRingBuffer].completionFence);
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST_F(WddmDirectSubmissionTest, givenWddmDisableMonitorFenceWhenUpdatingTagValueThenDoNotUpdateCompletionFenceAndReturnZero) {
|
|
||||||
uint64_t address = 0xFF00FF0000ull;
|
|
||||||
uint64_t value = 0x12345678ull;
|
|
||||||
MonitoredFence &contextFence = osContext->getResidencyController().getMonitoredFence();
|
|
||||||
contextFence.gpuAddress = address;
|
|
||||||
contextFence.currentFenceValue = value;
|
|
||||||
|
|
||||||
MockWddmDirectSubmission<FamilyType, RenderDispatcher<FamilyType>> wddmDirectSubmission(*device->getDefaultEngine().commandStreamReceiver);
|
|
||||||
wddmDirectSubmission.disableMonitorFence = true;
|
|
||||||
EXPECT_TRUE(wddmDirectSubmission.allocateOsResources());
|
|
||||||
|
|
||||||
uint64_t actualTagValue = wddmDirectSubmission.updateTagValue(wddmDirectSubmission.dispatchMonitorFenceRequired(false));
|
|
||||||
EXPECT_EQ(0ull, actualTagValue);
|
|
||||||
EXPECT_EQ(value, contextFence.currentFenceValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
HWTEST_F(WddmDirectSubmissionTest, givenWddmDisableMonitorFenceAndStallingCmdsWhenUpdatingTagValueThenUpdateCompletionFence) {
|
HWTEST_F(WddmDirectSubmissionTest, givenWddmDisableMonitorFenceAndStallingCmdsWhenUpdatingTagValueThenUpdateCompletionFence) {
|
||||||
uint64_t address = 0xFF00FF0000ull;
|
uint64_t address = 0xFF00FF0000ull;
|
||||||
uint64_t value = 0x12345678ull;
|
uint64_t value = 0x12345678ull;
|
||||||
@@ -547,6 +531,18 @@ HWTEST_F(WddmDirectSubmissionWithMockGdiDllTest, givenRingMonitorFenceHangDetect
|
|||||||
EXPECT_EQ(std::numeric_limits<uint64_t>::max(), actualTagValue);
|
EXPECT_EQ(std::numeric_limits<uint64_t>::max(), actualTagValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HWTEST_F(WddmDirectSubmissionTest, givenDetectGpuFalseAndRequiredMonitorFenceWhenCallUpdateTagValueThenCurrentFenceValueIsReturned) {
|
||||||
|
uint64_t value = 0x12345678ull;
|
||||||
|
MonitoredFence &contextFence = osContext->getResidencyController().getMonitoredFence();
|
||||||
|
contextFence.currentFenceValue = value;
|
||||||
|
|
||||||
|
MockWddmDirectSubmission<FamilyType, RenderDispatcher<FamilyType>> wddmDirectSubmission(*device->getDefaultEngine().commandStreamReceiver);
|
||||||
|
wddmDirectSubmission.detectGpuHang = false;
|
||||||
|
|
||||||
|
uint64_t actualTagValue = wddmDirectSubmission.updateTagValue(false);
|
||||||
|
EXPECT_EQ(value, actualTagValue);
|
||||||
|
}
|
||||||
|
|
||||||
HWTEST_F(WddmDirectSubmissionTest, givenWddmDisableMonitorFenceWhenHandleStopRingBufferThenExpectCompletionFenceUpdated) {
|
HWTEST_F(WddmDirectSubmissionTest, givenWddmDisableMonitorFenceWhenHandleStopRingBufferThenExpectCompletionFenceUpdated) {
|
||||||
uint64_t address = 0xFF00FF0000ull;
|
uint64_t address = 0xFF00FF0000ull;
|
||||||
uint64_t value = 0x12345678ull;
|
uint64_t value = 0x12345678ull;
|
||||||
|
|||||||
Reference in New Issue
Block a user