[Mesa-dev] [PATCH 2/8] gallium: add support for stream in so info

Brian Paul brianp at vmware.com
Fri Jun 27 06:31:15 PDT 2014


On 06/26/2014 10:40 PM, Ilia Mirkin wrote:
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---
>   src/gallium/drivers/trace/tr_dump_state.c  | 1 +
>   src/gallium/include/pipe/p_state.h         | 1 +
>   src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 1 +
>   3 files changed, 3 insertions(+)
>
> diff --git a/src/gallium/drivers/trace/tr_dump_state.c b/src/gallium/drivers/trace/tr_dump_state.c
> index f57dda4..37074a7 100644
> --- a/src/gallium/drivers/trace/tr_dump_state.c
> +++ b/src/gallium/drivers/trace/tr_dump_state.c
> @@ -292,6 +292,7 @@ void trace_dump_shader_state(const struct pipe_shader_state *state)
>         trace_dump_member(uint, &state->stream_output.output[i], num_components);
>         trace_dump_member(uint, &state->stream_output.output[i], output_buffer);
>         trace_dump_member(uint, &state->stream_output.output[i], dst_offset);
> +      trace_dump_member(uint, &state->stream_output.output[i], stream);
>         trace_dump_struct_end();
>         trace_dump_elem_end();
>      }
> diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
> index 7257604..6e6f88e 100644
> --- a/src/gallium/include/pipe/p_state.h
> +++ b/src/gallium/include/pipe/p_state.h
> @@ -205,6 +205,7 @@ struct pipe_stream_output_info
>         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];
>   };
>
> diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> index b7218ef..a552bb4 100644
> --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> @@ -5524,6 +5524,7 @@ st_translate_stream_output_info(glsl_to_tgsi_visitor *glsl_to_tgsi,
>         so->output[i].num_components = info->Outputs[i].NumComponents;
>         so->output[i].output_buffer = info->Outputs[i].OutputBuffer;
>         so->output[i].dst_offset = info->Outputs[i].DstOffset;
> +      so->output[i].stream = 0; /* info->Outputs[i].StreamId */
>      }
>
>      for (i = 0; i < PIPE_MAX_SO_BUFFERS; i++) {
>

Reviewed-by: Brian Paul <brianp at vmware.com>



More information about the mesa-dev mailing list