summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2008-04-04 01:59:38 +0200
committerRoland Scheidegger <[email protected]>2008-04-04 12:44:13 +0200
commitcf9b07ea3474cd33e797eeb10b3fd73ad54ae8d5 (patch)
tree987a61fa1d56d2e33327fcfa0b1a6909c23aea0d /src/gallium
parent7a7bce7b24ea4f63faa1d5bfe3f71d09b412c838 (diff)
gallium: fix two-side stencil handling
Previously all drivers were in twosided mode since they checked for stencil.enable[1] flag which was a copy of stencil.enable[0]. Note that drivers should not reference stencil[1] state (other than the enable) if twosided stenciling is disabled (for now the stencil state is still copied but for instance clear_with_quads won't provide useful values in there). Also, use _TestTwoSide instead of TestTwoSide since results would be bogus otherwise if using APIs with implicit two side stencil enable (i.e. core ogl 2.0).
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/include/pipe/p_state.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
index 3593446e1c4..2dc9a921862 100644
--- a/src/gallium/include/pipe/p_state.h
+++ b/src/gallium/include/pipe/p_state.h
@@ -181,7 +181,7 @@ struct pipe_depth_stencil_alpha_state
unsigned occlusion_count:1; /**< do occlusion counting? */
} depth;
struct {
- unsigned enabled:1;
+ unsigned enabled:1; /**< stencil[0]: stencil enabled, stencil[1]: two-side enabled */
unsigned func:3; /**< PIPE_FUNC_x */
unsigned fail_op:3; /**< PIPE_STENCIL_OP_x */
unsigned zpass_op:3; /**< PIPE_STENCIL_OP_x */