diff options
author | Eric Anholt <[email protected]> | 2013-02-15 16:33:33 -0800 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-03-16 14:14:19 +1100 |
commit | 47f819d3cb89ab90914181e3c61744ac1f16e056 (patch) | |
tree | b093a34150d1a28d5422a2b5201d354e8a078fc6 /src/mesa/main/glthread.h | |
parent | 1d6b71c5c6264f9cc0f7ae7c35d27b5c88f3f8bf (diff) |
mesa: Statically allocate glthread command buffer in the batch struct.
This avoids an extra pointer dereference in the marshalling functions,
which, with the instruction count doing in the low 30s, could actually
matter for main-thread performance.
Acked-by: Timothy Arceri <[email protected]>
Acked-by: Marek Olšák <[email protected]>
Tested-by: Dieter Nützel <[email protected]>
Tested-by: Mike Lothian <[email protected]>
Diffstat (limited to 'src/mesa/main/glthread.h')
-rw-r--r-- | src/mesa/main/glthread.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/main/glthread.h b/src/mesa/main/glthread.h index c38fef32fa0..98ae11509a6 100644 --- a/src/mesa/main/glthread.h +++ b/src/mesa/main/glthread.h @@ -94,14 +94,14 @@ struct glthread_batch struct glthread_batch *next; /** - * Points to the first command in the batch. + * Amount of data used by batch commands, in bytes. */ - uint8_t *buffer; + size_t used; /** - * Amount of data used by batch commands, in bytes. + * Data contained in the command buffer. */ - size_t used; + uint8_t buffer[MARSHAL_MAX_CMD_SIZE]; }; void _mesa_glthread_init(struct gl_context *ctx); |