OSDN Git Service

dri: return error for unimplemented surface formats
authorScott D Phillips <scott.d.phillips@intel.com>
Mon, 25 Jul 2016 20:19:28 +0000 (13:19 -0700)
committerXiang, Haihao <haihao.xiang@intel.com>
Mon, 22 Aug 2016 04:08:56 +0000 (12:08 +0800)
Previously packed YUV422 surface were allowed to be renderd but
got rendered improperly.

Signed-off-by: Scott D Phillips <scott.d.phillips@intel.com>
(cherry picked from commit c7c69eb953822bbaf2075f9bea6f52d41212f5d3)

src/i965_output_dri.c

index d36fec5..ae3bcf6 100644 (file)
@@ -135,6 +135,9 @@ i965_put_surface_dri(
      */
     obj_surface = SURFACE(surface);
     ASSERT_RET(obj_surface && obj_surface->bo, VA_STATUS_SUCCESS);
+    ASSERT_RET(obj_surface->fourcc != VA_FOURCC_YUY2 &&
+               obj_surface->fourcc != VA_FOURCC_UYVY,
+               VA_STATUS_ERROR_UNIMPLEMENTED);
 
     _i965LockMutex(&i965->render_mutex);