From: Nicolai Hähnle <nicolai.haeh...@amd.com> So that we can pass pointers to individual array entries around. --- src/gallium/include/pipe/p_state.h | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index 46df196..6d42b4c 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -188,42 +188,47 @@ struct pipe_scissor_state unsigned maxx:16; unsigned maxy:16; }; struct pipe_clip_state { float ucp[PIPE_MAX_CLIP_PLANES][4]; }; +/** + * A single output for vertex transform feedback. + */ +struct pipe_stream_output +{ + unsigned register_index:8; /**< 0 to PIPE_MAX_SHADER_OUTPUTS */ + unsigned start_component:2; /** 0 to 3 */ + unsigned num_components:3; /** 1 to 4 */ + unsigned output_buffer:3; /**< 0 to PIPE_MAX_SO_BUFFERS */ + unsigned dst_offset:16; /**< offset into the buffer in dwords */ + unsigned stream:2; /**< 0 to 3 */ +}; /** * Stream output for vertex transform feedback. */ struct pipe_stream_output_info { unsigned num_outputs; /** stride for an entire vertex for each buffer in dwords */ unsigned stride[PIPE_MAX_SO_BUFFERS]; /** * Array of stream outputs, in the order they are to be written in. * Selected components are tightly packed into the output buffer. */ - struct { - unsigned register_index:8; /**< 0 to PIPE_MAX_SHADER_OUTPUTS */ - unsigned start_component:2; /** 0 to 3 */ - unsigned num_components:3; /** 1 to 4 */ - unsigned output_buffer:3; /**< 0 to PIPE_MAX_SO_BUFFERS */ - unsigned dst_offset:16; /**< offset into the buffer in dwords */ - unsigned stream:2; /**< 0 to 3 */ - } output[PIPE_MAX_SO_OUTPUTS]; + struct pipe_stream_output output[PIPE_MAX_SO_OUTPUTS]; }; /** * The 'type' parameter identifies whether the shader state contains TGSI * tokens, etc. If the driver returns 'PIPE_SHADER_IR_TGSI' for the * 'PIPE_SHADER_CAP_PREFERRED_IR' shader param, the ir will *always* be * 'PIPE_SHADER_IR_TGSI' and the tokens ptr will be valid. If the driver * requests a different 'pipe_shader_ir' type, then it must check the 'type' * enum to see if it is getting TGSI tokens or its preferred IR. * -- 2.7.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev