diff options
author | Marek Olšák <[email protected]> | 2011-11-19 21:44:28 +0100 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2011-12-15 18:51:48 +0100 |
commit | b177e2c54c7dbec58c2547524abe89e52d458252 (patch) | |
tree | 2182326eddd22afed48588c5d7d7107db4255bd5 /src/gallium/auxiliary/util/u_blitter.h | |
parent | 1114b192af1a27c4d90d79145847464e27391fcc (diff) |
u_blitter: restore stream output targets
Diffstat (limited to 'src/gallium/auxiliary/util/u_blitter.h')
-rw-r--r-- | src/gallium/auxiliary/util/u_blitter.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_blitter.h b/src/gallium/auxiliary/util/u_blitter.h index 3e1457ae0dd..d02cfafc17f 100644 --- a/src/gallium/auxiliary/util/u_blitter.h +++ b/src/gallium/auxiliary/util/u_blitter.h @@ -104,6 +104,9 @@ struct blitter_context int saved_num_vertex_buffers; struct pipe_vertex_buffer saved_vertex_buffers[PIPE_MAX_ATTRIBS]; + + int saved_num_so_targets; + struct pipe_stream_output_target *saved_so_targets[PIPE_MAX_SO_BUFFERS]; }; /** @@ -131,6 +134,7 @@ struct pipe_context *util_blitter_get_pipe(struct blitter_context *blitter) * - vertex elements * - vertex shader * - geometry shader (if supported) + * - stream output targets (if supported) * - rasterizer state */ @@ -379,6 +383,20 @@ util_blitter_save_vertex_buffers(struct blitter_context *blitter, num_vertex_buffers); } +static INLINE void +util_blitter_save_so_targets(struct blitter_context *blitter, + int num_targets, + struct pipe_stream_output_target **targets) +{ + unsigned i; + assert(num_targets <= Elements(blitter->saved_so_targets)); + + blitter->saved_num_so_targets = num_targets; + for (i = 0; i < num_targets; i++) + pipe_so_target_reference(&blitter->saved_so_targets[i], + targets[i]); +} + #ifdef __cplusplus } #endif |