gallium: extend resource_resolve to accommodate BlitFramebuffer

Resolve via glBlitFramebuffer allows resolving a sub-region of a
renderbuffer to a different location in any mipmap level of some
other texture, and, with a new extension, even scaling. 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.

Full information about the blit operation allows the drivers to
take the most efficient path they possibly can.
This commit is contained in:
Christoph Bumiller
2011-08-03 15:43:16 +02:00
parent 57590e173b
commit 94822c6d83
4 changed files with 43 additions and 6 deletions

View File

@@ -329,8 +329,15 @@ textured quad blitter.. The source and destination may be the same resource,
but overlapping blits are not permitted.
``resource_resolve`` resolves a multisampled resource into a non-multisampled
one. Formats and dimensions must match. This function must be present if a driver
one. Their formats must match. This function must be present if a driver
supports multisampling.
The region that is to be resolved is described by ``pipe_resolve_info``, which
provides a source and a destination rectangle.
The source rectangle may be vertically flipped, but otherwise the dimensions
of the rectangles must match, unless PIPE_CAP_SCALED_RESOLVE is supported,
in which case scaling and horizontal flipping are allowed as well.
The result of resolving depth/stencil values may be any function of the values at
the sample points, but returning the value of the centermost sample is preferred.
The interfaces to these calls are likely to change to make it easier
for a driver to batch multiple blits with the same source and