From c24c3b94ed29ecd99b1101c74c6c4606f9b5580e Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sun, 2 Apr 2017 14:30:16 +0200 Subject: gallium: decrease the size of pipe_vertex_buffer - 24 -> 16 bytes --- src/gallium/include/pipe/p_state.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/gallium/include/pipe') diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index ce9ca34d295..0c9b4b45915 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -534,7 +534,6 @@ struct pipe_transfer }; - /** * A vertex buffer. Typically, all the vertex data/attributes for * drawing something will be in one buffer. But it's also possible, for @@ -542,10 +541,14 @@ struct pipe_transfer */ struct pipe_vertex_buffer { - unsigned stride; /**< stride to same attrib in next vertex, in bytes */ + uint16_t stride; /**< stride to same attrib in next vertex, in bytes */ + bool is_user_buffer; unsigned buffer_offset; /**< offset to start of data in buffer, in bytes */ - struct pipe_resource *buffer; /**< the actual buffer */ - const void *user_buffer; /**< pointer to a user buffer if buffer == NULL */ + + union { + struct pipe_resource *resource; /**< the actual buffer */ + const void *user; /**< pointer to a user buffer */ + } buffer; }; -- cgit v1.2.3