summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nvc0/nvc0_state.c
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2011-02-14 02:04:58 +0100
committerChristoph Bumiller <[email protected]>2011-02-16 15:45:31 +0100
commit293a8d1b600cd5bd89b3c4c0b6c2bb245d9bd80f (patch)
tree48634e8109621686f3e750f95538d430f2a24420 /src/gallium/drivers/nvc0/nvc0_state.c
parenta24e9bd497d54a373b021370f90144596a37945b (diff)
nvc0: front stencil mask and func mask methods are swapped
Diffstat (limited to 'src/gallium/drivers/nvc0/nvc0_state.c')
-rw-r--r--src/gallium/drivers/nvc0/nvc0_state.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_state.c b/src/gallium/drivers/nvc0/nvc0_state.c
index 7fb91b1191d..7f59d40c5fb 100644
--- a/src/gallium/drivers/nvc0/nvc0_state.c
+++ b/src/gallium/drivers/nvc0/nvc0_state.c
@@ -284,20 +284,21 @@ nvc0_zsa_state_create(struct pipe_context *pipe,
}
if (cso->stencil[0].enabled) {
- SB_BEGIN_3D(so, STENCIL_FRONT_ENABLE, 5);
+ SB_BEGIN_3D(so, STENCIL_ENABLE, 5);
SB_DATA (so, 1);
SB_DATA (so, nvgl_stencil_op(cso->stencil[0].fail_op));
SB_DATA (so, nvgl_stencil_op(cso->stencil[0].zfail_op));
SB_DATA (so, nvgl_stencil_op(cso->stencil[0].zpass_op));
SB_DATA (so, nvgl_comparison_op(cso->stencil[0].func));
- SB_BEGIN_3D(so, STENCIL_FRONT_MASK, 2);
- SB_DATA (so, cso->stencil[0].writemask);
+ SB_BEGIN_3D(so, STENCIL_FRONT_FUNC_MASK, 2);
SB_DATA (so, cso->stencil[0].valuemask);
+ SB_DATA (so, cso->stencil[0].writemask);
} else {
- SB_IMMED_3D(so, STENCIL_FRONT_ENABLE, 0);
+ SB_IMMED_3D(so, STENCIL_ENABLE, 0);
}
if (cso->stencil[1].enabled) {
+ assert(cso->stencil[0].enabled);
SB_BEGIN_3D(so, STENCIL_TWO_SIDE_ENABLE, 5);
SB_DATA (so, 1);
SB_DATA (so, nvgl_stencil_op(cso->stencil[1].fail_op));
@@ -307,7 +308,8 @@ nvc0_zsa_state_create(struct pipe_context *pipe,
SB_BEGIN_3D(so, STENCIL_BACK_MASK, 2);
SB_DATA (so, cso->stencil[1].writemask);
SB_DATA (so, cso->stencil[1].valuemask);
- } else {
+ } else
+ if (cso->stencil[0].enabled) {
SB_IMMED_3D(so, STENCIL_TWO_SIDE_ENABLE, 0);
}