diff options
author | Xiang, Haihao <haihao.xiang@intel.com> | 2010-04-07 17:28:52 +0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2010-04-07 17:28:52 +0800 |
commit | 0f6802397d6e1ad6543d72a90c11558d2ff7dcfe (patch) | |
tree | c27f18bb4ef48736a390bc9c769ec88c9c3dec41 | |
parent | 6ef0dbc54a71ae6f6ff503def31b666716983a5e (diff) | |
download | libva-0f6802397d6e1ad6543d72a90c11558d2ff7dcfe.tar.gz |
i965_drv_video: fix an assertion
-rw-r--r-- | i965_drv_video/i965_avc_bsd.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/i965_drv_video/i965_avc_bsd.c b/i965_drv_video/i965_avc_bsd.c index 80d26d4..1ac0c3e 100644 --- a/i965_drv_video/i965_avc_bsd.c +++ b/i965_drv_video/i965_avc_bsd.c @@ -443,21 +443,26 @@ i965_avc_bsd_buf_base_state(VADriverContextP ctx, obj_surface = SURFACE(va_pic->picture_id); assert(obj_surface); avc_bsd_surface = obj_surface->private_data; - assert(avc_bsd_surface); - assert(avc_bsd_surface->direct_mv_flag != -1); - - OUT_BCS_RELOC(ctx, avc_bsd_surface->direct_mv_wr_top_bo, - I915_GEM_DOMAIN_INSTRUCTION, 0, - 0); + + if (avc_bsd_surface == NULL) { + OUT_BCS_BATCH(ctx, 0); + OUT_BCS_BATCH(ctx, 0); + } else { + assert(avc_bsd_surface->direct_mv_flag != -1); - if (avc_bsd_surface->direct_mv_flag == 1) - OUT_BCS_RELOC(ctx, avc_bsd_surface->direct_mv_wr_bottom_bo, - I915_GEM_DOMAIN_INSTRUCTION, 0, - 0); - else OUT_BCS_RELOC(ctx, avc_bsd_surface->direct_mv_wr_top_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0); + + if (avc_bsd_surface->direct_mv_flag == 1) + OUT_BCS_RELOC(ctx, avc_bsd_surface->direct_mv_wr_bottom_bo, + I915_GEM_DOMAIN_INSTRUCTION, 0, + 0); + else + OUT_BCS_RELOC(ctx, avc_bsd_surface->direct_mv_wr_top_bo, + I915_GEM_DOMAIN_INSTRUCTION, 0, + 0); + } } else { OUT_BCS_BATCH(ctx, 0); OUT_BCS_BATCH(ctx, 0); |