fix: Use current fence values when create fence for ULLS

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2024-04-24 11:53:41 +00:00
committed by Compute-Runtime-Automation
parent 149523b73c
commit 4be3230051
4 changed files with 19 additions and 6 deletions

View File

@@ -97,6 +97,12 @@ bool WddmInterface20::submit(uint64_t commandBuffer, size_t size, void *commandH
return STATUS_SUCCESS == status;
}
bool NEO::WddmInterface20::createMonitoredFenceForDirectSubmission(MonitoredFence &monitorFence, OsContextWin &osContext) {
auto ret = WddmInterface::createMonitoredFence(monitorFence);
monitorFence.currentFenceValue = 1;
return ret;
}
bool WddmInterface23::createHwQueue(OsContextWin &osContext) {
D3DKMT_CREATEHWQUEUE createHwQueue = {};
@@ -165,14 +171,18 @@ bool NEO::WddmInterface23::createMonitoredFenceForDirectSubmission(MonitoredFenc
MonitoredFence monitorFenceForResidency{};
auto ret = WddmInterface::createMonitoredFence(monitorFenceForResidency);
auto &residencyController = osContext.getResidencyController();
auto lastSubmittedFence = residencyController.getMonitoredFence().lastSubmittedFence;
auto currentFenceValue = residencyController.getMonitoredFence().currentFenceValue;
residencyController.resetMonitoredFenceParams(monitorFenceForResidency.fenceHandle,
const_cast<uint64_t *>(monitorFenceForResidency.cpuAddress),
monitorFenceForResidency.gpuAddress);
residencyController.getMonitoredFence().currentFenceValue = currentFenceValue;
residencyController.getMonitoredFence().lastSubmittedFence = lastSubmittedFence;
auto hwQueue = osContext.getHwQueue();
monitorFence.cpuAddress = reinterpret_cast<uint64_t *>(hwQueue.progressFenceCpuVA);
monitorFence.currentFenceValue = 1u;
monitorFence.lastSubmittedFence = 0u;
monitorFence.currentFenceValue = currentFenceValue;
monitorFence.lastSubmittedFence = lastSubmittedFence;
monitorFence.gpuAddress = hwQueue.progressFenceGpuVA;
monitorFence.fenceHandle = hwQueue.progressFenceHandle;

View File

@@ -44,9 +44,7 @@ class WddmInterface20 : public WddmInterface {
void destroyMonitorFence(MonitoredFence &monitorFence) override;
bool hwQueuesSupported() override;
bool submit(uint64_t commandBuffer, size_t size, void *commandHeader, WddmSubmitArguments &submitArguments) override;
bool createMonitoredFenceForDirectSubmission(MonitoredFence &monitorFence, OsContextWin &osContext) override {
return WddmInterface::createMonitoredFence(monitorFence);
};
bool createMonitoredFenceForDirectSubmission(MonitoredFence &monitorFence, OsContextWin &osContext) override;
};
class WddmInterface23 : public WddmInterface {