diff options
author | Christoph Bumiller <[email protected]> | 2010-12-10 20:16:10 +0100 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2010-12-10 20:20:37 +0100 |
commit | dea9d604005e9aaed2bd6807f1913ac668479443 (patch) | |
tree | 80d938959678a29927b7053b8385cf8007c9ae7c /src/gallium/drivers/nvc0/nvc0_state.c | |
parent | 51f22689a419a8a13ca105e8ffc905b5fadea0db (diff) |
nvc0: fix FACE state and and handle FACE sysval/varying offset
Diffstat (limited to 'src/gallium/drivers/nvc0/nvc0_state.c')
-rw-r--r-- | src/gallium/drivers/nvc0/nvc0_state.c | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_state.c b/src/gallium/drivers/nvc0/nvc0_state.c index afba7ce6a0d..c7a8c4b747f 100644 --- a/src/gallium/drivers/nvc0/nvc0_state.c +++ b/src/gallium/drivers/nvc0/nvc0_state.c @@ -210,25 +210,21 @@ nvc0_rasterizer_state_create(struct pipe_context *pipe, SB_DATA (so, nvgl_polygon_mode(cso->fill_back)); SB_OUT_3D (so, POLYGON_SMOOTH_ENABLE, cso->poly_smooth); - if (cso->cull_face != PIPE_FACE_NONE) { - SB_BEGIN_3D(so, CULL_FACE_ENABLE, 3); - SB_DATA (so, 1); - SB_DATA (so, cso->front_ccw ? NVC0_3D_FRONT_FACE_CCW : - NVC0_3D_FRONT_FACE_CW); - switch (cso->cull_face) { - case PIPE_FACE_FRONT_AND_BACK: - SB_DATA(so, NVC0_3D_CULL_FACE_FRONT_AND_BACK); - break; - case PIPE_FACE_FRONT: - SB_DATA(so, NVC0_3D_CULL_FACE_FRONT); - break; - case PIPE_FACE_BACK: - default: - SB_DATA(so, NVC0_3D_CULL_FACE_BACK); - break; - } - } else { - SB_OUT_3D(so, CULL_FACE_ENABLE, 0); + SB_BEGIN_3D(so, CULL_FACE_ENABLE, 3); + SB_DATA (so, cso->cull_face != PIPE_FACE_NONE); + SB_DATA (so, cso->front_ccw ? NVC0_3D_FRONT_FACE_CCW : + NVC0_3D_FRONT_FACE_CW); + switch (cso->cull_face) { + case PIPE_FACE_FRONT_AND_BACK: + SB_DATA(so, NVC0_3D_CULL_FACE_FRONT_AND_BACK); + break; + case PIPE_FACE_FRONT: + SB_DATA(so, NVC0_3D_CULL_FACE_FRONT); + break; + case PIPE_FACE_BACK: + default: + SB_DATA(so, NVC0_3D_CULL_FACE_BACK); + break; } SB_OUT_3D (so, POLYGON_STIPPLE_ENABLE, cso->poly_stipple_enable); |