<!--

This psychtoolbox config file tells the open-source Mesa OpenGL drivers
to enable support for 10 bpc 30 bpp deep color display modes. Otherwise
only 8 bit for 16 million colors instead of 10 bpc for 1 billion colors
would be supported.

Also it enables a page-flipping fix for octave running on the RaspberryPi
with RPi OS 11 or later on the VideoCore-6 v3d driver. Mesa for RPi is
patched with some code to recognize the v3d_maintain_ignorable_scanout
parameter, which if set to true will restore sane behaviour, i assume at
some small performance hit, or whatever. By default, RPi OS 11 only sets
this override for the Mutter X11 desktop compositor, leaving all other
fullscreen OpenGL applications utterly broken with copy-swaps and massive
tearing. Go figure...

Additionally it enforces double-buffering only, instead of potential
triple-buffering when using Vulkan/WSI stimulus presentation to windowed
X11 windows under triple-buffering capable Vulkan drivers from Mesa. We
absolutely need double-buffering whenever Vulkan timing extensions are
unavailable, which is sadly still the case as of at least Mesa 22.2 and
Ubuntu 22.04-LTS. Otherwise timing/timestamping failures and hangs at
window close time for windowed mode.

-->

<driconf>
    <device>
        <application name="all-default">
            <option name="allow_rgb10_configs" value="true"/>
        </application>

        <application name="octave" executable="octave-gui">
            <option name="v3d_maintain_ignorable_scanout" value="true" />
        </application>

        <application name="octave" executable="octave-cli">
            <option name="v3d_maintain_ignorable_scanout" value="true" />
        </application>

        <engine engine_name_match="PsychVulkanCore">
            <option name="vk_x11_strict_image_count" value="true" />
            <option name="vk_x11_override_min_image_count" value="2" />
        </engine>
    </device>
</driconf>
