From 5b979df3557bb5fc82b73fd0e26b3dd0e6ad428a Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Mon, 8 Sep 2014 19:06:21 +0200 Subject: vpp: expose BGRA surface formats on Ivybridge and Haswell. Allow for vaQuerySurfaceAttributes() to return BGRA and BGRX formats for VPP on Ivybridge and Haswell. This is supported as both source and target surface formats. This fixes VA/EGL interop on Gen7 processors when a BGR[AX] surface is exported into an EGLImage. Change-Id: I94f0b174223f94b0a1155e32a17bb23ffb2792cf Signed-off-by: Gwenole Beauchesne Bug-Tizen: TC-1195/related --- src/i965_drv_video.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c index ba7c7be..df32813 100644 --- a/src/i965_drv_video.c +++ b/src/i965_drv_video.c @@ -4995,6 +4995,18 @@ i965_QuerySurfaceAttributes(VADriverContextP ctx, attribs[i].value.value.i = VA_FOURCC_RGBX; i++; + attribs[i].type = VASurfaceAttribPixelFormat; + attribs[i].value.type = VAGenericValueTypeInteger; + attribs[i].flags = VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE; + attribs[i].value.value.i = VA_FOURCC_BGRA; + i++; + + attribs[i].type = VASurfaceAttribPixelFormat; + attribs[i].value.type = VAGenericValueTypeInteger; + attribs[i].flags = VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE; + attribs[i].value.value.i = VA_FOURCC_BGRX; + i++; + attribs[i].type = VASurfaceAttribPixelFormat; attribs[i].value.type = VAGenericValueTypeInteger; attribs[i].flags = VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE; -- cgit v1.2.3