Document rasterizer.
[mesa.git] / src / gallium / docs / source / cso / rasterizer.rst
1 Rasterizer
2 ==========
3
4 The rasterizer is the main chunk of state controlling how vertices are
5 interpolated into fragments.
6
7 Members
8 -------
9
10 XXX undocumented light_twoside, front_winding, cull_mode, fill_cw, fill_ccw, offset_cw, offset_ccw
11 XXX moar undocumented poly_smooth, line_stipple_factor, line_last_pixel, offset_units, offset_scale
12 XXX sprite_coord_mode
13
14 flatshade
15 If set, the provoking vertex of each polygon is used to determine the
16 color of the entire polygon. If not set, the color fragments will be
17 interpolated from each vertex's color.
18 scissor
19 Whether the scissor test is enabled.
20 poly_stipple_enable
21 Whether polygon stippling is enabled.
22 point_smooth
23 Whether points should be smoothed. Point smoothing turns rectangular
24 points into circles or ovals.
25 point_sprite
26 Whether point sprites are enabled.
27 point_size_per_vertex
28 Whether vertices have a point size element.
29 multisample
30 Whether MSAA is enabled.
31 line_smooth
32 Whether lines should be smoothed. Line smoothing is simply anti-aliasing.
33 line_stipple_enable
34 Whether line stippling is enabled.
35 line_stipple_pattern
36 16-bit bitfield of on/off flags, used to pattern the line stipple.
37 bypass_vs_clip_and_viewport
38 Whether the entire TCL pipeline should be bypassed. This implies that
39 vertices are pre-transformed for the viewport, and will not be run
40 through the vertex shader. Note that implementations may still clip away
41 vertices that are not in the viewport.
42 flatshade_first
43 Whether the first vertex should be the provoking vertex, for most
44 primitives. If not set, the last vertex is the provoking vertex.
45 gl_rasterization_rules
46 Whether the rasterizer should use (0.5, 0.5) pixel centers. When not set,
47 the rasterizer will use (0, 0) for pixel centers.
48 line_width
49 The width of lines.
50 point_size
51 The size of points, if not specified per-vertex.
52 point_size_min
53 The minimum size of points.
54 point_size_max
55 The maximum size of points.
56
57 Notes
58 -----
59
60 flatshade
61 ^^^^^^^^^
62
63 The actual interpolated shading algorithm is obviously
64 implementation-dependent, but will usually be Gourard for most hardware.
65
66 bypass_vs_clip_and_viewport
67 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
68
69 When set, this implies that vertices are pre-transformed for the viewport, and
70 will not be run through the vertex shader. Note that implementations may still
71 clip away vertices that are not visible.
72
73 flatshade_first
74 ^^^^^^^^^^^^^^^
75
76 There are several important exceptions to the specification of this rule.
77
78 * PIPE_PRIMITIVE_POLYGON: The provoking vertex is always the first vertex.
79 If the caller wishes to change the provoking vertex, they merely need to
80 rotate the vertices themselves.
81 * PIPE_PRIMITIVE_QUAD, PIPE_PRIMITIVE_QUAD_STRIP: This option has no effect.
82 * PIPE_PRIMITIVE_TRIANGLE_FAN: When set, the provoking vertex is the second
83 vertex, not the first. This permits each segment of the fan to have a
84 different color.