diff options
author | Ilia Mirkin <[email protected]> | 2016-06-11 11:35:01 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2016-06-18 12:59:12 -0400 |
commit | 82fab73246810332bb238e96335ba81d4d2182d6 (patch) | |
tree | aa3af2ac815d60acd7cba5086d651ac302361982 /src/gallium/docs | |
parent | d68c1e2ac28bbf0ac6259e9619fb73958fc598b8 (diff) |
gallium: add API for setting window rectangles
Window rectangles apply to all framebuffer operations, either in
inclusive or exclusive mode. They may also be specified as part of a
blit operation.
In exclusive mode, any fragment inside any of the specified rectangles
will be discarded.
In inclusive mode, any fragment outside every rectangle will be
discarded.
The no-op state is to have 0 rectangles in exclusive mode.
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/docs')
-rw-r--r-- | src/gallium/docs/source/context.rst | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/gallium/docs/source/context.rst b/src/gallium/docs/source/context.rst index 3a45f402cd8..6f09c559b60 100644 --- a/src/gallium/docs/source/context.rst +++ b/src/gallium/docs/source/context.rst @@ -79,6 +79,17 @@ objects. They all follow simple, one-method binding calls, e.g. should be the same as the number of set viewports and can be up to PIPE_MAX_VIEWPORTS. * ``set_viewport_states`` +* ``set_window_rectangles`` sets the window rectangles to be used for + rendering, as defined by GL_EXT_window_rectangles. There are two + modes - include and exclude, which define whether the supplied + rectangles are to be used for including fragments or excluding + them. All of the rectangles are ORed together, so in exclude mode, + any fragment inside any rectangle would be culled, while in include + mode, any fragment outside all rectangles would be culled. xmin/ymin + are inclusive, while xmax/ymax are exclusive (same as scissor states + above). Note that this only applies to draws, not clears or + blits. (Blits have their own way to pass the requisite rectangles + in.) * ``set_tess_state`` configures the default tessellation parameters: * ``default_outer_level`` is the default value for the outer tessellation levels. This corresponds to GL's ``PATCH_DEFAULT_OUTER_LEVEL``. @@ -492,9 +503,9 @@ This can be considered the equivalent of a CPU memcpy. ``blit`` blits a region of a resource to a region of another resource, including scaling, format conversion, and up-/downsampling, as well as a destination clip -rectangle (scissors). It can also optionally honor the current render condition -(but either way the blit itself never contributes anything to queries currently -gathering data). +rectangle (scissors) and window rectangles. It can also optionally honor the +current render condition (but either way the blit itself never contributes +anything to queries currently gathering data). As opposed to manually drawing a textured quad, this lets the pipe driver choose the optimal method for blitting (like using a special 2D engine), and usually offers, for example, accelerated stencil-only copies even where |