push->cur += size;
}
+static inline void
+PUSH_DATAb(struct nouveau_pushbuf *push, const void *data, uint32_t size)
+{
+ memcpy(push->cur, data, size);
+ push->cur += DIV_ROUND_UP(size, 4);
+}
+
static inline void
PUSH_DATAf(struct nouveau_pushbuf *push, float f)
{
BEGIN_NVC0(push, NVE4_CP(UPLOAD_LINE_LENGTH_IN), 2);
PUSH_DATA (push, cp->parm_size);
PUSH_DATA (push, 0x1);
- BEGIN_1IC0(push, NVE4_CP(UPLOAD_EXEC), 1 + (cp->parm_size / 4));
+ BEGIN_1IC0(push, NVE4_CP(UPLOAD_EXEC), 1 + DIV_ROUND_UP(cp->parm_size, 4));
PUSH_DATA (push, NVE4_COMPUTE_UPLOAD_EXEC_LINEAR | (0x20 << 1));
- PUSH_DATAp(push, info->input, cp->parm_size / 4);
+ PUSH_DATAb(push, info->input, cp->parm_size);
}
BEGIN_NVC0(push, NVE4_CP(UPLOAD_DST_ADDRESS_HIGH), 2);
PUSH_DATAh(push, address + NVC0_CB_AUX_GRID_INFO(0));