[PR #1720] d3d12: allow queue submissions during fallback clock calibration #1735

Open
opened 2026-11-26 21:18:46 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1720
Author: @PyZikYG
Created: 11/25/2026
Status: 🔄 Open

Base: main ← Head: d3d12-calibration-queue-progress


📝 Commits (1)

  • c6817c3 d3d12: allow queue submissions during fallback clock calibration

📊 Changes

3 files changed (+165 additions, -26 deletions)

View changed files

📝 docs/d3d12_vulkan.md (+4 -3)
📝 runtime/shims/d3d12_com.cpp (+63 -22)
📝 runtime/test/d3d12_fence_timing_test.cpp (+98 -1)

📄 Description

Claimed as D3D-CLOCK-CALIBRATION-SUBMIT.

Summary

Fallback GetClockCalibration used to hold the device-wide Vulkan submission lock across queue-idle waits. A slow calibration could block submissions from every D3D12 queue on the device.

Drain prior work with an empty submission and wait for that marker and the timestamp sample on a private timeline outside the submission lock. The timestamp submission remains bracketed by QPC reads. If a host wait fails, the next call retires the outstanding sample before reusing the command buffer.

Verification

Checked clock pairing, queue submissions while a calibration wait is paused, and retry after an injected host wait failure. Also ran the fence event coverage.

AI-assisted: yes.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1720 **Author:** [@PyZikYG](https://github.com/PyZikYG) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `d3d12-calibration-queue-progress` --- ### 📝 Commits (1) - [`c6817c3`](https://github.com/ubiquitarianism/leonida/commit/c6817c3d55c3bd0dfae6da456c422eefe1b23661) d3d12: allow queue submissions during fallback clock calibration ### 📊 Changes **3 files changed** (+165 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `docs/d3d12_vulkan.md` (+4 -3) 📝 `runtime/shims/d3d12_com.cpp` (+63 -22) 📝 `runtime/test/d3d12_fence_timing_test.cpp` (+98 -1) </details> ### 📄 Description Claimed as [D3D-CLOCK-CALIBRATION-SUBMIT](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7158386667). ### Summary Fallback `GetClockCalibration` used to hold the device-wide Vulkan submission lock across queue-idle waits. A slow calibration could block submissions from every D3D12 queue on the device. Drain prior work with an empty submission and wait for that marker and the timestamp sample on a private timeline outside the submission lock. The timestamp submission remains bracketed by QPC reads. If a host wait fails, the next call retires the outstanding sample before reusing the command buffer. ### Verification Checked clock pairing, queue submissions while a calibration wait is paused, and retry after an injected host wait failure. Also ran the fence event coverage. AI-assisted: yes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#1735
No description provided.