summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi/tgsi_ureg.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-12-09 18:12:55 +0100
committerChristoph Bumiller <[email protected]>2011-12-15 18:51:48 +0100
commit8a9a37cebeff19b56afed43ae037d00950fa7594 (patch)
tree8831c98c9650d89a7bf18f89c90b55f51f164cce /src/gallium/auxiliary/tgsi/tgsi_ureg.c
parent861a029ddb31e91bb4d8e18ab708d0d172f63aad (diff)
gallium: utility helper functions for stream output
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_ureg.c')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_ureg.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c
index 33d285cb64c..17f9ce25227 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_ureg.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.c
@@ -1590,14 +1590,19 @@ const struct tgsi_token *ureg_finalize( struct ureg_program *ureg )
void *ureg_create_shader( struct ureg_program *ureg,
- struct pipe_context *pipe )
+ struct pipe_context *pipe,
+ const struct pipe_stream_output_info *so )
{
struct pipe_shader_state state;
state.tokens = ureg_finalize(ureg);
if(!state.tokens)
return NULL;
- memset(&state.stream_output, 0, sizeof(state.stream_output));
+
+ if (so)
+ state.stream_output = *so;
+ else
+ memset(&state.stream_output, 0, sizeof(state.stream_output));
if (ureg->processor == TGSI_PROCESSOR_VERTEX)
return pipe->create_vs_state( pipe, &state );