Commit 3bbcf05
committed
Guard acquire-semaphore reuse before re-acquire (VUID-01779)
Secondary swapchains presented via vhPresentSwapchain reused an acquire
semaphore slot whose prior GPU wait could still be in flight, tripping
VUID-vkAcquireNextImageKHR-semaphore-01779. Track the graphics-queue
timeline instance per acquire slot (acquireInstances, parallel to
acquireSemaphores) and vkWaitSemaphores on the previous instance before
reusing the slot. Mirrors the primary frame-instance wait but lives on
each swapchain, so it covers primary and secondaries alike. The global
frame-instance pacing is kept: it bounds in-flight flushes to
g_vhFramesInFlight, which the transient uniform ring (sized to
VRHI_MAX_FRAMES_INFLIGHT) depends on.
Also drain the backend (vhFlush(true)) at the top of vhPresentSwapchain so
the present path does not submit before the frame's recorded draws,
making it symmetric with vhFrame.1 parent 0ac8364 commit 3bbcf05
3 files changed
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1608 | 1608 | | |
1609 | 1609 | | |
1610 | 1610 | | |
| 1611 | + | |
1611 | 1612 | | |
1612 | 1613 | | |
1613 | 1614 | | |
| |||
1630 | 1631 | | |
1631 | 1632 | | |
1632 | 1633 | | |
| 1634 | + | |
1633 | 1635 | | |
1634 | 1636 | | |
1635 | 1637 | | |
| |||
1675 | 1677 | | |
1676 | 1678 | | |
1677 | 1679 | | |
| 1680 | + | |
1678 | 1681 | | |
1679 | 1682 | | |
1680 | 1683 | | |
| |||
1699 | 1702 | | |
1700 | 1703 | | |
1701 | 1704 | | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
1702 | 1723 | | |
1703 | 1724 | | |
1704 | 1725 | | |
| |||
1909 | 1930 | | |
1910 | 1931 | | |
1911 | 1932 | | |
| 1933 | + | |
| 1934 | + | |
1912 | 1935 | | |
1913 | 1936 | | |
1914 | 1937 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
| 275 | + | |
275 | 276 | | |
276 | 277 | | |
277 | 278 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1003 | 1003 | | |
1004 | 1004 | | |
1005 | 1005 | | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
1006 | 1009 | | |
1007 | 1010 | | |
1008 | 1011 | | |
| |||
0 commit comments