Document rasterizer.
[mesa.git] / src / gallium / docs / source / cso / dsa.rst
1 Depth, Stencil, & Alpha
2 =======================
3
4 These three states control the depth, stencil, and alpha tests, used to
5 discard fragments that have passed through the fragment shader.
6
7 Traditionally, these three tests have been clumped together in hardware, so
8 they are all stored in one structure.
9
10 During actual execution, the order of operations done on fragments is always:
11
12 * Stencil
13 * Depth
14 * Alpha
15
16 Depth Members
17 -------------
18
19 enabled
20 Whether the depth test is enabled.
21 writemask
22 Whether the depth buffer receives depth writes.
23 func
24 The depth test function. One of PIPE_FUNC.
25
26 Stencil Members
27 ---------------
28
29 XXX document valuemask, writemask
30
31 enabled
32 Whether the stencil test is enabled. For the second stencil, whether the
33 two-sided stencil is enabled.
34 func
35 The stencil test function. One of PIPE_FUNC.
36 ref_value
37 Stencil test reference value; used for certain functions.
38 fail_op
39 The operation to carry out if the stencil test fails. One of
40 PIPE_STENCIL_OP.
41 zfail_op
42 The operation to carry out if the stencil test passes but the depth test
43 fails. One of PIPE_STENCIL_OP.
44 zpass_op
45 The operation to carry out if the stencil test and depth test both pass.
46 One of PIPE_STENCIL_OP.
47
48 Alpha Members
49 -------------
50
51 enabled
52 Whether the alpha test is enabled.
53 func
54 The alpha test function. One of PIPE_FUNC.
55 ref_value
56 Alpha test reference value; used for certain functions.