diff options
Diffstat (limited to 'src/gallium/drivers/vc5/vc5_cl.h')
-rw-r--r-- | src/gallium/drivers/vc5/vc5_cl.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc5/vc5_cl.h b/src/gallium/drivers/vc5/vc5_cl.h index 4c64f084d3d..f62376e296a 100644 --- a/src/gallium/drivers/vc5/vc5_cl.h +++ b/src/gallium/drivers/vc5/vc5_cl.h @@ -248,6 +248,19 @@ cl_get_emit_space(struct vc5_cl_out **cl, size_t size) cl_advance(&(cl)->next, sizeof(*packet)); \ } while (0) +#define v3dx_pack(packed, packet, name) \ + for (struct cl_packet_struct(packet) name = { \ + cl_packet_header(packet) \ + }, \ + *_loop_terminate = &name; \ + __builtin_expect(_loop_terminate != NULL, 1); \ + ({ \ + cl_packet_pack(packet)(NULL, (uint8_t *)packed, &name); \ + VG(VALGRIND_CHECK_MEM_IS_DEFINED((uint8_t *)packed, \ + cl_packet_length(packet))); \ + _loop_terminate = NULL; \ + })) \ + /** * Helper function called by the XML-generated pack functions for filling in * an address field in shader records. |