[Mesa-dev] [PATCH 8/9] gallium: decrease the size of pipe_vertex_element - 16 -> 8 bytes
Marek Olšák
maraeo at gmail.com
Sun Apr 2 18:00:29 UTC 2017
From: Marek Olšák <marek.olsak at amd.com>
---
src/gallium/include/pipe/p_state.h | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
index ae7f1c3..d68a4d4 100644
--- a/src/gallium/include/pipe/p_state.h
+++ b/src/gallium/include/pipe/p_state.h
@@ -599,33 +599,33 @@ struct pipe_stream_output_target
unsigned buffer_size; /**< how much data is allowed to be written */
};
/**
* Information to describe a vertex attribute (position, color, etc)
*/
struct pipe_vertex_element
{
/** Offset of this attribute, in bytes, from the start of the vertex */
- unsigned src_offset;
-
- /** Instance data rate divisor. 0 means this is per-vertex data,
- * n means per-instance data used for n consecutive instances (n > 0).
- */
- unsigned instance_divisor;
+ unsigned src_offset:16;
/** Which vertex_buffer (as given to pipe->set_vertex_buffer()) does
* this attribute live in?
*/
- unsigned vertex_buffer_index;
+ unsigned vertex_buffer_index:5;
- enum pipe_format src_format;
+ enum pipe_format src_format:11;
+
+ /** Instance data rate divisor. 0 means this is per-vertex data,
+ * n means per-instance data used for n consecutive instances (n > 0).
+ */
+ unsigned instance_divisor;
};
/**
* An index buffer. When an index buffer is bound, all indices to vertices
* will be looked up in the buffer.
*/
struct pipe_index_buffer
{
unsigned index_size; /**< size of an index, in bytes */
--
2.7.4
More information about the mesa-dev
mailing list