[PATCH v2 1/3] ui: introduce GRAPHIC_FLAGS_VK for Vulkan scanout

Lucas Amaral posted 3 patches 4 weeks ago
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, "Alex Bennée" <alex.bennee@linaro.org>, Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>, Dmitry Osipenko <dmitry.osipenko@collabora.com>, Cornelia Huck <cohuck@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>
There is a newer version of this series
[PATCH v2 1/3] ui: introduce GRAPHIC_FLAGS_VK for Vulkan scanout
Posted by Lucas Amaral 4 weeks ago
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 <lucaaamaral@gmail.com>
---
 include/ui/console.h | 2 ++
 ui/console.c         | 6 ++++++
 2 files changed, 8 insertions(+)

diff --git a/include/ui/console.h b/include/ui/console.h
index 98feaa5..6b8bbaf 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 */
+    GRAPHIC_FLAGS_VK       = 1 << 2,
 };
 
 typedef struct GraphicHwOps {
diff --git a/ui/console.c b/ui/console.c
index f445db1..76d54bf 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -594,6 +594,12 @@ 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, "The console requires Vulkan scanout (not yet implemented).");
+        return false;
+    }
+
     return true;
 }
 
-- 
2.52.0
Re: [PATCH v2 1/3] ui: introduce GRAPHIC_FLAGS_VK for Vulkan scanout
Posted by Marc-André Lureau 3 weeks, 6 days ago
Hi

On Wed, Mar 11, 2026 at 6:29 AM Lucas Amaral <lucaaamaral@gmail.com> wrote:
>
> 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 <lucaaamaral@gmail.com>

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

> ---
>  include/ui/console.h | 2 ++
>  ui/console.c         | 6 ++++++
>  2 files changed, 8 insertions(+)
>
> diff --git a/include/ui/console.h b/include/ui/console.h
> index 98feaa5..6b8bbaf 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 */
> +    GRAPHIC_FLAGS_VK       = 1 << 2,
>  };
>
>  typedef struct GraphicHwOps {
> diff --git a/ui/console.c b/ui/console.c
> index f445db1..76d54bf 100644
> --- a/ui/console.c
> +++ b/ui/console.c
> @@ -594,6 +594,12 @@ 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, "The console requires Vulkan scanout (not yet implemented).");
> +        return false;
> +    }
> +
>      return true;
>  }
>
> --
> 2.52.0
>
>


-- 
Marc-André Lureau