mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
glthread: use int instead of size_t where it's OK
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>
This commit is contained in:
parent
313e98fb81
commit
9dbf5ec9f7
3 changed files with 4 additions and 4 deletions
|
|
@ -237,7 +237,7 @@ class PrintCode(gl_XML.gl_print_base):
|
|||
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))
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ struct glthread_batch
|
|||
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];
|
||||
|
|
|
|||
|
|
@ -54,12 +54,12 @@ extern const _mesa_unmarshal_func _mesa_unmarshal_dispatch[NUM_DISPATCH_CMD];
|
|||
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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue