Lucas Amaral <[email protected]> writes:
> Define GRAPHIC_FLAGS_VK (bit 2) in the console flags for future
> Vulkan scanout support. The compatibility check currently returns
> an error indicating the feature is not yet implemented.
>
> This prepares the display framework for direct Vulkan scanout
> alongside the existing GL and DMABUF paths.
>
> Signed-off-by: Lucas Amaral <[email protected]>
> ---
> include/ui/console.h | 2 ++
> ui/console.c | 7 +++++++
> 2 files changed, 9 insertions(+)
>
> diff --git a/include/ui/console.h b/include/ui/console.h
> index 3677a9d3..19ac06e0 100644
> --- a/include/ui/console.h
> +++ b/include/ui/console.h
> @@ -361,6 +361,8 @@ enum {
> GRAPHIC_FLAGS_GL = 1 << 0,
> /* require a console/display with DMABUF import */
> GRAPHIC_FLAGS_DMABUF = 1 << 1,
> + /* TODO: require a console/display with Vulkan scanout */
You can drop the TODO: here
> + GRAPHIC_FLAGS_VK = 1 << 2,
> };
>
> typedef struct GraphicHwOps {
> diff --git a/ui/console.c b/ui/console.c
> index f445db11..424ee195 100644
> --- a/ui/console.c
> +++ b/ui/console.c
> @@ -594,6 +594,13 @@ static bool console_compatible_with(QemuConsole *con,
> return false;
> }
>
> + if (flags & GRAPHIC_FLAGS_VK) {
> + /* TODO: check for Vulkan scanout support in display backend
> */
> + error_setg(errp,
> + "Vulkan scanout not yet implemented");
> + return false;
> + }
> +
> return true;
> }
--
Alex Bennée
Virtualisation Tech Lead @ Linaro