mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-26 02:11:36 -04:00
f5498f796c
Let the frontend remain the sole frame pacer by requesting MAILBOX for tear-free delivery, with FIFO retained as the required fallback. Co-authored-by: Martin Penkava <mpenkava1337@gmail.com>
15 lines
547 B
Python
15 lines
547 B
Python
#!/usr/bin/env python3
|
|
from pathlib import Path
|
|
import re
|
|
|
|
source = (Path(__file__).parents[1] / "src" / "gpu_vk_renderer.c").read_text()
|
|
choose = re.search(r"static VkPresentModeKHR choose_present_mode\(.*?\n\}", source, re.DOTALL)
|
|
assert choose
|
|
body = choose.group(0)
|
|
assert "s_present_mode_req == 0" in body
|
|
assert "VK_PRESENT_MODE_IMMEDIATE_KHR" in body
|
|
assert "VK_PRESENT_MODE_MAILBOX_KHR" in body
|
|
assert "return VK_PRESENT_MODE_FIFO_KHR" in body
|
|
assert "s_present_mode_req < 0" not in body
|
|
print("Vulkan MAILBOX present-policy test passed")
|