return PKT2_NOP_PAD;
case AMDGPU_HW_IP_VCN_DEC:
return 0x81FF;
+ case AMDGPU_HW_IP_VCN_ENC:
+ return 0; /* NOPs are illegal in encode, so don't pad */
default:
unreachable("Unknown IP type");
}
*cs->ib_size_ptr |= cs->base.cdw;
} else {
/* Pad the CS with NOP packets. */
- while (!cs->base.cdw || (cs->base.cdw & ib_pad_dw_mask))
- radeon_emit(&cs->base, nop_packet);
+ if (ip_type != AMDGPU_HW_IP_VCN_ENC) {
+ while (!cs->base.cdw || (cs->base.cdw & ib_pad_dw_mask))
+ radeon_emit(&cs->base, nop_packet);
+ }
/* Append the current (last) IB to the array of old IB buffers. */
radv_amdgpu_cs_add_old_ib_buffer(cs);