Module: Mesa Branch: main Commit: e9abed5315ddad151bcb57e7133c9e55e31aaa7e URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e9abed5315ddad151bcb57e7133c9e55e31aaa7e
Author: Marek Olšák <[email protected]> Date: Wed Dec 21 01:48:00 2022 -0500 glthread: pack and name the type of glthread_vao::Attrib Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824> --- src/mesa/main/glthread.h | 26 ++++++++++++++------------ 1 file 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. */
