[idd] stop using IddCxMonitorUpdateModes(2)

While it would make much more sense to use these then a full replug to
change modes, Microsoft have not properly implemented the API to clear
the cached monitor mode states internally, making these calls useless.

Revert to just replugging the device on mode change
This commit is contained in:
Geoffrey McRae
2026-07-16 16:31:53 +10:00
parent b97a0b79f1
commit 1ce446f97a
10 changed files with 165 additions and 233 deletions

View File

@@ -147,6 +147,22 @@ void CD3D12Device::DeInit()
m_infoQueue.Reset();
}
void CD3D12Device::WaitForIdle()
{
// A queue is ready once its GPU work has signalled and its completion
// callback has run (clearing the pending flag). Bound the wait so a
// removed/hung device cannot stall teardown indefinitely.
auto drain = [](CD3D12CommandQueue& queue)
{
for (int i = 0; i < 1000 && !queue.IsReady(); ++i)
Sleep(1);
};
for (int i = 0; i < ARRAYSIZE(m_copyQueue); ++i)
drain(m_copyQueue[i]);
drain(m_computeQueue);
}
bool CD3D12Device::HeapTest()
{
D3D12_RESOURCE_DESC desc = {};