From c91f72c806577f8437ef5d02e21bd5443a2c9c32 Mon Sep 17 00:00:00 2001 From: "Xiang, Haihao" Date: Fri, 11 Mar 2011 11:10:48 +0800 Subject: [PATCH] i965_drv_video: only use tiled surface for NV12 on SandyBridge Signed-off-by: Xiang, Haihao --- i965_drv_video/i965_drv_video.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c index 2fc2378..6e00239 100644 --- a/i965_drv_video/i965_drv_video.c +++ b/i965_drv_video/i965_drv_video.c @@ -59,7 +59,8 @@ #define HAS_VC1(ctx) (IS_GEN6((ctx)->intel.device_id) && (ctx)->intel.has_bsd) -#define HAS_TILED_SURFACE(ctx) (IS_GEN6((ctx)->intel.device_id)) +#define HAS_TILED_SURFACE(ctx) (IS_GEN6((ctx)->intel.device_id) && \ + (ctx)->render_state.interleaved_uv) enum { I965_SURFACETYPE_RGBA = 1, @@ -436,7 +437,7 @@ i965_CreateSurfaces(VADriverContextP ctx, obj_surface->orig_width = width; obj_surface->orig_height = height; - if (IS_GEN6(i965->intel.device_id)) { + if (HAS_TILED_SURFACE(i965)) { obj_surface->width = ALIGN(obj_surface->orig_width, 128); obj_surface->height = ALIGN(obj_surface->orig_height, 32); } else { -- 2.11.0