summaryrefslogtreecommitdiffstats
path: root/src/gallium/docs/source/cso/rasterizer.rst
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/docs/source/cso/rasterizer.rst')
-rw-r--r--src/gallium/docs/source/cso/rasterizer.rst73
1 files changed, 70 insertions, 3 deletions
diff --git a/src/gallium/docs/source/cso/rasterizer.rst b/src/gallium/docs/source/cso/rasterizer.rst
index be4bad56c00..44e5544cdaa 100644
--- a/src/gallium/docs/source/cso/rasterizer.rst
+++ b/src/gallium/docs/source/cso/rasterizer.rst
@@ -238,9 +238,76 @@ scissor
multisample
Whether :term:`MSAA` is enabled.
-gl_rasterization_rules
- Whether the rasterizer should use (0.5, 0.5) pixel centers. When not set,
- the rasterizer will use (0, 0) for pixel centers.
+half_pixel_center
+ When true, the rasterizer should use (0.5, 0.5) pixel centers for
+ determining pixel ownership (e.g, OpenGL, D3D10 and higher)::
+
+ 0 0.5 1
+ 0 +-----+
+ | |
+ 0.5 | X |
+ | |
+ 1 +-----+
+
+ When false, the rasterizer should use (0, 0) pixel centers for determining
+ pixel ownership (e.g., D3D9 or ealier)::
+
+ -0.5 0 0.5
+ -0.5 +-----+
+ | |
+ 0 | X |
+ | |
+ 0.5 +-----+
+
+bottom_edge_rule
+ Determines what happens when a pixel sample lies precisely on a triangle
+ edge.
+
+ When true, a pixel sample is considered to lie inside of a triangle if it
+ lies on the *bottom edge* or *left edge* (e.g., OpenGL drawables)::
+
+ 0 x
+ 0 +--------------------->
+ |
+ | +-------------+
+ | | |
+ | | |
+ | | |
+ | +=============+
+ |
+ y V
+
+ When false, a pixel sample is considered to lie inside of a triangle if it
+ lies on the *top edge* or *left edge* (e.g., OpenGL FBOs, D3D)::
+
+ 0 x
+ 0 +--------------------->
+ |
+ | +=============+
+ | | |
+ | | |
+ | | |
+ | +-------------+
+ |
+ y V
+
+ Where:
+ - a *top edge* is an edge that is horizontal and is above the other edges;
+ - a *bottom edge* is an edge that is horizontal and is below the other
+ edges;
+ - a *left edge* is an edge that is not horizontal and is on the left side of
+ the triangle.
+
+ .. note::
+
+ Actually all graphics APIs use a top-left rasterization rule for pixel
+ ownership, but their notion of top varies with the axis origin (which
+ can be either at y = 0 or at y = height). Gallium instead always
+ assumes that top is always at y=0.
+
+ See also:
+ - http://msdn.microsoft.com/en-us/library/windows/desktop/cc627092.aspx
+ - http://msdn.microsoft.com/en-us/library/windows/desktop/bb147314.aspx
clip_halfz
When true clip space in the z axis goes from [0..1] (D3D). When false