summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_state_common.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-10-05 04:59:50 +0200
committerMarek Olšák <[email protected]>2012-10-10 00:16:42 +0200
commitab075de53baa9829780cc133e5ac06e5498a763c (patch)
tree13c225c22cd40002dc2dbf3c557ac1e66b71b3d8 /src/gallium/drivers/r600/r600_state_common.c
parenta50edc8ed84c4c48c0dc8e1a079e8d5e8f1c3a0e (diff)
r600g: atomize polygon offset state
POLY_OFFSET_DB_FMT_CNTL is moved to the framebuffer state, because it only depends on the zbuffer format. Reviewed-by: Jerome Glisse <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_state_common.c')
-rw-r--r--src/gallium/drivers/r600/r600_state_common.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c
index fe800f25a51..e30ec3dae7d 100644
--- a/src/gallium/drivers/r600/r600_state_common.c
+++ b/src/gallium/drivers/r600/r600_state_common.c
@@ -328,10 +328,12 @@ static void r600_bind_rs_state(struct pipe_context *ctx, void *state)
rctx->states[rs->rstate.id] = &rs->rstate;
r600_context_pipe_state_set(rctx, &rs->rstate);
- if (rctx->chip_class >= EVERGREEN) {
- evergreen_polygon_offset_update(rctx);
- } else {
- r600_polygon_offset_update(rctx);
+ if (rs->offset_enable &&
+ (rs->offset_units != rctx->poly_offset_state.offset_units ||
+ rs->offset_scale != rctx->poly_offset_state.offset_scale)) {
+ rctx->poly_offset_state.offset_units = rs->offset_units;
+ rctx->poly_offset_state.offset_scale = rs->offset_scale;
+ rctx->poly_offset_state.atom.dirty = true;
}
/* Update clip_misc_state. */