zink: make spirv_buffer_emit_word() return the word that was written

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14976>
This commit is contained in:
Mike Blumenkrantz 2022-02-09 15:40:12 -05:00 committed by Marge Bot
parent 5663fac5ca
commit 25d6651324

View file

@ -62,11 +62,12 @@ spirv_buffer_prepare(struct spirv_buffer *b, void *mem_ctx, size_t needed)
return spirv_buffer_grow(b, mem_ctx, needed);
}
static inline void
static inline uint32_t
spirv_buffer_emit_word(struct spirv_buffer *b, uint32_t word)
{
assert(b->num_words < b->room);
b->words[b->num_words++] = word;
b->words[b->num_words] = word;
return b->num_words++;
}
static int