allow vsync

This commit is contained in:
jacob 2025-06-27 01:01:15 -05:00
parent 5a14818f88
commit 83e10a3fd5

View File

@ -2923,11 +2923,16 @@ void gp_present(struct sys_window *window, struct v2i32 backresolution, struct g
//sys_sleep(0.1); //sys_sleep(0.1);
u32 present_flags = 0;
if (!vsync) {
present_flags |= (DXGI_PRESENT_ALLOW_TEARING * DX12_ALLOW_TEARING);
}
/* Present */ /* Present */
/* FIXME: Resource barrier */ /* FIXME: Resource barrier */
{ {
__profscope(Present); __profscope(Present);
HRESULT hr = IDXGISwapChain3_Present(swapchain->swapchain, 0, 0); HRESULT hr = IDXGISwapChain3_Present(swapchain->swapchain, vsync, present_flags);
if (!SUCCEEDED(hr)) { if (!SUCCEEDED(hr)) {
ASSERT(false); ASSERT(false);
} }
@ -2953,12 +2958,6 @@ void gp_present(struct sys_window *window, struct v2i32 backresolution, struct g
} }
} }
#endif #endif
(UNUSED)backresolution;
(UNUSED)texture;
(UNUSED)texture_xf;
(UNUSED)vsync;
} }
/* ========================== * /* ========================== *