break;
case TPL_DISPLAY_PRESENT_MODE_FIFO:
- if (surf_source->vblank_waiting_buffers) {
- tbm_surface_h tbm_surface = NULL;
- tbm_surface = (tbm_surface_h)__tpl_list_pop_front(
- surf_source->vblank_waiting_buffers,
- NULL);
- if (tbm_surface)
- _twe_thread_wl_vk_surface_commit(surf_source, tbm_surface);
- }
-
- if (!__tpl_list_is_empty(surf_source->vblank_waiting_buffers)) {
- tpl_result_t res = TPL_ERROR_NONE;
- res = _twe_surface_wait_vblank(surf_source);
- if (res != TPL_ERROR_NONE)
- TPL_ERR("Failed to set wait vblank. surf_source(%p)",
- surf_source);
- }
- break;
-
case TPL_DISPLAY_PRESENT_MODE_FIFO_RELAXED:
if (surf_source->vblank_waiting_buffers) {
tbm_surface_h tbm_surface = NULL;
tbm_bo_export(tbm_surface_internal_get_bo(tbm_surface, 0)));
if (surf_source->swapchain_properties.present_mode
- == TPL_DISPLAY_PRESENT_MODE_FIFO_RELAXED) {
+ == TPL_DISPLAY_PRESENT_MODE_FIFO_RELAXED ||
+ surf_source->swapchain_properties.present_mode
+ == TPL_DISPLAY_PRESENT_MODE_FIFO) {
if (_twe_surface_wait_vblank(surf_source) != TPL_ERROR_NONE)
TPL_ERR("Failed to set wait vblank");
}
break;
case TPL_DISPLAY_PRESENT_MODE_FIFO:
- if (surf_source->vblank_done) {
- if (_twe_surface_wait_vblank(surf_source) != TPL_ERROR_NONE) {
- TPL_WARN("Failed to set wait vblank. Falling back to IMMEDIATE_MODE.");
- _twe_thread_wl_vk_surface_commit(surf_source, tbm_surface);
- }
- }
- if (surf_source->vblank_waiting_buffers) {
- __tpl_list_push_back(surf_source->vblank_waiting_buffers,
- (void *)tbm_surface);
-
- } else {
- TPL_ERR("Invalid list. vblank_waiting_buffers is NULL.");
- }
- break;
-
case TPL_DISPLAY_PRESENT_MODE_FIFO_RELAXED:
if (surf_source->vblank_done) {
_twe_thread_wl_vk_surface_commit(surf_source, tbm_surface);