Closed SRSaunders closed 2 months ago
eMailbox and eImmediate should preceed eFifo, since this would always allow command line selection, and eFifo is the only guaranteed value according to the Vulkan spec and should be last in priority.
Totally agree! Thanks for spotting this issue.
vk::PresentModeKHR::eMailbox
is not available on some platform+GPU combinations, e.g. on Windows and macOS using an AMD 6600XT GPU (perhaps other AMD GPUs as well??). In these cases, the present mode is always stuck invk::PresentModeKHR::eFifo
independent of the--vsync <ON|OFF>
command line setting.This is caused by the following logic in vulkan_sample.h:
The preference is correctly given to
eMailbox
, but the fallback is currentlyeFifo
. There is no way to selecteImmediate
.Perhaps the fallback priority should be:
eMailbox
->eImmediate
->eFifo
, as follows:eMailbox
andeImmediate
should preceedeFifo
, since this would always allow command line selection, andeFifo
is the only guaranteed value according to the Vulkan spec and should be last in priority.In addition, this would make the default (i.e. no command line option set) either
eMailbox
oreImmediate
for most platforms. This would be preferable since many samples show performance stats which are useless today ifeFifo
is forced on as theeMailbox
fallback for common platform+GPU setups.