diff options
Diffstat (limited to 'src/gallium/drivers/nvc0/nvc0_video_bsp.c')
-rw-r--r-- | src/gallium/drivers/nvc0/nvc0_video_bsp.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_video_bsp.c b/src/gallium/drivers/nvc0/nvc0_video_bsp.c index 09e78aa..450dc2b 100644 --- a/src/gallium/drivers/nvc0/nvc0_video_bsp.c +++ b/src/gallium/drivers/nvc0/nvc0_video_bsp.c @@ -268,6 +268,9 @@ nvc0_decoder_bsp(struct nvc0_decoder *dec, union pipe_desc desc, }; int num_refs = sizeof(bo_refs)/sizeof(*bo_refs); + if (!dec->bitplane_bo) + num_refs--; + #ifdef NVC0_DEBUG_FENCE fence_extra = 4; #endif @@ -309,9 +312,7 @@ nvc0_decoder_bsp(struct nvc0_decoder *dec, union pipe_desc desc, nvc0_decoder_vp_caps(dec, desc, target, comm_seq, vp_caps, is_ref, refs); - PUSH_SPACE(push, 6 + (codec == PIPE_VIDEO_CODEC_MPEG4_AVC ? 9 : 7) + fence_extra + 2); - if (!dec->bitplane_bo) - num_refs--; + nouveau_pushbuf_space(push, 6 + (codec == PIPE_VIDEO_CODEC_MPEG4_AVC ? 9 : 7) + fence_extra + 2, num_refs, 0); nouveau_pushbuf_refn(push, bo_refs, num_refs); caps |= 0 << 16; // reset struct comm if flag is set |