* Swap the buffers. */
| 902 | * Swap the buffers. |
| 903 | */ |
| 904 | void Present(D3D12Global &d3d) |
| 905 | { |
| 906 | HRESULT hr = d3d.swapChain->Present(d3d.vsync, (!d3d.vsync && d3d.isTearingSupport) ? DXGI_PRESENT_ALLOW_TEARING : 0); |
| 907 | if (FAILED(hr)) |
| 908 | { |
| 909 | hr = d3d.device->GetDeviceRemovedReason(); |
| 910 | Utils::Validate(hr, L"Error: failed to present!"); |
| 911 | } |
| 912 | } |
| 913 | |
| 914 | /* |
| 915 | * Wait for pending GPU work to complete. |
no test coverage detected