Lines Matching refs:cl

50 pack_emit_reloc(void *cl, const void *reloc) {}
57 #define __gen_unpack_address(cl, s, e) __unpack_address(cl, s, e)
69 __unpack_address(const uint8_t *cl, uint32_t s, uint32_t e)
72 { NULL, __gen_unpack_uint(cl, s, e) << (31 - (e - s)) };
77 v3dv_cl_offset(struct v3dv_cl *cl)
79 return (char *)cl->next - (char *)cl->base;
93 v3dv_cl_get_address(struct v3dv_cl *cl)
95 return (struct v3dv_cl_reloc){ .bo = cl->bo, .offset = v3dv_cl_offset(cl) };
98 void v3dv_cl_init(struct v3dv_job *job, struct v3dv_cl *cl);
99 void v3dv_cl_destroy(struct v3dv_cl *cl);
102 cl_start(struct v3dv_cl *cl)
104 return cl->next;
108 cl_end(struct v3dv_cl *cl, struct v3dv_cl_out *next)
110 cl->next = next;
111 assert(v3dv_cl_offset(cl) <= cl->size);
115 cl_advance(struct v3dv_cl_out **cl, uint32_t n)
117 (*cl) = (struct v3dv_cl_out *)((char *)(*cl) + n);
121 cl_aligned_u32(struct v3dv_cl_out **cl, uint32_t n)
123 *(uint32_t *)(*cl) = n;
124 cl_advance(cl, 4);
128 cl_aligned_f(struct v3dv_cl_out **cl, float f)
130 cl_aligned_u32(cl, fui(f));
134 cl_aligned_reloc(struct v3dv_cl *cl,
140 v3dv_job_add_bo(cl->job, bo);
143 uint32_t v3dv_cl_ensure_space(struct v3dv_cl *cl, uint32_t space, uint32_t alignment);
144 void v3dv_cl_ensure_space_with_branch(struct v3dv_cl *cl, uint32_t space);
172 #define cl_emit(cl, packet, name) \
179 struct v3dv_cl_out *cl_out = cl_start(cl); \
180 cl_packet_pack(packet)(cl, (uint8_t *)cl_out, &name); \
182 cl_end(cl, cl_out); \
186 #define cl_emit_with_prepacked(cl, packet, prepacked, name) \
193 struct v3dv_cl_out *cl_out = cl_start(cl); \
195 cl_packet_pack(packet)(cl, packed, &name); \
199 cl_end(cl, cl_out); \
212 cl_pack_emit_reloc(struct v3dv_cl *cl, const struct v3dv_cl_reloc *reloc)
215 v3dv_job_add_bo(cl->job, reloc->bo);
218 #define cl_emit_prepacked_sized(cl, packet, size) do { \
219 memcpy((cl)->next, packet, size); \
220 cl_advance(&(cl)->next, size); \
223 #define cl_emit_prepacked(cl, packet) \
224 cl_emit_prepacked_sized(cl, packet, sizeof(*(packet)))