Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>
{
struct glthread_batch *batch = (struct glthread_batch*)job;
struct gl_context *ctx = batch->ctx;
{
struct glthread_batch *batch = (struct glthread_batch*)job;
struct gl_context *ctx = batch->ctx;
+ int pos = 0;
+ int used = batch->used;
+ uint8_t *buffer = batch->buffer;
_glapi_set_dispatch(ctx->CurrentServerDispatch);
_glapi_set_dispatch(ctx->CurrentServerDispatch);
- while (pos < batch->used) {
const struct marshal_cmd_base *cmd =
const struct marshal_cmd_base *cmd =
- (const struct marshal_cmd_base *)&batch->buffer[pos];
+ (const struct marshal_cmd_base *)&buffer[pos];
_mesa_unmarshal_dispatch[cmd->cmd_id](ctx, cmd);
pos += cmd->cmd_size;
}
_mesa_unmarshal_dispatch[cmd->cmd_id](ctx, cmd);
pos += cmd->cmd_size;
}
- assert(pos == batch->used);