On 07/25/2011 02:47 PM, Christoph Bumiller wrote: > Resolve via glBlitFramebuffer allows resolving a sub-region of a > renderbuffer to a different location in any mipmap level of some > other texture, therefore location and size parameters are needed. > > The mask parameter was added because resolving only depth or only > stencil of a combined buffer is possible as well. > > Copying from FBO to a window system buffer requires a vertical > so the yflip parameter was added. > > The y-flip parameter could be left out if pipe_box was changed to > contain signed width/height or x0,y0,x1,y1 instead. > This might benefit other methods, such as resource_copy_region, where > some hw can easily do a backwards copy (yflip). > >
Actually, some modifications to the original change: 1. Let's not make it go both directions (ms -> ss and ss -> ms) but just (ms -> ss) as it was originally. The other direction can always be done with the usual util_blit_pixels path. 2. I'd like to add an auxiliary resource for multisample modes that store additional data in another buffer, like nv's coverage sampling.
>From 2323041992f60830d63b3b88ce64ef037744b803 Mon Sep 17 00:00:00 2001 From: Christoph Bumiller <e0425...@student.tuwien.ac.at> Date: Mon, 25 Jul 2011 17:30:40 +0200 Subject: [PATCH] gallium: different definition of resource_resolve function --- src/gallium/include/pipe/p_context.h | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h index 9376cdd..e038e12 100644 --- a/src/gallium/include/pipe/p_context.h +++ b/src/gallium/include/pipe/p_context.h @@ -266,16 +266,19 @@ struct pipe_context { const struct pipe_box *src_box); /** - * Resolve a multisampled resource into a non-multisampled one, - * or vice versa (in the latter case, values are just replicated). + * Resolve a multisampled resource into a non-multisampled one. + * The multisampled resource cannot have mipmaps. * Source and destination must have the same format. * Mask can be either PIPE_MASK_RGBA, Z, S or ZS. - * The mipmap level of the multisampled resource will be 0. + * The auxiliary resource (separate sample data) may be NULL. */ void (*resource_resolve)(struct pipe_context *pipe, unsigned mask, - struct pipe_resource *dst, unsigned dst_level, - unsigned dstx, unsigned dsty, unsigned dst_layer, - struct pipe_resource *src, unsigned src_level, + struct pipe_resource *dst, + unsigned dst_level, + unsigned dstx, unsigned dsty, unsigned dstz, + struct pipe_resource *aux, + unsigned aux_level, unsigned aux_layer, + struct pipe_resource *src, const struct pipe_box *src_box, boolean yflip); /*@}*/ -- 1.7.2.2
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev