D | spirv_builder.c | 17 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL 39 spirv_buffer_grow(struct spirv_buffer *b, void *mem_ctx, size_t needed) in spirv_buffer_grow() argument 41 size_t new_room = MAX3(64, (b->room * 3) / 2, needed); in spirv_buffer_grow() 43 uint32_t *new_words = reralloc_size(mem_ctx, b->words, in spirv_buffer_grow() 48 b->words = new_words; in spirv_buffer_grow() 49 b->room = new_room; in spirv_buffer_grow() 54 spirv_buffer_prepare(struct spirv_buffer *b, void *mem_ctx, size_t needed) in spirv_buffer_prepare() argument 56 needed += b->num_words; in spirv_buffer_prepare() 57 if (b->room >= b->num_words + needed) in spirv_buffer_prepare() 60 return spirv_buffer_grow(b, mem_ctx, needed); in spirv_buffer_prepare() [all …]
|