1*61046927SAndroid Build Coastguard Worker.. _depth-stencil-alpha: 2*61046927SAndroid Build Coastguard Worker 3*61046927SAndroid Build Coastguard WorkerDepth, Stencil, & Alpha 4*61046927SAndroid Build Coastguard Worker======================= 5*61046927SAndroid Build Coastguard Worker 6*61046927SAndroid Build Coastguard WorkerThese three states control the depth, stencil, and alpha tests, used to 7*61046927SAndroid Build Coastguard Workerdiscard fragments that have passed through the fragment shader. 8*61046927SAndroid Build Coastguard Worker 9*61046927SAndroid Build Coastguard WorkerTraditionally, these three tests have been clumped together in hardware, so 10*61046927SAndroid Build Coastguard Workerthey are all stored in one structure. 11*61046927SAndroid Build Coastguard Worker 12*61046927SAndroid Build Coastguard WorkerDuring actual execution, the order of operations done on fragments is always: 13*61046927SAndroid Build Coastguard Worker 14*61046927SAndroid Build Coastguard Worker* Alpha 15*61046927SAndroid Build Coastguard Worker* Stencil 16*61046927SAndroid Build Coastguard Worker* Depth 17*61046927SAndroid Build Coastguard Worker 18*61046927SAndroid Build Coastguard WorkerDepth Members 19*61046927SAndroid Build Coastguard Worker------------- 20*61046927SAndroid Build Coastguard Worker 21*61046927SAndroid Build Coastguard Workerenabled 22*61046927SAndroid Build Coastguard Worker Whether the depth test is enabled. 23*61046927SAndroid Build Coastguard Workerwritemask 24*61046927SAndroid Build Coastguard Worker Whether the depth buffer receives depth writes. 25*61046927SAndroid Build Coastguard Workerfunc 26*61046927SAndroid Build Coastguard Worker The depth test function. One of PIPE_FUNC. 27*61046927SAndroid Build Coastguard Worker 28*61046927SAndroid Build Coastguard WorkerStencil Members 29*61046927SAndroid Build Coastguard Worker--------------- 30*61046927SAndroid Build Coastguard Worker 31*61046927SAndroid Build Coastguard Workerenabled 32*61046927SAndroid Build Coastguard Worker Whether the stencil test is enabled. For the second stencil, whether the 33*61046927SAndroid Build Coastguard Worker two-sided stencil is enabled. If two-sided stencil is disabled, the other 34*61046927SAndroid Build Coastguard Worker fields for the second array member are not valid. 35*61046927SAndroid Build Coastguard Workerfunc 36*61046927SAndroid Build Coastguard Worker The stencil test function. One of PIPE_FUNC. 37*61046927SAndroid Build Coastguard Workervaluemask 38*61046927SAndroid Build Coastguard Worker Stencil test value mask; this is ANDed with the value in the stencil 39*61046927SAndroid Build Coastguard Worker buffer and the reference value before doing the stencil comparison test. 40*61046927SAndroid Build Coastguard Workerwritemask 41*61046927SAndroid Build Coastguard Worker Stencil test writemask; this controls which bits of the stencil buffer 42*61046927SAndroid Build Coastguard Worker are written. 43*61046927SAndroid Build Coastguard Workerfail_op 44*61046927SAndroid Build Coastguard Worker The operation to carry out if the stencil test fails. One of 45*61046927SAndroid Build Coastguard Worker PIPE_STENCIL_OP. 46*61046927SAndroid Build Coastguard Workerzfail_op 47*61046927SAndroid Build Coastguard Worker The operation to carry out if the stencil test passes but the depth test 48*61046927SAndroid Build Coastguard Worker fails. One of PIPE_STENCIL_OP. 49*61046927SAndroid Build Coastguard Workerzpass_op 50*61046927SAndroid Build Coastguard Worker The operation to carry out if the stencil test and depth test both pass. 51*61046927SAndroid Build Coastguard Worker One of PIPE_STENCIL_OP. 52*61046927SAndroid Build Coastguard Worker 53*61046927SAndroid Build Coastguard WorkerAlpha Members 54*61046927SAndroid Build Coastguard Worker------------- 55*61046927SAndroid Build Coastguard Worker 56*61046927SAndroid Build Coastguard Workerenabled 57*61046927SAndroid Build Coastguard Worker Whether the alpha test is enabled. 58*61046927SAndroid Build Coastguard Workerfunc 59*61046927SAndroid Build Coastguard Worker The alpha test function. One of PIPE_FUNC. 60*61046927SAndroid Build Coastguard Workerref_value 61*61046927SAndroid Build Coastguard Worker Alpha test reference value; used for certain functions. 62