Hi,Here are the relevant patches to the drivers shipped with libva (dummy_drv_video, i965_drv_video).
Thanks, Gwenole.
From 33b65d5e11096887a96fedeb870329be8d36f45b Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne <[email protected]> Date: Thu, 27 Jan 2011 10:40:36 +0100 Subject: [PATCH] dummy_drv_video: make VADriverContext.vtable a pointer. --- dummy_drv_video/dummy_drv_video.c | 89 +++++++++++++++++++------------------ 1 files changed, 45 insertions(+), 44 deletions(-) diff --git a/dummy_drv_video/dummy_drv_video.c b/dummy_drv_video/dummy_drv_video.c index 4637147..f06cc0a 100644 --- a/dummy_drv_video/dummy_drv_video.c +++ b/dummy_drv_video/dummy_drv_video.c @@ -1196,6 +1196,7 @@ VAStatus dummy_Terminate( VADriverContextP ctx ) VAStatus VA_DRIVER_INIT_FUNC( VADriverContextP ctx ) { + struct VADriverVTable * const vtable = ctx->vtable; object_base_p obj; int result; struct dummy_driver_data *driver_data; @@ -1211,50 +1212,50 @@ VAStatus VA_DRIVER_INIT_FUNC( VADriverContextP ctx ) ctx->max_display_attributes = DUMMY_MAX_DISPLAY_ATTRIBUTES; ctx->str_vendor = DUMMY_STR_VENDOR; - ctx->vtable.vaTerminate = dummy_Terminate; - ctx->vtable.vaQueryConfigEntrypoints = dummy_QueryConfigEntrypoints; - ctx->vtable.vaQueryConfigProfiles = dummy_QueryConfigProfiles; - ctx->vtable.vaQueryConfigEntrypoints = dummy_QueryConfigEntrypoints; - ctx->vtable.vaQueryConfigAttributes = dummy_QueryConfigAttributes; - ctx->vtable.vaCreateConfig = dummy_CreateConfig; - ctx->vtable.vaDestroyConfig = dummy_DestroyConfig; - ctx->vtable.vaGetConfigAttributes = dummy_GetConfigAttributes; - ctx->vtable.vaCreateSurfaces = dummy_CreateSurfaces; - ctx->vtable.vaDestroySurfaces = dummy_DestroySurfaces; - ctx->vtable.vaCreateContext = dummy_CreateContext; - ctx->vtable.vaDestroyContext = dummy_DestroyContext; - ctx->vtable.vaCreateBuffer = dummy_CreateBuffer; - ctx->vtable.vaBufferSetNumElements = dummy_BufferSetNumElements; - ctx->vtable.vaMapBuffer = dummy_MapBuffer; - ctx->vtable.vaUnmapBuffer = dummy_UnmapBuffer; - ctx->vtable.vaDestroyBuffer = dummy_DestroyBuffer; - ctx->vtable.vaBeginPicture = dummy_BeginPicture; - ctx->vtable.vaRenderPicture = dummy_RenderPicture; - ctx->vtable.vaEndPicture = dummy_EndPicture; - ctx->vtable.vaSyncSurface = dummy_SyncSurface; - ctx->vtable.vaQuerySurfaceStatus = dummy_QuerySurfaceStatus; - ctx->vtable.vaPutSurface = dummy_PutSurface; - ctx->vtable.vaQueryImageFormats = dummy_QueryImageFormats; - ctx->vtable.vaCreateImage = dummy_CreateImage; - ctx->vtable.vaDeriveImage = dummy_DeriveImage; - ctx->vtable.vaDestroyImage = dummy_DestroyImage; - ctx->vtable.vaSetImagePalette = dummy_SetImagePalette; - ctx->vtable.vaGetImage = dummy_GetImage; - ctx->vtable.vaPutImage = dummy_PutImage; - ctx->vtable.vaQuerySubpictureFormats = dummy_QuerySubpictureFormats; - ctx->vtable.vaCreateSubpicture = dummy_CreateSubpicture; - ctx->vtable.vaDestroySubpicture = dummy_DestroySubpicture; - ctx->vtable.vaSetSubpictureImage = dummy_SetSubpictureImage; - ctx->vtable.vaSetSubpictureChromakey = dummy_SetSubpictureChromakey; - ctx->vtable.vaSetSubpictureGlobalAlpha = dummy_SetSubpictureGlobalAlpha; - ctx->vtable.vaAssociateSubpicture = dummy_AssociateSubpicture; - ctx->vtable.vaDeassociateSubpicture = dummy_DeassociateSubpicture; - ctx->vtable.vaQueryDisplayAttributes = dummy_QueryDisplayAttributes; - ctx->vtable.vaGetDisplayAttributes = dummy_GetDisplayAttributes; - ctx->vtable.vaSetDisplayAttributes = dummy_SetDisplayAttributes; - ctx->vtable.vaLockSurface = dummy_LockSurface; - ctx->vtable.vaUnlockSurface = dummy_UnlockSurface; - ctx->vtable.vaBufferInfo = dummy_BufferInfo; + vtable->vaTerminate = dummy_Terminate; + vtable->vaQueryConfigEntrypoints = dummy_QueryConfigEntrypoints; + vtable->vaQueryConfigProfiles = dummy_QueryConfigProfiles; + vtable->vaQueryConfigEntrypoints = dummy_QueryConfigEntrypoints; + vtable->vaQueryConfigAttributes = dummy_QueryConfigAttributes; + vtable->vaCreateConfig = dummy_CreateConfig; + vtable->vaDestroyConfig = dummy_DestroyConfig; + vtable->vaGetConfigAttributes = dummy_GetConfigAttributes; + vtable->vaCreateSurfaces = dummy_CreateSurfaces; + vtable->vaDestroySurfaces = dummy_DestroySurfaces; + vtable->vaCreateContext = dummy_CreateContext; + vtable->vaDestroyContext = dummy_DestroyContext; + vtable->vaCreateBuffer = dummy_CreateBuffer; + vtable->vaBufferSetNumElements = dummy_BufferSetNumElements; + vtable->vaMapBuffer = dummy_MapBuffer; + vtable->vaUnmapBuffer = dummy_UnmapBuffer; + vtable->vaDestroyBuffer = dummy_DestroyBuffer; + vtable->vaBeginPicture = dummy_BeginPicture; + vtable->vaRenderPicture = dummy_RenderPicture; + vtable->vaEndPicture = dummy_EndPicture; + vtable->vaSyncSurface = dummy_SyncSurface; + vtable->vaQuerySurfaceStatus = dummy_QuerySurfaceStatus; + vtable->vaPutSurface = dummy_PutSurface; + vtable->vaQueryImageFormats = dummy_QueryImageFormats; + vtable->vaCreateImage = dummy_CreateImage; + vtable->vaDeriveImage = dummy_DeriveImage; + vtable->vaDestroyImage = dummy_DestroyImage; + vtable->vaSetImagePalette = dummy_SetImagePalette; + vtable->vaGetImage = dummy_GetImage; + vtable->vaPutImage = dummy_PutImage; + vtable->vaQuerySubpictureFormats = dummy_QuerySubpictureFormats; + vtable->vaCreateSubpicture = dummy_CreateSubpicture; + vtable->vaDestroySubpicture = dummy_DestroySubpicture; + vtable->vaSetSubpictureImage = dummy_SetSubpictureImage; + vtable->vaSetSubpictureChromakey = dummy_SetSubpictureChromakey; + vtable->vaSetSubpictureGlobalAlpha = dummy_SetSubpictureGlobalAlpha; + vtable->vaAssociateSubpicture = dummy_AssociateSubpicture; + vtable->vaDeassociateSubpicture = dummy_DeassociateSubpicture; + vtable->vaQueryDisplayAttributes = dummy_QueryDisplayAttributes; + vtable->vaGetDisplayAttributes = dummy_GetDisplayAttributes; + vtable->vaSetDisplayAttributes = dummy_SetDisplayAttributes; + vtable->vaLockSurface = dummy_LockSurface; + vtable->vaUnlockSurface = dummy_UnlockSurface; + vtable->vaBufferInfo = dummy_BufferInfo; driver_data = (struct dummy_driver_data *) malloc( sizeof(*driver_data) ); ctx->pDriverData = (void *) driver_data; -- 1.5.4.3
From 26eba9868996f94fbe708f6bfdc078365572c2a0 Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne <[email protected]> Date: Thu, 27 Jan 2011 10:41:24 +0100 Subject: [PATCH] i965_drv_video: make VADriverContext.vtable a pointer. --- i965_drv_video/i965_drv_video.c | 85 ++++++++++++++++++++------------------- 1 files changed, 43 insertions(+), 42 deletions(-) diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c index ea5be1f..88dbdd8 100644 --- a/i965_drv_video/i965_drv_video.c +++ b/i965_drv_video/i965_drv_video.c @@ -1836,6 +1836,7 @@ i965_Terminate(VADriverContextP ctx) VAStatus VA_DRIVER_INIT_FUNC( VADriverContextP ctx ) { + struct VADriverVTable * const vtable = ctx->vtable; struct i965_driver_data *i965; int result; @@ -1849,48 +1850,48 @@ VA_DRIVER_INIT_FUNC( VADriverContextP ctx ) ctx->max_display_attributes = I965_MAX_DISPLAY_ATTRIBUTES; ctx->str_vendor = I965_STR_VENDOR; - ctx->vtable.vaTerminate = i965_Terminate; - ctx->vtable.vaQueryConfigEntrypoints = i965_QueryConfigEntrypoints; - ctx->vtable.vaQueryConfigProfiles = i965_QueryConfigProfiles; - ctx->vtable.vaQueryConfigEntrypoints = i965_QueryConfigEntrypoints; - ctx->vtable.vaQueryConfigAttributes = i965_QueryConfigAttributes; - ctx->vtable.vaCreateConfig = i965_CreateConfig; - ctx->vtable.vaDestroyConfig = i965_DestroyConfig; - ctx->vtable.vaGetConfigAttributes = i965_GetConfigAttributes; - ctx->vtable.vaCreateSurfaces = i965_CreateSurfaces; - ctx->vtable.vaDestroySurfaces = i965_DestroySurfaces; - ctx->vtable.vaCreateContext = i965_CreateContext; - ctx->vtable.vaDestroyContext = i965_DestroyContext; - ctx->vtable.vaCreateBuffer = i965_CreateBuffer; - ctx->vtable.vaBufferSetNumElements = i965_BufferSetNumElements; - ctx->vtable.vaMapBuffer = i965_MapBuffer; - ctx->vtable.vaUnmapBuffer = i965_UnmapBuffer; - ctx->vtable.vaDestroyBuffer = i965_DestroyBuffer; - ctx->vtable.vaBeginPicture = i965_BeginPicture; - ctx->vtable.vaRenderPicture = i965_RenderPicture; - ctx->vtable.vaEndPicture = i965_EndPicture; - ctx->vtable.vaSyncSurface = i965_SyncSurface; - ctx->vtable.vaQuerySurfaceStatus = i965_QuerySurfaceStatus; - ctx->vtable.vaPutSurface = i965_PutSurface; - ctx->vtable.vaQueryImageFormats = i965_QueryImageFormats; - ctx->vtable.vaCreateImage = i965_CreateImage; - ctx->vtable.vaDeriveImage = i965_DeriveImage; - ctx->vtable.vaDestroyImage = i965_DestroyImage; - ctx->vtable.vaSetImagePalette = i965_SetImagePalette; - ctx->vtable.vaGetImage = i965_GetImage; - ctx->vtable.vaPutImage = i965_PutImage; - ctx->vtable.vaQuerySubpictureFormats = i965_QuerySubpictureFormats; - ctx->vtable.vaCreateSubpicture = i965_CreateSubpicture; - ctx->vtable.vaDestroySubpicture = i965_DestroySubpicture; - ctx->vtable.vaSetSubpictureImage = i965_SetSubpictureImage; - ctx->vtable.vaSetSubpictureChromakey = i965_SetSubpictureChromakey; - ctx->vtable.vaSetSubpictureGlobalAlpha = i965_SetSubpictureGlobalAlpha; - ctx->vtable.vaAssociateSubpicture = i965_AssociateSubpicture; - ctx->vtable.vaDeassociateSubpicture = i965_DeassociateSubpicture; - ctx->vtable.vaQueryDisplayAttributes = i965_QueryDisplayAttributes; - ctx->vtable.vaGetDisplayAttributes = i965_GetDisplayAttributes; - ctx->vtable.vaSetDisplayAttributes = i965_SetDisplayAttributes; -// ctx->vtable.vaDbgCopySurfaceToBuffer = i965_DbgCopySurfaceToBuffer; + vtable->vaTerminate = i965_Terminate; + vtable->vaQueryConfigEntrypoints = i965_QueryConfigEntrypoints; + vtable->vaQueryConfigProfiles = i965_QueryConfigProfiles; + vtable->vaQueryConfigEntrypoints = i965_QueryConfigEntrypoints; + vtable->vaQueryConfigAttributes = i965_QueryConfigAttributes; + vtable->vaCreateConfig = i965_CreateConfig; + vtable->vaDestroyConfig = i965_DestroyConfig; + vtable->vaGetConfigAttributes = i965_GetConfigAttributes; + vtable->vaCreateSurfaces = i965_CreateSurfaces; + vtable->vaDestroySurfaces = i965_DestroySurfaces; + vtable->vaCreateContext = i965_CreateContext; + vtable->vaDestroyContext = i965_DestroyContext; + vtable->vaCreateBuffer = i965_CreateBuffer; + vtable->vaBufferSetNumElements = i965_BufferSetNumElements; + vtable->vaMapBuffer = i965_MapBuffer; + vtable->vaUnmapBuffer = i965_UnmapBuffer; + vtable->vaDestroyBuffer = i965_DestroyBuffer; + vtable->vaBeginPicture = i965_BeginPicture; + vtable->vaRenderPicture = i965_RenderPicture; + vtable->vaEndPicture = i965_EndPicture; + vtable->vaSyncSurface = i965_SyncSurface; + vtable->vaQuerySurfaceStatus = i965_QuerySurfaceStatus; + vtable->vaPutSurface = i965_PutSurface; + vtable->vaQueryImageFormats = i965_QueryImageFormats; + vtable->vaCreateImage = i965_CreateImage; + vtable->vaDeriveImage = i965_DeriveImage; + vtable->vaDestroyImage = i965_DestroyImage; + vtable->vaSetImagePalette = i965_SetImagePalette; + vtable->vaGetImage = i965_GetImage; + vtable->vaPutImage = i965_PutImage; + vtable->vaQuerySubpictureFormats = i965_QuerySubpictureFormats; + vtable->vaCreateSubpicture = i965_CreateSubpicture; + vtable->vaDestroySubpicture = i965_DestroySubpicture; + vtable->vaSetSubpictureImage = i965_SetSubpictureImage; + vtable->vaSetSubpictureChromakey = i965_SetSubpictureChromakey; + vtable->vaSetSubpictureGlobalAlpha = i965_SetSubpictureGlobalAlpha; + vtable->vaAssociateSubpicture = i965_AssociateSubpicture; + vtable->vaDeassociateSubpicture = i965_DeassociateSubpicture; + vtable->vaQueryDisplayAttributes = i965_QueryDisplayAttributes; + vtable->vaGetDisplayAttributes = i965_GetDisplayAttributes; + vtable->vaSetDisplayAttributes = i965_SetDisplayAttributes; +// vtable->vaDbgCopySurfaceToBuffer = i965_DbgCopySurfaceToBuffer; i965 = (struct i965_driver_data *)calloc(1, sizeof(*i965)); assert(i965); -- 1.5.4.3
_______________________________________________ Libva mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libva
