From 2449695e822421fdcaf1c66dffc12d7d705ea69d Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sat, 17 Dec 2011 23:12:45 +0100 Subject: gallium: improve the pipe_stream_output_info struct (v2) There are 3 changes: 1) stride is specified for each buffer, not just one, so that drivers don't have to derive it from the outputs 2) new per-output property dst_offset, which specifies the offset into the buffer in dwords where the output should be stored, so that drivers don't have to compute the offsets manually; this will also be useful for gl_SkipComponents from ARB_transform_feedback3 3) register_mask is removed, instead, there is start_component and num_components; register_mask with non-consecutive 1s doesn't make much sense (some hardware cannot do packing of components) Christoph Bumiller: fixed nvc0. v2: resolve merge conflicts in Draw and clean it up --- src/gallium/include/pipe/p_state.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 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 024d544e3ef..f6486f01dce 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -190,16 +190,19 @@ struct pipe_clip_state struct pipe_stream_output_info { unsigned num_outputs; - /** stride for an entire vertex, only used if all output_buffers are 0 */ - unsigned stride; + /** 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 register_mask:4; /**< TGSI_WRITEMASK_x */ - unsigned output_buffer:4; /**< 0 to PIPE_MAX_SO_BUFFERS */ + 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 */ } output[PIPE_MAX_SHADER_OUTPUTS]; }; -- cgit v1.2.3