diff options
author | Marek Olšák <[email protected]> | 2011-10-21 02:09:40 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-10-23 20:27:06 +0200 |
commit | 37b62cc35435a704d33c1814fbdbd0e807699e21 (patch) | |
tree | 2607f447bd08fd498a47b4684ae5199c596b7fea /src/gallium/auxiliary/util/u_blitter.h | |
parent | cf81f2349cd3152efdab06cdfa3ea6aca9801c35 (diff) |
u_blitter: add a copy_texture function which uses views and not resources
The views (sampler views and surfaces) are great tools for changing resource
properties without having to change pipe_resource.
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 798096e74df..55b2421d452 100644 --- a/src/gallium/auxiliary/util/u_blitter.h +++ b/src/gallium/auxiliary/util/u_blitter.h @@ -190,6 +190,24 @@ void util_blitter_copy_texture(struct blitter_context *blitter, boolean ignore_stencil); /** + * Same as util_blitter_copy_texture, but dst and src are pipe_surface and + * pipe_sampler_view, respectively. The mipmap level and dstz are part of + * the views. + * + * Drivers can use this to change resource properties (like format, width, + * height) by changing how the views can interpret them, instead of changing + * pipe_resource directly. This is usually needed to accelerate copying of + * compressed formats. + * + * NOTE: There are no checks whether the blit is actually supported. + */ +void util_blitter_copy_texture_view(struct blitter_context *blitter, + struct pipe_surface *dst, + unsigned dstx, unsigned dsty, + struct pipe_sampler_view *src, + const struct pipe_box *srcbox); + +/** * 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 |