st/va: Make the vendor string more descriptive
authorMark Thompson <sw@jkqxz.net>
Wed, 7 Feb 2018 23:15:05 +0000 (23:15 +0000)
committerChristian König <christian.koenig@amd.com>
Fri, 9 Feb 2018 12:37:43 +0000 (13:37 +0100)
Include the Mesa version and detail about the platform.

Signed-off-by: Mark Thompson <sw@jkqxz.net>
Reviewed-by: Christian König <christian.koenig@amd.com>
src/gallium/state_trackers/va/context.c
src/gallium/state_trackers/va/va_private.h

index 189d361ff31858d60d51638c9389385495be4c2e..836aa77c36c2e5df79fe4d9f3d2bbb427f295906 100644 (file)
@@ -181,7 +181,11 @@ VA_DRIVER_INIT_FUNC(VADriverContextP ctx)
    ctx->max_image_formats = VL_VA_MAX_IMAGE_FORMATS;
    ctx->max_subpic_formats = 1;
    ctx->max_display_attributes = 1;
-   ctx->str_vendor = "mesa gallium vaapi";
+
+   snprintf(drv->vendor_string, sizeof(drv->vendor_string),
+            "Mesa Gallium driver " PACKAGE_VERSION " for %s",
+            drv->vscreen->pscreen->get_name(drv->vscreen->pscreen));
+   ctx->str_vendor = drv->vendor_string;
 
    return VA_STATUS_SUCCESS;
 
index 11b208c4b3b4a514f796c95076a93107f8b1bef1..4396abb586b5f38ebbcb6747420b7a9d60352a86 100644 (file)
@@ -233,6 +233,7 @@ typedef struct {
    struct vl_compositor_state cstate;
    vl_csc_matrix csc;
    mtx_t mutex;
+   char vendor_string[256];
 } vlVaDriver;
 
 typedef struct {