diff options
author | marha <marha@users.sourceforge.net> | 2011-12-17 13:46:47 +0100 |
---|---|---|
committer | Marc Haesen <marc@hc-consult.be> | 2011-12-17 13:46:47 +0100 |
commit | cd55591be471b59faf9693651837a61e8376d85a (patch) | |
tree | daa8bcdb500384d7112f5114bf9c11b0bc2ab78d /mesalib/src/gallium/auxiliary/util/u_blitter.h | |
parent | 1ae4005bfe3690b34ec40e33918b3e24468d47e1 (diff) | |
parent | abacebe06d9f3d2fe1b7d256bd86cddbfa592a85 (diff) | |
download | vcxsrv-cd55591be471b59faf9693651837a61e8376d85a.tar.gz vcxsrv-cd55591be471b59faf9693651837a61e8376d85a.tar.bz2 vcxsrv-cd55591be471b59faf9693651837a61e8376d85a.zip |
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util/u_blitter.h')
-rw-r--r-- | mesalib/src/gallium/auxiliary/util/u_blitter.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_blitter.h b/mesalib/src/gallium/auxiliary/util/u_blitter.h index 3e1457ae0..f605a7e7a 100644 --- a/mesalib/src/gallium/auxiliary/util/u_blitter.h +++ b/mesalib/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 */ @@ -214,6 +218,17 @@ void util_blitter_copy_texture_view(struct blitter_context *blitter, unsigned src_width0, unsigned src_height0); /** + * Copy data from one buffer to another using the Stream Output functionality. + * Some alignment is required, otherwise software fallback is used. + */ +void util_blitter_copy_buffer(struct blitter_context *blitter, + struct pipe_resource *dst, + unsigned dstx, + struct pipe_resource *src, + unsigned srcx, + unsigned size); + +/** * Clear a region of a (color) surface to a constant value. * * These states must be saved in the blitter in addition to the state objects @@ -379,6 +394,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 |