diff options
author | Gwenole Beauchesne <gwenole.beauchesne@intel.com> | 2011-08-25 11:54:20 +0200 |
---|---|---|
committer | Gwenole Beauchesne <gwenole.beauchesne@intel.com> | 2011-08-25 14:28:40 +0200 |
commit | 63b2c548418eda87241b28a3dd3ea76b6390596c (patch) | |
tree | 9e30e1fde08b17e033cfc3d75b2e24476b00cf1f | |
parent | 8d884f8a7a7dd1983cb595880f68899cbb3425a4 (diff) |
Add correct version info for vaQueryVendorString().
-rw-r--r-- | src/i965_drv_video.c | 17 | ||||
-rw-r--r-- | src/i965_drv_video.h | 5 |
2 files changed, 19 insertions, 3 deletions
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c index e788bc5..906dfed 100644 --- a/src/i965_drv_video.c +++ b/src/i965_drv_video.c @@ -28,6 +28,7 @@ */ #include "config.h" +#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> @@ -2540,7 +2541,6 @@ VA_DRIVER_INIT_FUNC( VADriverContextP ctx ) ctx->max_image_formats = I965_MAX_IMAGE_FORMATS; ctx->max_subpic_formats = I965_MAX_SUBPIC_FORMATS; ctx->max_display_attributes = I965_MAX_DISPLAY_ATTRIBUTES; - ctx->str_vendor = I965_STR_VENDOR; vtable->vaTerminate = i965_Terminate; vtable->vaQueryConfigEntrypoints = i965_QueryConfigEntrypoints; @@ -2621,6 +2621,19 @@ VA_DRIVER_INIT_FUNC( VADriverContextP ctx ) sizeof(struct object_subpic), SUBPIC_ID_OFFSET); assert(result == 0); - + + sprintf(i965->va_vendor, "%s %s driver - %d.%d.%d", + INTEL_STR_DRIVER_VENDOR, + INTEL_STR_DRIVER_NAME, + INTEL_DRIVER_MAJOR_VERSION, + INTEL_DRIVER_MINOR_VERSION, + INTEL_DRIVER_MICRO_VERSION); + + if (INTEL_DRIVER_PRE_VERSION > 0) { + const int len = strlen(i965->va_vendor); + sprintf(&i965->va_vendor[len], ".pre%d", INTEL_DRIVER_PRE_VERSION); + } + ctx->str_vendor = i965->va_vendor; + return i965_Init(ctx); } diff --git a/src/i965_drv_video.h b/src/i965_drv_video.h index fd423bc..ac77b19 100644 --- a/src/i965_drv_video.h +++ b/src/i965_drv_video.h @@ -43,7 +43,9 @@ #define I965_MAX_IMAGE_FORMATS 3 #define I965_MAX_SUBPIC_FORMATS 4 #define I965_MAX_DISPLAY_ATTRIBUTES 4 -#define I965_STR_VENDOR "i965 Driver 0.1" + +#define INTEL_STR_DRIVER_VENDOR "Intel" +#define INTEL_STR_DRIVER_NAME "i965" struct i965_kernel { @@ -218,6 +220,7 @@ struct i965_driver_data struct intel_batchbuffer *batch; struct i965_render_state render_state; void *pp_context; + char va_vendor[256]; }; #define NEW_CONFIG_ID() object_heap_allocate(&i965->config_heap); |