hardware/intel/libva
修订版 | 0f6802397d6e1ad6543d72a90c11558d2ff7dcfe (tree) |
---|---|
时间 | 2010-04-07 18:28:52 |
作者 | Xiang, Haihao <haihao.xiang@inte...> |
Commiter | Xiang, Haihao |
i965_drv_video: fix an assertion
@@ -443,21 +443,26 @@ i965_avc_bsd_buf_base_state(VADriverContextP ctx, | ||
443 | 443 | obj_surface = SURFACE(va_pic->picture_id); |
444 | 444 | assert(obj_surface); |
445 | 445 | avc_bsd_surface = obj_surface->private_data; |
446 | - assert(avc_bsd_surface); | |
447 | - assert(avc_bsd_surface->direct_mv_flag != -1); | |
448 | - | |
449 | - OUT_BCS_RELOC(ctx, avc_bsd_surface->direct_mv_wr_top_bo, | |
450 | - I915_GEM_DOMAIN_INSTRUCTION, 0, | |
451 | - 0); | |
446 | + | |
447 | + if (avc_bsd_surface == NULL) { | |
448 | + OUT_BCS_BATCH(ctx, 0); | |
449 | + OUT_BCS_BATCH(ctx, 0); | |
450 | + } else { | |
451 | + assert(avc_bsd_surface->direct_mv_flag != -1); | |
452 | 452 | |
453 | - if (avc_bsd_surface->direct_mv_flag == 1) | |
454 | - OUT_BCS_RELOC(ctx, avc_bsd_surface->direct_mv_wr_bottom_bo, | |
455 | - I915_GEM_DOMAIN_INSTRUCTION, 0, | |
456 | - 0); | |
457 | - else | |
458 | 453 | OUT_BCS_RELOC(ctx, avc_bsd_surface->direct_mv_wr_top_bo, |
459 | 454 | I915_GEM_DOMAIN_INSTRUCTION, 0, |
460 | 455 | 0); |
456 | + | |
457 | + if (avc_bsd_surface->direct_mv_flag == 1) | |
458 | + OUT_BCS_RELOC(ctx, avc_bsd_surface->direct_mv_wr_bottom_bo, | |
459 | + I915_GEM_DOMAIN_INSTRUCTION, 0, | |
460 | + 0); | |
461 | + else | |
462 | + OUT_BCS_RELOC(ctx, avc_bsd_surface->direct_mv_wr_top_bo, | |
463 | + I915_GEM_DOMAIN_INSTRUCTION, 0, | |
464 | + 0); | |
465 | + } | |
461 | 466 | } else { |
462 | 467 | OUT_BCS_BATCH(ctx, 0); |
463 | 468 | OUT_BCS_BATCH(ctx, 0); |