Expose vsync interval with new cvar rpi_vsync_interval and support Vulkan vsync (#2061)
* Expose vsync interval with new cvar rpi_vsync_interval On change, the rpi_vsync_interval is broadcasted to a new event on the WindowNotificationBus and all swapchains are recreated with the new vsync value. Signed-off-by: Jeremy Ong <jeremycong@gmail.com> * Add vsync interval support to the Vulkan RHI Vsync intervals are not intrinsically supported using the Vulkan swapchain extension. Instead, extra presents are enqueued for each extra vblank requested past 1. Swapchain recreation is triggered when transitioning to and from the FIFO presentation mode (when rpi_vsync_interval transitions from and to 0 respectively). Signed-off-by: Jeremy Ong <jeremycong@gmail.com> * Rollback vsync > 1 implementation on Vulkan and leverage *Internal pattern Signed-off-by: Jeremy Ong <jeremycong@gmail.com>
This commit is contained in:
@@ -97,6 +97,9 @@ namespace AzFramework
|
||||
|
||||
//! This is called when the window is deactivated from code or if the user closes the window.
|
||||
virtual void OnWindowClosed() {};
|
||||
|
||||
//! This is called when vsync interval is changed.
|
||||
virtual void OnVsyncIntervalChanged(uint32_t interval) { AZ_UNUSED(interval); };
|
||||
};
|
||||
using WindowNotificationBus = AZ::EBus<WindowNotifications>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user