diff options
Diffstat (limited to 'src/gallium/docs')
-rw-r--r-- | src/gallium/docs/source/cso/rasterizer.rst | 73 | ||||
-rw-r--r-- | src/gallium/docs/source/tgsi.rst | 2 |
2 files changed, 71 insertions, 4 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 diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst index 03bbd6fd23a..0a5b2274a9a 100644 --- a/src/gallium/docs/source/tgsi.rst +++ b/src/gallium/docs/source/tgsi.rst @@ -2168,7 +2168,7 @@ If HALF_INTEGER, the fractionary part of the position will be 0.5 If INTEGER, the fractionary part of the position will be 0.0 Note that this does not affect the set of fragments generated by -rasterization, which is instead controlled by gl_rasterization_rules in the +rasterization, which is instead controlled by half_pixel_center in the rasterizer. OpenGL defaults to HALF_INTEGER, and is configurable with the |