summaryrefslogtreecommitdiff
path: root/src/mesa/main/glthread.h
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2022-12-21 01:48:00 -0500
committerMarek Olšák <marek.olsak@amd.com>2023-01-20 21:34:09 -0500
commite9abed5315ddad151bcb57e7133c9e55e31aaa7e (patch)
tree319673423849448b7a18efcb0cfb19341424552f /src/mesa/main/glthread.h
parent02f1968696fcf0eafd423c8c8c15cbfe61cd2cc1 (diff)
glthread: pack and name the type of glthread_vao::Attrib
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>
Diffstat (limited to 'src/mesa/main/glthread.h')
-rw-r--r--src/mesa/main/glthread.h26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/mesa/main/glthread.h b/src/mesa/main/glthread.h
index 9389e654ad3..23cfce82806 100644
--- a/src/mesa/main/glthread.h
+++ b/src/mesa/main/glthread.h
@@ -81,6 +81,19 @@ struct glthread_attrib_binding {
const void *original_pointer; /**< restore this pointer after the draw */
};
+struct glthread_attrib {
+ /* Per attrib: */
+ uint8_t ElementSize; /**< max 32 */
+ uint8_t BufferIndex; /**< Referring to Attrib[BufferIndex]. */
+ uint16_t RelativeOffset; /**< max 0xffff in Mesa */
+
+ /* Per buffer binding: */
+ GLuint Divisor;
+ int16_t Stride; /**< max 2048 */
+ int8_t EnabledAttribCount; /**< Number of enabled attribs using this buffer. */
+ const void *Pointer;
+};
+
struct glthread_vao {
GLuint Name;
GLuint CurrentElementBufferName;
@@ -91,18 +104,7 @@ struct glthread_vao {
GLbitfield UserPointerMask; /**< Bitmask of buffer bindings. */
GLbitfield NonZeroDivisorMask; /**< Bitmask of buffer bindings. */
- struct {
- /* Per attrib: */
- GLuint ElementSize;
- GLuint RelativeOffset;
- GLuint BufferIndex; /**< Referring to Attrib[BufferIndex]. */
-
- /* Per buffer binding: */
- GLsizei Stride;
- GLuint Divisor;
- int EnabledAttribCount; /**< Number of enabled attribs using this buffer. */
- const void *Pointer;
- } Attrib[VERT_ATTRIB_MAX];
+ struct glthread_attrib Attrib[VERT_ATTRIB_MAX];
};
/** A single batch of commands queued up for execution. */