mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 08:58:02 +02:00
pan/genxml: Make sure pan_pack() evaluates 'dst' only once
Will be useful for the cs_builder, where we have and we don't want cs_alloc_ins() to be called more than once. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26358>
This commit is contained in:
parent
2d44800079
commit
8e303b9350
1 changed files with 1 additions and 1 deletions
|
|
@ -120,7 +120,7 @@ __gen_unpack_padded(const uint8_t *restrict cl, uint32_t start, uint32_t end)
|
|||
|
||||
#define pan_pack(dst, T, name) \\
|
||||
for (struct PREFIX1(T) name = { PREFIX2(T, header) }, \\
|
||||
*_loop_terminate = (void *) (dst); \\
|
||||
*_loop_terminate = &name; \\
|
||||
__builtin_expect(_loop_terminate != NULL, 1); \\
|
||||
({ PREFIX2(T, pack)((uint32_t *) (dst), &name); \\
|
||||
_loop_terminate = NULL; }))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue