Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>
if p.img_null_flag:
size = '({0} ? {1} : 0)'.format(p.name, size)
size_terms.append(size)
- out('size_t cmd_size = {0};'.format(' + '.join(size_terms)))
+ out('int cmd_size = {0};'.format(' + '.join(size_terms)))
out('{0} *cmd;'.format(struct))
out('debug_print_marshal("{0}");'.format(func.name))
struct gl_context *ctx;
/** Amount of data used by batch commands, in bytes. */
- size_t used;
+ int used;
/** Data contained in the command buffer. */
uint8_t buffer[MARSHAL_MAX_CMD_SIZE];
static inline void *
_mesa_glthread_allocate_command(struct gl_context *ctx,
uint16_t cmd_id,
- size_t size)
+ int size)
{
struct glthread_state *glthread = ctx->GLThread;
struct glthread_batch *next = &glthread->batches[glthread->next];
struct marshal_cmd_base *cmd_base;
- const size_t aligned_size = ALIGN(size, 8);
+ const int aligned_size = ALIGN(size, 8);
if (unlikely(next->used + size > MARSHAL_MAX_CMD_SIZE)) {
_mesa_glthread_flush_batch(ctx);