fix: Flush monitor fence only to context where needed

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2024-12-09 14:05:54 +00:00
committed by Compute-Runtime-Automation
parent 51c0e80299
commit c2093990d4
2 changed files with 10 additions and 3 deletions

View File

@@ -1215,9 +1215,13 @@ HWTEST_TEMPLATED_F(WddmCommandStreamMockGdiTest, givenLastSubmittedFenceLowerTha
wddm->callBaseWaitFromCpu = true;
EXPECT_EQ(directSubmission->flushMonitorFenceCalled, 0u);
D3DKMT_HANDLE handle = 1;
uint64_t value = 0u;
NEO::MonitoredFence monitorFence = {};
monitorFence.cpuAddress = &value;
auto gpuVa = castToUint64(&value);
static_cast<OsContextWin *>(device->getDefaultEngine().osContext)->getResidencyController().resetMonitoredFenceParams(handle, &value, gpuVa);
wddm->waitFromCpu(1, monitorFence, false);
EXPECT_EQ(directSubmission->flushMonitorFenceCalled, 1u);