diff options
author | Christian König <[email protected]> | 2012-07-18 10:03:34 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2012-07-24 12:29:29 +0200 |
commit | bd18a316e1495f501911d89c8b373382d1f8c8c2 (patch) | |
tree | 6ed562f991f980b3a1734350fc5342f40547e987 /src/gallium/drivers/radeonsi/evergreen_state.c | |
parent | f67fae0e43fa0909b57b8a07858d37caecd5cbb1 (diff) |
radeonsi: move infeered fb/rs state to new handling
Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/evergreen_state.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/evergreen_state.c | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/src/gallium/drivers/radeonsi/evergreen_state.c b/src/gallium/drivers/radeonsi/evergreen_state.c index a34f4329509..f1e7ee6fcfd 100644 --- a/src/gallium/drivers/radeonsi/evergreen_state.c +++ b/src/gallium/drivers/radeonsi/evergreen_state.c @@ -1206,56 +1206,6 @@ void si_init_config(struct r600_context *rctx) r600_context_pipe_state_set(rctx, rstate); } -void cayman_polygon_offset_update(struct r600_context *rctx) -{ - struct r600_pipe_state state; - - state.id = R600_PIPE_STATE_POLYGON_OFFSET; - state.nregs = 0; - if (rctx->queued.named.rasterizer && rctx->framebuffer.zsbuf) { - float offset_units = rctx->queued.named.rasterizer->offset_units; - unsigned offset_db_fmt_cntl = 0, depth; - - switch (rctx->framebuffer.zsbuf->texture->format) { - case PIPE_FORMAT_Z24X8_UNORM: - case PIPE_FORMAT_Z24_UNORM_S8_UINT: - depth = -24; - offset_units *= 2.0f; - break; - case PIPE_FORMAT_Z32_FLOAT: - case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT: - depth = -23; - offset_units *= 1.0f; - offset_db_fmt_cntl |= S_028B78_POLY_OFFSET_DB_IS_FLOAT_FMT(1); - break; - case PIPE_FORMAT_Z16_UNORM: - depth = -16; - offset_units *= 4.0f; - break; - default: - return; - } - /* FIXME some of those reg can be computed with cso */ - offset_db_fmt_cntl |= S_028B78_POLY_OFFSET_NEG_NUM_DB_BITS(depth); - r600_pipe_state_add_reg(&state, - R_028B80_PA_SU_POLY_OFFSET_FRONT_SCALE, - fui(rctx->queued.named.rasterizer->offset_scale), NULL, 0); - r600_pipe_state_add_reg(&state, - R_028B84_PA_SU_POLY_OFFSET_FRONT_OFFSET, - fui(offset_units), NULL, 0); - r600_pipe_state_add_reg(&state, - R_028B88_PA_SU_POLY_OFFSET_BACK_SCALE, - fui(rctx->queued.named.rasterizer->offset_scale), NULL, 0); - r600_pipe_state_add_reg(&state, - R_028B8C_PA_SU_POLY_OFFSET_BACK_OFFSET, - fui(offset_units), NULL, 0); - r600_pipe_state_add_reg(&state, - R_028B78_PA_SU_POLY_OFFSET_DB_FMT_CNTL, - offset_db_fmt_cntl, NULL, 0); - r600_context_pipe_state_set(rctx, &state); - } -} - void si_pipe_shader_ps(struct pipe_context *ctx, struct si_pipe_shader *shader) { struct r600_context *rctx = (struct r600_context *)ctx; |